fsnet

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// NetworkTCP tcp network
	NetworkTCP        = "tcp"
	NetworkTCP4       = "tcp4"
	NetworkTCP6       = "tcp6"
	NetworkUDP        = "udp"
	NetworkUDP4       = "udp4"
	NetworkUDP6       = "udp6"
	NetworkIP         = "ip"
	NetworkIP4        = "ip4"
	NetworkIP6        = "ip6"
	NetworkUnix       = "unix"
	NetworkUnixGram   = "unixgram"
	NetworkUnixPacket = "unixpacket"
)

所有的 Network 定义

Variables

This section is empty.

Functions

This section is empty.

Types

type Interfaces

type Interfaces struct {
}

Interfaces system's network interface helper

func (*Interfaces) Addrs

func (itf *Interfaces) Addrs() ([]net.Addr, error)

Addrs a list of the system's all network interface's addrs

func (*Interfaces) IPs

func (itf *Interfaces) IPs() ([]net.IP, error)

IPs a list of system's all network ips

func (*Interfaces) IPv4s

func (itf *Interfaces) IPv4s() ([]net.IP, error)

IPv4s a list of system's all network ipv4s

func (*Interfaces) IPv6s

func (itf *Interfaces) IPv6s() ([]net.IP, error)

IPv6s a list of system's all network ipv6s

type Network

type Network string

Network dialer and resolver network types

func (Network) IsIP

func (nt Network) IsIP() bool

IsIP 是否 ip 类型的(ip、ip4、ip6)

func (Network) Resolver

func (nt Network) Resolver() Network

Resolver 转换为 Resolver 所需要的类型

tcp->ip,tcp4->ip4, tcp6->ip6
udp->ip,udp4->ip4, udp6->ip6
其他类型原样返回

func (Network) String

func (nt Network) String() string

String 字符串类型

Directories

Path Synopsis
conndump
Package conndump 提供通用的流量 dump 的功能
Package conndump 提供通用的流量 dump 的功能

Jump to

Keyboard shortcuts

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