Skip to main content

Module outbound

Module outbound 

Available on crate feature tokio only.
Expand description

Outbound command handling: turning user commands and stored session state into wire packets, limited by the server’s Receive Maximum and Maximum Packet Size.

Functions§

handle_command 🔒
Handles one user command on a live connection.
pump_session 🔒
Drains pending subscription groups, the outbox, and pending PUBRELs onto the outbound buffer via the client’s poll_transmit. It maps the per-packet events onto the user-facing futures:
register_ack 🔒
Tracks a recorded SUBSCRIBE/UNSUBSCRIBE’s completion future. The caller pumps the session afterwards, which puts the group on the wire and arms its ack deadline via TransmitEvent::SubscribeSent / TransmitEvent::UnsubscribeSent. Shared tail of send_subscribe and send_unsubscribe, which differ only in how packet_id is obtained.
send_publish 🔒
send_subscribe 🔒
send_unsubscribe 🔒