The HTTP2 matcher uses io.ReadFull to read the client preface.
If the client sends a string shorter than the preface (e.g.,
SSL version) io.ReadFull will block.
Replace io.ReadFull with Read and assume partial reads will not
match
Fixes#44
Retun as soon as we have the matched field in the HTTP2 matcher
regardless of weather the value is matched or not. Fixes#35.
Issue #35 reports that cmux leaks memory when the client is HTTP2
but does not sends the expected header field. For example, when
the non-gRPC client sends a large field in the header and we are
matching for gRPC, we waste a lot of memory in the sniff buffer.
As reported in issue #22 reports that Java gRPC clients cannot
handshake with cmux'ed gRPC server, since the client does not
immediately send a header with the content-type field. The reason
is that the java client, block on receiving the first SETTING
frame.
Add MatchWriter that can match and write on the connection. Implement
a MatchWriter that writes a SETTING frame once it receives a SETTING
frame.
The latest canonical import path for http2 package is
"golang.org/x/net/http2".
The latest canonical import path for grpc examples is
"google.golang.org/grpc/examples/...".