Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAddresses ¶
GetAddresses returns a slice of all detected external addresses or an error if any
Types ¶
type Addr ¶
Addr is an interface for net.Addr.
func MustNewAddr ¶
MustNewAddr does the same as NewAddr but returns an empty main address as "::"
func NewAddr ¶
NewAddr build a new Addr pointer with all addresses for every network interfaces with the first external IP as default or an error if any
func (*Addr) AddAddrAndSwitch ¶
AddAddrAndSwitch does the same as AddAddr but switch to the new address as main address
func (*Addr) ForListenerBroadcast ¶
ForListenerBroadcast can be used for listeners to listen on any interfaces at the registered port
func (*Addr) SwitchMain ¶
SwitchMain switch the default address returned by Addr which is the port of the net.Addr interface
Click to show internal directories.
Click to hide internal directories.