Documentation
¶
Overview ¶
Package udp implements UDP listeners as net.Listeners: every client, identified by its address, gets a conn of its own.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultListenConfig = ListenConfig{}
DefaultListenConfig is the config the dataplane listens with.
Functions ¶
This section is empty.
Types ¶
type ListenConfig ¶
type ListenConfig struct {
// Net is the network to listen on, nil for the OS network.
Net transport.Net
// ConnectBack connects a socket back to every client so the kernel demuxes; it needs
// reuse-port, so only the OS network can do it.
ConnectBack bool
// Admit, if set, decides on the first datagram of a source whether it gets a conn; the
// datagrams of a source it refuses are dropped.
Admit func(src net.Addr) bool
}
ListenConfig configures a UDP listener.