Function handle_incoming
fn handle_incoming(
pkt: &Packet<'_>,
client: &mut Client<JournaledSession>,
outbound: &mut PacketWriter<GrowBuffer>,
pending: &mut Pending,
inbound_aliases: &mut InboundAliases,
outbound_aliases: &mut OutboundAliases,
pending_messages: &mut VecDeque<Message>,
) -> Option<(DisconnectReason, bool)>Available on crate feature
tokio only.Expand description
Handles one decoded inbound packet. The client state machine processes it and any response is enqueued. A received message is buffered for delivery to the application.
Buffering keeps protocol processing (acknowledgements, keep-alive) from
waiting on the application: the coordinator drains pending_messages to the
application separately and stops reading inbound packets once the buffer is
full.
Returns Some((reason, graceful)) when the connection should end.