package mux

Import Path
	github.com/pion/webrtc/v4/internal/mux (on go.dev)

Dependency Relation
	imports 8 packages, and imported by one package

Involved Source Files endpoint.go Package mux multiplexes packets on a single socket (RFC7983) muxfunc.go
Package-Level Type Names (total 4)
/* sort by: | */
Config collects the arguments to mux.Mux construction into a single structure. BufferSize int Conn net.Conn LoggerFactory logging.LoggerFactory func NewMux(config Config) *Mux
Endpoint implements net.Conn. It is used to read muxed packets. Close unregisters the endpoint from the Mux. LocalAddr is a stub. Read reads a packet of len(p) bytes from the underlying conn that are matched by the associated MuxFunc. ReadFrom reads a packet of len(p) bytes from the underlying conn that are matched by the associated MuxFunc. RemoteAddr is a stub. SetDeadline is a stub. SetOnClose is a user set callback that will be executed when `Close` is called. SetReadDeadline is a stub. SetWriteDeadline is a stub. Write writes len(p) bytes to the underlying conn. WriteTo writes len(p) bytes to the underlying conn. *Endpoint : github.com/pion/datachannel.ReadDeadliner *Endpoint : github.com/pion/datachannel.WriteDeadliner *Endpoint : github.com/pion/stun.Connection *Endpoint : github.com/pion/stun/v3.Connection *Endpoint : github.com/miekg/dns.Writer *Endpoint : github.com/prometheus/common/expfmt.Closer *Endpoint : internal/bisect.Writer *Endpoint : io.Closer *Endpoint : io.ReadCloser *Endpoint : io.Reader *Endpoint : io.ReadWriteCloser *Endpoint : io.ReadWriter *Endpoint : io.WriteCloser *Endpoint : io.Writer *Endpoint : net.Conn *Endpoint : net.PacketConn func (*Mux).NewEndpoint(matchFunc MatchFunc) *Endpoint func (*Mux).RemoveEndpoint(e *Endpoint)
MatchFunc allows custom logic for mapping packets to an Endpoint. func (*Mux).NewEndpoint(matchFunc MatchFunc) *Endpoint
Mux allows multiplexing. Close closes the Mux and all associated Endpoints. NewEndpoint creates a new Endpoint. RemoveEndpoint removes an endpoint from the Mux. *Mux : github.com/prometheus/common/expfmt.Closer *Mux : io.Closer func NewMux(config Config) *Mux
Package-Level Functions (total 7)
MatchAll always returns true.
MatchDTLS is a MatchFunc that accepts packets with the first byte in [20..63] as defied in RFC7983.
MatchRange returns true if the first byte of buf is in [lower..upper].
MatchSRTCP is a MatchFunc that only matches SRTCP and not SRTP.
MatchSRTP is a MatchFunc that only matches SRTP and not SRTCP.
MatchSRTPOrSRTCP is a MatchFunc that accepts packets with the first byte in [128..191] as defied in RFC7983.
NewMux creates a new Mux.