Documentation
¶
Overview ¶
Package transportmux wraps a transport.{Connecter,AuthenticatedListener} to distinguish different connection types based on a label sent from client to server on connection establishment.
Labels are plain text and fixed length.
Index ¶
- Constants
- func Demux(ctx context.Context, rawListener transport.AuthenticatedListener, ...) (map[string]transport.AuthenticatedListener, error)
- func MuxConnecter(rawConnecter transport.Connecter, labels []string, timeout time.Duration) (map[string]transport.Connecter, error)
- func WithLogger(ctx context.Context, log Logger) context.Context
- type Logger
Constants ¶
View Source
const LabelLen = 64
Exact length of a label in bytes (0-byte padded if it is shorter). This is a protocol constant, changing it breaks the wire protocol.
Variables ¶
This section is empty.
Functions ¶
func MuxConnecter ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.