mirror of
https://github.com/soheilhy/cmux.git
synced 2025-01-19 03:06:07 +08:00
Nit in README
Make capitalizations consistent.
This commit is contained in:
parent
2863fc463a
commit
ea0a73f55e
@ -19,8 +19,8 @@ if err != nil {
|
|||||||
m := cmux.New(l)
|
m := cmux.New(l)
|
||||||
|
|
||||||
// Match connections in order.
|
// Match connections in order.
|
||||||
grpcl := m.Match(cmux.HTTP2HeaderField("content-type", "application/grpc"))
|
grpcL := m.Match(cmux.HTTP2HeaderField("content-type", "application/grpc"))
|
||||||
httpl := m.Match(cmux.Any()) // Any means anything that is not yet matched.
|
httpL := m.Match(cmux.Any()) // Any means anything that is not yet matched.
|
||||||
|
|
||||||
// Create your protocol servers.
|
// Create your protocol servers.
|
||||||
grpcS := grpc.NewServer()
|
grpcS := grpc.NewServer()
|
||||||
@ -31,8 +31,8 @@ httpS := &http.Server{
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use the muxed listeners for your servers.
|
// Use the muxed listeners for your servers.
|
||||||
go grpcS.Serve(grpcl)
|
go grpcS.Serve(grpcL)
|
||||||
go httpS.Serve(httpl)
|
go httpS.Serve(httpL)
|
||||||
|
|
||||||
// Start serving!
|
// Start serving!
|
||||||
m.Serve()
|
m.Serve()
|
||||||
|
Loading…
Reference in New Issue
Block a user