packetconn

package
v0.2.22 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UDPIOBatchSize = 128
)

Variables

This section is empty.

Functions

func NewDialer added in v0.2.14

func NewDialer(gro bool) *net.Dialer

func NewListener added in v0.2.14

func NewListener(gro bool) *net.ListenConfig

Types

type ErrUDPGSODisabled

type ErrUDPGSODisabled struct {
	RetryErr error
	// contains filtered or unexported fields
}

func (ErrUDPGSODisabled) Error

func (e ErrUDPGSODisabled) Error() string

func (ErrUDPGSODisabled) Unwrap

func (e ErrUDPGSODisabled) Unwrap() error

type UDPConnWrapper

type UDPConnWrapper struct {
	*net.UDPConn
	// contains filtered or unexported fields
}

This class is not thread-safe. I/O requires sequential operation.

func NewUDPConnWrapper

func NewUDPConnWrapper(conn *net.UDPConn) *UDPConnWrapper

func (*UDPConnWrapper) ConsumeBuffer

func (c *UDPConnWrapper) ConsumeBuffer(ba *bufferio.BufferArray) error

func (*UDPConnWrapper) ConsumeBufferWithAddr

func (c *UDPConnWrapper) ConsumeBufferWithAddr(ba *bufferio.BufferArray, addr *net.UDPAddr) error

func (*UDPConnWrapper) ProduceBuffer

func (c *UDPConnWrapper) ProduceBuffer(ba *bufferio.BufferArray, offset int) error

func (*UDPConnWrapper) ProduceBufferWithAddr

func (c *UDPConnWrapper) ProduceBufferWithAddr(ba *bufferio.BufferArray, offset int, addrs []net.Addr) error

func (*UDPConnWrapper) SupportBufferIO

func (*UDPConnWrapper) SupportBufferIO() bool

Jump to

Keyboard shortcuts

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