stun

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 18, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package stun contains ICE specific STUN code

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssertUsername

func AssertUsername(m *stun.Message, expectedUsername string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL