netlib

package
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssignRandPort

func AssignRandPort(ip ...string) (int, error)

AssignRandPort 分配一个随机端口

func ExternalIP

func ExternalIP() (string, error)

ExternalIP 获取外网IP地址

func ExtractIP

func ExtractIP(addr net.Addr) (ip string, err error)

ExtractIP 提取主机地址

func ExtractPort

func ExtractPort(addr net.Addr) (int, error)

ExtractPort 提取主机端口

func FulfillAddr

func FulfillAddr(addr string) string

FulfillAddr 补全地址

func InternalIP

func InternalIP() (string, error)

InternalIP 获取内网IP地址

func ParseAddr

func ParseAddr(addr string) (listenAddr, exposeAddr string, err error)

ParseAddr 解析地址

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL