Documentation ¶
Index ¶
- func Extract(hostPort string, lis net.Listener) (string, error)
- func ExtractHostPort(addr string) (host string, port uint64, err error)
- func GenerateIpAndPort(ipAddress *string, portAddress *int)
- func GetCommandLineIpAndPort(defaultIp string, defaultPort int) (string, int)
- func GetFreePort() (int, error)
- func IsValidIP(addr string) bool
- func IsValidPort(port int) bool
- func ParseHostAndPort(endpoint string) (host string, port string, err error)
- func Port(lis net.Listener) (int, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractHostPort ¶
ExtractHostPort from address
func GenerateIpAndPort ¶
GenerateIpAndPort 生成默认的ip和地址
func GetCommandLineIpAndPort ¶
GetCommandLineIpAndPort 获取命令行的ip和地址
func IsValidPort ¶
IsValidPort check if the port is legal. 0 is considered as a non valid port.
func ParseHostAndPort ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.