net

package
v0.0.0-...-c8b884f Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBuffer

func CopyBuffer(dst io.Writer, src io.Reader, bufSize int) error

func IsIPv4

func IsIPv4(address string) bool

func NewBufferReaderConn

func NewBufferReaderConn(conn net.Conn, br *bufio.Reader) net.Conn

func Transport

func Transport(rw1, rw2 io.ReadWriter) error

Types

type AddrPortRange

type AddrPortRange string

AddrPortRange is the network address with port range supported. e.g. 192.168.1.1:0-65535

func (AddrPortRange) Addrs

func (p AddrPortRange) Addrs() (addrs []string)

type PortRange

type PortRange struct {
	Min int
	Max int
}

Port range is a range of port list.

func (*PortRange) Contains

func (pr *PortRange) Contains(port int) bool

func (*PortRange) Parse

func (pr *PortRange) Parse(s string) error

Parse parses the s to PortRange. The s can be a single port number and will be converted to port range port-port.

type RemoteAddr

type RemoteAddr interface {
	RemoteAddr() net.Addr
}

type SetBuffer

type SetBuffer interface {
	SetReadBuffer(bytes int) error
	SetWriteBuffer(bytes int) error
}

type SetDSCP

type SetDSCP interface {
	SetDSCP(int) error
}

tcpraw.TCPConn

type SyscallConn

type SyscallConn interface {
	SyscallConn() (syscall.RawConn, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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