square/okhttp — pull request #479 by adriancole (2014-01-23 18:23:55+00:00)
Title: Simplify settings and hide SPDY Variant construction

TL;DR

This undoes a little of #456 coming out of http/2 working group. Basically, this removes settings from the contract of Variant, FrameReader, and FrameWriter construction. It does not disable setting synchronization.

Background.

It seems that the header table size parameter will become descoped from the connection-level settings exchange in the next draft (and into a header-specific opcode). This removes a lot of the race conditions and makes things like ack even more advisory. A side effect is that we don't need to be as explicit about settings in the interface.

We will need to construct variants with settings such as table size, but adding that to the contract of the variant seems heavy handed, especially with less importance to synchronization. This implies either retaining our somewhat confusing newReader/Writer or allowing Variants to be created with customized settings, or handling it internally.

I'm going with handling internally, and reducing the configuration to protocol selection only for now. At some point, we'll open config to users, and then we might expose variant config in the Protocol enum or some other way that is least touch.