Skip to main content

Module datagram

Module datagram 

Source
Expand description

Two connected ends that carry whole datagrams: a Unix datagram socket pair, or on Windows a pipe only this process joined ([crate::link::pair]) with each datagram written behind its length, so a datagram is read whole however the pipe splits its bytes. A caller hands one end to a process or thread it starts and keeps the other; [crate::tokio::Datagram] drives an end on a runtime.

One thread reads an end at a time: on Windows a datagram is a header and its bytes, and two readers of one end would split them.

Structs§

Datagram
One end of a connected datagram pair.

Constants§

MAX_DATAGRAM
The largest datagram an end carries: the largest UDP payload.