2
0
mirror of https://github.com/soheilhy/cmux.git synced 2026-08-25 12:54:31 +08:00

Remove the bugos http2.Configure from tests

http2.Configure is not functional with cmux. Asked for
exporting http2.Server.HandleConn().
This commit is contained in:
Soheil Hassas Yeganeh
2015-07-29 17:23:53 -04:00
parent 549d3f9344
commit 6194168d4e
2 changed files with 7 additions and 12 deletions

View File

@@ -66,9 +66,9 @@ func Example() {
// We first match the connection against HTTP2 fields. If matched, the
// connection will be sent through the "grpcl" listener.
grpcl := m.Match(cmux.HTTP2HeaderField("content-type", "application/grpc"))
// Otherwise, we match it againts HTTP1 methods and HTTP2. If matched by
// any of them, it is sent through the "httpl" listener.
httpl := m.Match(cmux.HTTP1Fast(), cmux.HTTP2())
// Otherwise, we match it againts HTTP1 methods. If matched,
// it is sent through the "httpl" listener.
httpl := m.Match(cmux.HTTP1Fast())
// If not matched by HTTP, we assume it is an RPC connection.
rpcl := m.Match(cmux.Any())