Versions in this module Expand all Collapse all v0 v0.0.20241020 Oct 20, 2024 v0.0.20240223 Feb 23, 2024 Changes in this version + const IdealBatchSize + const StdNetSupportsStickySockets + var ErrBindAlreadyOpen = errors.New("bind is already open") + var ErrWrongEndpointType = errors.New("endpoint type does not correspond with bind type") + type Bind interface + BatchSize func() int + Close func() error + Open func(port uint16) (fns []ReceiveFunc, actualPort uint16, err error) + ParseEndpoint func(s string) (Endpoint, error) + Send func(bufs [][]byte, ep Endpoint) error + SetMark func(mark uint32) error + func NewDefaultBind() Bind + func NewStdNetBind() Bind + func NewWinRingBind() Bind + type BindSocketToInterface interface + BindSocketToInterface4 func(interfaceIndex uint32, blackhole bool) error + BindSocketToInterface6 func(interfaceIndex uint32, blackhole bool) error + type Endpoint interface + ClearSrc func() + DstIP func() netip.Addr + DstToBytes func() []byte + DstToString func() string + SrcIP func() netip.Addr + SrcToString func() string + type ErrUDPGSODisabled struct + RetryErr error + func (e ErrUDPGSODisabled) Error() string + func (e ErrUDPGSODisabled) Unwrap() error + type PeekLookAtSocketFd interface + PeekLookAtSocketFd4 func() (fd int, err error) + PeekLookAtSocketFd6 func() (fd int, err error) + type ReceiveFunc func(packets [][]byte, sizes []int, eps []Endpoint) (n int, err error) + func (fn ReceiveFunc) PrettyName() string + type StdNetBind struct + func (*StdNetBind) ParseEndpoint(s string) (Endpoint, error) + func (s *StdNetBind) BatchSize() int + func (s *StdNetBind) BindSocketToInterface4(interfaceIndex uint32, blackhole bool) error + func (s *StdNetBind) BindSocketToInterface6(interfaceIndex uint32, blackhole bool) error + func (s *StdNetBind) Close() error + func (s *StdNetBind) Open(uport uint16) ([]ReceiveFunc, uint16, error) + func (s *StdNetBind) Send(bufs [][]byte, endpoint Endpoint) error + func (s *StdNetBind) SetMark(mark uint32) error + type StdNetEndpoint struct + func (e *StdNetEndpoint) ClearSrc() + func (e *StdNetEndpoint) DstIP() netip.Addr + func (e *StdNetEndpoint) DstToBytes() []byte + func (e *StdNetEndpoint) DstToString() string + func (e *StdNetEndpoint) SrcIP() netip.Addr + func (e *StdNetEndpoint) SrcIfidx() int32 + func (e *StdNetEndpoint) SrcToString() string + type WinRingBind struct — windows/amd64 + func (*WinRingBind) ParseEndpoint(s string) (Endpoint, error) + func (bind *WinRingBind) BatchSize() int + func (bind *WinRingBind) BindSocketToInterface4(interfaceIndex uint32, blackhole bool) error + func (bind *WinRingBind) BindSocketToInterface6(interfaceIndex uint32, blackhole bool) error + func (bind *WinRingBind) Close() error + func (bind *WinRingBind) Open(port uint16) (recvFns []ReceiveFunc, selectedPort uint16, err error) + func (bind *WinRingBind) Send(bufs [][]byte, endpoint Endpoint) error + func (bind *WinRingBind) SetMark(mark uint32) error + type WinRingEndpoint struct — windows/amd64 + func (*WinRingEndpoint) ClearSrc() + func (e *WinRingEndpoint) DstIP() netip.Addr + func (e *WinRingEndpoint) DstToBytes() []byte + func (e *WinRingEndpoint) DstToString() string + func (e *WinRingEndpoint) SrcIP() netip.Addr + func (e *WinRingEndpoint) SrcToString() string