pub enum InputEvent {
PacketReceived(PacketReceived),
AbortStreamsFrom(ParticipantIdentity),
AbortAllStreams,
QueryOpenStreamCount(Sender<usize>),
Shutdown,
}Expand description
An event fed into [IncomingStreamManager::run] by the host crate. Each corresponds to an
inbound data-stream packet (or a lifecycle signal) and carries everything the manager needs to
process it without reaching back into room state.
Variants§
PacketReceived(PacketReceived)
AbortStreamsFrom(ParticipantIdentity)
Abort every open stream sent by this participant (they disconnected mid-send).
AbortAllStreams
Abort every open stream (e.g. the local connection is going away). Unlike
InputEvent::Shutdown, the run loop keeps going so streams opened later are still handled.
QueryOpenStreamCount(Sender<usize>)
Reply with the number of currently open streams (registered by a header and awaiting more packets). Processed in order with the other events, so the answer reflects everything enqueued before it.
Shutdown
Stop the run loop.
Trait Implementations§
Source§impl From<PacketReceived> for InputEvent
Convert into PacketReceived variant.
impl From<PacketReceived> for InputEvent
Convert into PacketReceived variant.
Source§fn from(v: PacketReceived) -> Self
fn from(v: PacketReceived) -> Self
Source§impl From<ParticipantIdentity> for InputEvent
Convert into AbortStreamsFrom variant.
impl From<ParticipantIdentity> for InputEvent
Convert into AbortStreamsFrom variant.