Enum naia_shared::PacketType
source · [−]#[repr(u8)]
pub enum PacketType {
Data,
Heartbeat,
ClientChallengeRequest,
ServerChallengeResponse,
ClientConnectRequest,
ServerConnectResponse,
Ping,
Pong,
Unknown,
}Expand description
An enum representing the different types of packets that can be sent/received
Variants
Data
A packet containing Message/Entity/Component data
Heartbeat
A packet sent to maintain the connection by preventing a timeout
ClientChallengeRequest
An initial handshake message sent by the Client to the Server
ServerChallengeResponse
The Server’s response to the Client’s initial handshake message
ClientConnectRequest
The final handshake message sent by the Client
ServerConnectResponse
The final handshake message sent by the Server, indicating that the connection has been established
Ping
A Ping message, used to calculate RTT. Must be responded to with a Pong message
Pong
A Pong message, used to calculate RTT. Must be the response to all Ping messages
Unknown
An unknown packet type
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PacketType
impl Send for PacketType
impl Sync for PacketType
impl Unpin for PacketType
impl UnwindSafe for PacketType
Blanket Implementations
Mutably borrows from an owned value. Read more