Enum raknet::PacketReliability
source · #[repr(u8)]pub enum PacketReliability {
Unreliable,
UnreliableSequenced,
Reliable,
ReliableOrdered,
ReliableSequenced,
// some variants omitted
}
Expand description
These enumerations are used to describe how packets are delivered. \note Note to self: I write this with 3 bits in the stream. If I add more remember to change that
Variants§
Unreliable
Same as regular UDP, except that it will also discard duplicate datagrams. RakNet adds (6 to 17) + 21 bits of overhead, 16 of which is used to detect duplicate packets and 6 to 17 of which is used for message length.
UnreliableSequenced
Regular UDP with a sequence counter. Out of order messages will be discarded. This adds an additional 13 bits on top what is used for UNRELIABLE.
Reliable
The message is sent reliably, but not necessarily in any order. Same overhead as UNRELIABLE.
ReliableOrdered
This message is reliable and will arrive in the order you sent it. Messages will be delayed while waiting for out of order messages. Same overhead as UNRELIABLE_SEQUENCED.
ReliableSequenced
This message is reliable and will arrive in the sequence you sent it. Out or order messages will be dropped. Same overhead as UNRELIABLE_SEQUENCED.
Trait Implementations§
source§impl Clone for PacketReliability
impl Clone for PacketReliability
source§fn clone(&self) -> PacketReliability
fn clone(&self) -> PacketReliability
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for PacketReliability
impl Debug for PacketReliability
source§impl Ord for PacketReliability
impl Ord for PacketReliability
source§fn cmp(&self, other: &PacketReliability) -> Ordering
fn cmp(&self, other: &PacketReliability) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere Self: Sized,
source§impl PartialEq<PacketReliability> for PacketReliability
impl PartialEq<PacketReliability> for PacketReliability
source§fn eq(&self, other: &PacketReliability) -> bool
fn eq(&self, other: &PacketReliability) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PacketReliability> for PacketReliability
impl PartialOrd<PacketReliability> for PacketReliability
source§fn partial_cmp(&self, other: &PacketReliability) -> Option<Ordering>
fn partial_cmp(&self, other: &PacketReliability) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more