Documentation ¶
Overview ¶
Package stun contains ICE specific STUN code
Index ¶
- func AssertUsername(m *stun.Message, expectedUsername string) error
- func GetXORMappedAddr(conn net.PacketConn, serverAddr net.Addr, timeout time.Duration) (*stun.XORMappedAddress, error)
- func GetXORMappedAddrs(conn, conn2 net.PacketConn, serverAddr net.Addr, timeout time.Duration, ...) ([]*stun.XORMappedAddress, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertUsername ¶
AssertUsername checks that the given STUN message m has a USERNAME attribute with a given value
func GetXORMappedAddr ¶
func GetXORMappedAddr(conn net.PacketConn, serverAddr net.Addr, timeout time.Duration) (*stun.XORMappedAddress, error)
GetXORMappedAddr initiates a stun requests to serverAddr using conn, reads the response and returns the XORMappedAddress returned by the STUN server.
func GetXORMappedAddrs ¶
func GetXORMappedAddrs(conn, conn2 net.PacketConn, serverAddr net.Addr, timeout time.Duration, predictNumber int) ([]*stun.XORMappedAddress, error)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.