Documentation
¶
Index ¶
- func ClientIP(r *http.Request) string
- func ExtractIP(addr net.Addr) net.IP
- func ExtractPort(addr net.Addr) int
- func GlobalUnicastIP() (net.IP, error)
- func GlobalUnicastIPString() (string, error)
- func IPs() []net.IP
- func InterfaceIPs(name string) ([]net.IP, error)
- func InterfaceIPv4(name string) (net.IP, error)
- func PickFreePort() (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GlobalUnicastIP ¶
GlobalUnicastIP get a global unicast IP address
func GlobalUnicastIPString ¶
GlobalUnicastIPString get a global unicast IP address string
func InterfaceIPs ¶
InterfaceIPs get public IP addresses by interface name
func InterfaceIPv4 ¶
InterfaceIPv4 get a public IPv4 address
func PickFreePort ¶
PickFreePort automatically chose a free port and return it
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.