Documentation ¶
Index ¶
- func GetPortFromAddr(addr string) (port int, err error)
- func GetUnique(netProto string) (port int, err error)
- func GetUniqueTCP() (port int, err error)
- func GetUniqueUDP() (port int, err error)
- func JoinHostPort(host string, port int) string
- func ReplacePortInAddr(addr, newPort string) (string, error)
- func Verify(netProto string, port int) (verifiedPort int, err error)
- func VerifyHostPort(netProto string, addr string) (verifiedAddr string, err error)
- func VerifyTCP(port int) (verifiedPort int, err error)
- func VerifyUDP(port int) (verifiedPort int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetPortFromAddr ¶
GetPortFromAddr is a helper function to quickly get the port from an addr string
func JoinHostPort ¶
JoinHostPort wrapper function for net.JoinHostPort to easily pass port as an int instead of a string
func ReplacePortInAddr ¶
ReplacePortInAddr takes an address string and replaces the port
func VerifyHostPort ¶
VerifyHostPort is a wrapper function for VerifyTCP to easily accept address string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.