xnet

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2022 License: Apache-2.0 Imports: 5 Imported by: 13

Documentation

Index

Constants

View Source
const StaticLocalIP = "127.0.0.1"

Variables

View Source
var (
	RetryTimes int           = 10
	Interval   time.Duration = time.Second * 5
)

Functions

func GetLocalIP

func GetLocalIP(masks ...string) string

GetLocalIP 获取IP地址

func IsLocalIPv4

func IsLocalIPv4(ip net.IP) bool

ipv4:IsLocalIP 检测IP地址是否内网

func IsLocalIPv4Addr

func IsLocalIPv4Addr(ip string) bool

ipv4: IsLocalIP 检测IP地址是否内网

func Parse

func Parse(addr string) (proto, name string, err error)

解析协议信息(proto://name)

Types

This section is empty.

Jump to

Keyboard shortcuts

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