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 { // 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 { ReadFrom([]byte) (int, *net.UDPAddr, error) ReadBatch(Messages) (int, error) Write([]byte) (int, error) WriteTo([]byte, *net.UDPAddr) (int, error) WriteBatch(Messages, int) (int, error) LocalAddr() *net.UDPAddr RemoteAddr() *net.UDPAddr 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.