Documentation ¶
Overview ¶
go-stun is a STUN (RFC 3489 and RFC 5389) client implementation in golang.
It is extremely easy to use -- just one line of code.
nat, host, err := stun.Discover()
More details please go to `example.go`.
Index ¶
Constants ¶
View Source
const ( DefaultServerHost = "provserver.televolution.net" DefaultServerPort = 3478 DefaultSoftwareName = "StunClient" )
View Source
const ( NAT_ERROR = iota NAT_UNKNOWN NAT_NONE NAT_BLOCKED NAT_FULL NAT_SYMETRIC NAT_RESTRICTED NAT_PORT_RESTRICTED NAT_SYMETRIC_UDP_FIREWALL )
Variables ¶
This section is empty.
Functions ¶
func SetServerAddr ¶
func SetServerAddr(address string)
SetServerAddr allows user to set the transport layer STUN server address
func SetServerHost ¶
SetServerHost allows user to set the STUN hostname and port
func SetSoftwareName ¶
func SetSoftwareName(name string)
SetSoftwareName allows user to set the name of her software
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.