Documentation
¶
Index ¶
Constants ¶
View Source
const ( UDPMaxBuffer = 1500 DefaultSTUNTimeout = 2 * time.Second )
Variables ¶
This section is empty.
Functions ¶
func GetPublicEndpoint ¶
func GetPublicEndpoint(ctx context.Context, conn *net.UDPConn, servers []string) (*net.UDPAddr, error)
GetPublicEndpoint attempts to discover the public-facing UDP address of the local machine by querying a list of STUN servers. It sends a STUN Binding Request through the provided UDP connection and returns the first successful response.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.