control

package
v0.4.0-beta.8 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: GPL-2.0 Imports: 10 Imported by: 134

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BindToInterface0

func BindToInterface0(finder InterfaceFinder, conn syscall.RawConn, network string, address string, interfaceName string, interfaceIndex int, preferInterfaceName bool) error

func Conn

func Conn(conn syscall.Conn, block func(fd uintptr) error) error

func Raw

func Raw(rawConn syscall.RawConn, block func(fd uintptr) error) error

func SetKeepAlivePeriod added in v0.4.0

func SetKeepAlivePeriod(conn *net.TCPConn, initial time.Duration, interval time.Duration) error

Types

type Func

type Func = func(network, address string, conn syscall.RawConn) error

func Append

func Append(oldFunc Func, newFunc Func) Func

func BindToInterface

func BindToInterface(finder InterfaceFinder, interfaceName string, interfaceIndex int) Func

func BindToInterfaceFunc

func BindToInterfaceFunc(finder InterfaceFinder, block func(network string, address string) (interfaceName string, interfaceIndex int, err error)) Func

func DisableUDPFragment

func DisableUDPFragment() Func

func ProtectPath

func ProtectPath(protectPath string) Func

func ReuseAddr

func ReuseAddr() Func

func RoutingMark

func RoutingMark(mark int) Func

type InterfaceFinder

type InterfaceFinder interface {
	InterfaceIndexByName(name string) (int, error)
	InterfaceNameByIndex(index int) (string, error)
}

func DefaultInterfaceFinder

func DefaultInterfaceFinder() InterfaceFinder

Jump to

Keyboard shortcuts

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