Documentation ¶
Index ¶
- Variables
- type Endpoint
- func (e *Endpoint) Close() error
- func (e *Endpoint) LocalAddr() net.Addr
- func (e *Endpoint) Read(p []byte) (int, error)
- func (e *Endpoint) RemoteAddr() net.Addr
- func (e *Endpoint) SetDeadline(t time.Time) error
- func (e *Endpoint) SetReadDeadline(t time.Time) error
- func (e *Endpoint) SetWriteDeadline(t time.Time) error
- func (e *Endpoint) Write(p []byte) (n int, err error)
- type MatchFunc
- type Mux
Constants ¶
This section is empty.
Variables ¶
var MatchDTLS = MatchRange(20, 63)
MatchDTLS is a MatchFunc that accepts packets with the first byte in [20..63] as defied in RFC7983
var MatchSRTP = MatchRange(128, 191)
MatchSRTP is a MatchFunc that accepts packets with the first byte in [128..191] as defied in RFC7983
var MatchSTUN = MatchRange(0, 3)
MatchSTUN is a MatchFunc that accepts packets with the first byte in [0..3] as defied in RFC7983
var MatchTURN = MatchRange(64, 79)
MatchTURN is a MatchFunc that accepts packets with the first byte in [64..79] as defied in RFC7983
var MatchZRTP = MatchRange(16, 19)
MatchZRTP is a MatchFunc that accepts packets with the first byte in [16..19] as defied in RFC7983
Functions ¶
This section is empty.
Types ¶
type Endpoint ¶
type Endpoint struct {
// contains filtered or unexported fields
}
Endpoint implements net.Conn. It is used to read muxed packets.
func (*Endpoint) Read ¶
Read reads a packet of len(p) bytes from the underlying conn that are matched by the associated MuxFunc
func (*Endpoint) SetDeadline ¶
SetDeadline is a stub
func (*Endpoint) SetReadDeadline ¶
SetReadDeadline is a stub
func (*Endpoint) SetWriteDeadline ¶
SetWriteDeadline is a stub
type MatchFunc ¶
MatchFunc allows custom logic for mapping packets to an Endpoint
func MatchRange ¶
MatchRange is a MatchFunc that accepts packets with the first byte in [lower..upper]
type Mux ¶
type Mux struct {
// contains filtered or unexported fields
}
Mux allows multiplexing
func (*Mux) NewEndpoint ¶
NewEndpoint creates a new Endpoint
func (*Mux) RemoveEndpoint ¶
RemoveEndpoint removes an endpoint from the Mux