Skip to main content

Module udp

Module udp 

Source
Expand description

UDP datagram sources, sinks, and flows.

TokioUdp mirrors Akka/Pekko’s connectionless UDP shape on top of tokio::net::UdpSocket: unconnected sockets emit Datagram values with the payload and remote peer, send sinks write one upstream datagram with one send_to, and connected sockets exchange plain Vec<u8> payloads with a single peer.

UDP has no reliable delivery and no end-to-end flow control. Datum keeps the receive side bounded; when the configured in-process buffer is full, additional datagrams are dropped instead of being buffered indefinitely. The operating system may also drop datagrams when its socket receive buffer fills. Applications that require reliable delivery must add their own acknowledgements, retries, sequencing, and loss handling above UDP.

Structs§

Datagram
One unconnected UDP datagram.
TokioUdp
UDP stream entry points backed by tokio::net::UdpSocket.
UdpBinding
A materialized UDP socket binding.
UdpConnection
A materialized connected UDP socket.

Constants§

DEFAULT_MAX_DATAGRAM_SIZE
Default maximum bytes read for a single UDP datagram.
DEFAULT_RECEIVE_BUFFER
Default number of received datagrams Datum buffers in-process per socket.

Type Aliases§

Udp
Alias for TokioUdp.