Enum cobalt::ServerEvent
[−]
[src]
pub enum ServerEvent { Connection(ConnectionID), ConnectionLost(ConnectionID, bool), ConnectionClosed(ConnectionID, bool), Message(ConnectionID, Vec<u8>), ConnectionCongestionStateChanged(ConnectionID, bool), PacketLost(ConnectionID, Vec<u8>), }
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
impl Debug for ServerEvent
[src]
impl PartialEq for ServerEvent
[src]
fn eq(&self, __arg_0: &ServerEvent) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &ServerEvent) -> bool
This method tests for !=
.