pub enum ServerEvent {
Connection(ConnectionID),
ConnectionLost(ConnectionID, bool),
ConnectionClosed(ConnectionID, bool),
Message(ConnectionID, Vec<u8>),
ConnectionCongestionStateChanged(ConnectionID, bool),
PacketLost(ConnectionID, Vec<u8>),
}
Expand description
Enum of server network events.
Variants§
Connection(ConnectionID)
Event emitted once a new client connection has been established.
ConnectionLost(ConnectionID, bool)
Event emitted when a existing client connection is lost.
The contained boolean indicates whether the connection was lost due to
an isse the remote end, if the value is false
instead, then a local
issue caused the connection to be lost.
ConnectionClosed(ConnectionID, bool)
Event emitted when a client connection is closed programmatically.
The contained boolean indicates whether the connection was closed by the
remote end, if the value is false
instead, then the connection was
closed locally.
Message(ConnectionID, Vec<u8>)
Event emitted for each message received from a client connection.
ConnectionCongestionStateChanged(ConnectionID, bool)
Event emitted each time a client’s connection congestion state changes.
PacketLost(ConnectionID, Vec<u8>)
Event emitted each time a client connection packet is lost.
Trait Implementations§
Source§impl Debug for ServerEvent
impl Debug for ServerEvent
Source§impl PartialEq for ServerEvent
impl PartialEq for ServerEvent
impl StructuralPartialEq for ServerEvent
Auto Trait Implementations§
impl Freeze for ServerEvent
impl RefUnwindSafe for ServerEvent
impl Send for ServerEvent
impl Sync for ServerEvent
impl Unpin for ServerEvent
impl UnwindSafe for ServerEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more