Documentation
¶
Overview ¶
Package stun implements the small subset of STUN (RFC 5389) Transporter needs: binding requests and responses carrying XOR-MAPPED-ADDRESS, so a node can learn the public address its NAT maps its UDP socket to.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Is ¶
Is reports whether b looks like a STUN message. It is cheap enough to run on every packet arriving on a socket shared with other protocols.
func Requests ¶
func Requests() uint64
Requests returns the number of binding requests answered by Serve.
Types ¶
type TxID ¶
type TxID [12]byte
TxID is a STUN transaction ID.
func ParseRequest ¶
ParseRequest returns the transaction ID of a binding request.
Click to show internal directories.
Click to hide internal directories.