net

package
v0.0.0-...-19b7a19 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address interface {
	IP() net.IP
	Domain() string
	Family() AddressFamily
	String() string
}

func DomainAddress

func DomainAddress(domain string) Address

func IPAddress

func IPAddress(ip []byte) Address

func ParseAddress

func ParseAddress(addr string) Address

type AddressFamily

type AddressFamily byte
const (
	AddressFamilyIPv4 AddressFamily = iota
	AddressFamilyIPv6
	AddressFamilyDomain
)

type AddressPort

type AddressPort struct {
	Address Address
	Port    Port
}

func (AddressPort) String

func (ap AddressPort) String() string

type Destination

type Destination struct {
	Address Address
	Port    Port
	Network Network
}

func TCPDestination

func TCPDestination(address Address, port Port) Destination

func UDPDestination

func UDPDestination(address Address, port Port) Destination

func (Destination) AddressPort

func (d Destination) AddressPort() AddressPort

type Network

type Network byte
const (
	Network_TCP Network = iota
	Network_UDP
)

type Port

type Port uint16

Jump to

Keyboard shortcuts

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