Documentation ¶
Overview ¶
Package netutil provides utility functions extending the stdnet package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckUDP ¶
CheckUDP checks whether data send to remote is received at local, otherwise an error is returned. If checkAddress is set, it checks whether the IP address that was on the packet matches remote. If checkPort is set, it checks whether the port that was on the packet matches remote.
func GetPublicIP ¶
GetPublicIP queries the ipify API for the public IP address.
func IsTemporaryError ¶
IsTemporaryError checks whether the given error should be considered temporary.
func IsValidPort ¶
IsValidPort returns true if port is a valid port number.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.