Expand description
Core TCP state machine.
Adapter owns the underlying transport and manages all TCP connections.
It is the entry point for both usage patterns exposed by this crate:
- Single-task use: keep the
Adapterdirectly and open streams withcrate::tcp::stream::AdapterStream::connect. - Multi-task use: call
Adapter::to_async_handleto move the adapter into a background task and obtain ancrate::tcp::handle::AdapterHandlethat can be shared across threads.
See the crate-level documentation for a full comparison.
Structsยง
- Adapter
- UdpDatagram
- A received UDP datagram, addressed from
peer_ip:source_portto the localdestination_port. UDP is connectionless, so there is no socket state beyond the set of bound local ports.