Documentation
¶
Overview ¶
Package conn implements underlay sockets.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // SendBufferSize is the size of the operating system send buffer, in bytes. // If zero, the operating system default is used. SendBufferSize int // ReceiveBufferSize is the size of the operating system receive buffer, in // bytes. ReceiveBufferSize int }
Config customizes the behavior of an underlay socket.
type Conn ¶
type Conn interface { ReadBatch(Messages) (int, error) WriteTo([]byte, netip.AddrPort) (int, error) WriteBatch(Messages, int) (int, error) LocalAddr() netip.AddrPort RemoteAddr() netip.AddrPort SetReadDeadline(time.Time) error SetWriteDeadline(time.Time) error SetDeadline(time.Time) error Close() error }
Conn describes the API for an underlay socket
type Messages ¶
Messages is a list of ipX.Messages. It is necessary to hide the type alias between ipv4.Message, ipv6.Message and socket.Message.
func NewReadMessages ¶
NewReadMessages allocates memory for reading IPv4 Linux network stack messages.
Click to show internal directories.
Click to hide internal directories.