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:
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user