Enum netcode::ServerEvent
[−]
[src]
pub enum ServerEvent { ClientConnect(u64), ClientDisconnect(u64), ClientSlotFull, Packet(u64, usize), SentKeepAlive(u64), RejectedClient, ReplayRejected(u64), }
Describes event the server receives when calling next_event(..)
.
Variants
ClientConnect(u64)
A client has connected, contains a reference to the client that was just created. out_packet
contains private user data from token.
ClientDisconnect(u64)
A client has disconnected, contains the client that was just disconnected.
ClientSlotFull
Called when client tries to connect but all slots are full.
Packet(u64, usize)
We received a packet, out_packet
will be filled with data based on usize
, contains the client id that reieved the packet and length of the packet.
SentKeepAlive(u64)
We received a keep alive packet with included client id.
RejectedClient
Client failed connection token validation
ReplayRejected(u64)
Replay detection heard duplicate packet and rejected it.