Expand description
The socket handler: an I/O-agnostic multiplexer of SOE sessions over a single UDP socket, plus a thin, dependency-free transport adapter to drive it.
This ports the reference SoeSocketHandler, restructured to keep the core a
pure state machine. SoeMultiplexer owns no socket: it accepts incoming
datagrams tagged with their remote address via
SoeMultiplexer::process_incoming, surfaces datagrams to send (each tagged
with a destination address) via SoeMultiplexer::take_outgoing, and surfaces
session lifecycle and data events via SoeMultiplexer::take_events. Time is
supplied by the caller as an Instant.
The multiplexer is generic over the address type so that it never depends on any
particular socket implementation. For convenience, UdpTransport abstracts a
non-blocking UDP socket and SoeMultiplexer::drive runs a single
read/tick/send step over any such transport — including the blanket
implementation provided here for std::net::UdpSocket, which pulls in no async
runtime.
Structs§
- Socket
Config - Options controlling a
SoeMultiplexer. - SoeMultiplexer
- an I/O-agnostic multiplexer of SOE sessions, keyed by remote address.
Enums§
- Socket
Event - An event surfaced by a
SoeMultiplexer, tagged with the remote it concerns.
Traits§
- Remote
Addr - An address that can key a session in a
SoeMultiplexer. - SoeSocket
- A driver-agnostic surface for managing SOE sessions over a UDP socket.
- UdpTransport
- A non-blocking UDP transport that a
SoeMultiplexercan be driven over.