pub struct UnconnectedPing {
pub timestamp: u64,
pub magic: Magic,
pub client_id: i64,
}
Expand description
Send to the other peer expecting a UnconnectedPong
packet,
this is used to determine the latency between the client and the server,
and to determine if the server is online.
If the peer does not respond with a UnconnectedPong
packet, the iniatior should
expect that the server is offline.
Fields§
§timestamp: u64
§magic: Magic
§client_id: i64
Trait Implementations§
Source§impl Clone for UnconnectedPing
impl Clone for UnconnectedPing
Source§fn clone(&self) -> UnconnectedPing
fn clone(&self) -> UnconnectedPing
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for UnconnectedPing
impl Debug for UnconnectedPing
Source§impl From<OfflinePacket> for UnconnectedPing
impl From<OfflinePacket> for UnconnectedPing
Source§fn from(packet: OfflinePacket) -> Self
fn from(packet: OfflinePacket) -> Self
Converts to this type from the input type.
Source§impl From<RakPacket> for UnconnectedPing
impl From<RakPacket> for UnconnectedPing
Source§impl From<UnconnectedPing> for OfflinePacket
impl From<UnconnectedPing> for OfflinePacket
Source§fn from(packet: UnconnectedPing) -> Self
fn from(packet: UnconnectedPing) -> Self
Converts to this type from the input type.
Source§impl From<UnconnectedPing> for RakPacket
impl From<UnconnectedPing> for RakPacket
Source§fn from(packet: UnconnectedPing) -> Self
fn from(packet: UnconnectedPing) -> Self
Converts to this type from the input type.
Source§impl Reader<UnconnectedPing> for UnconnectedPing
impl Reader<UnconnectedPing> for UnconnectedPing
Source§fn read(_binary_readerr: &mut ByteReader) -> Result<UnconnectedPing, Error>
fn read(_binary_readerr: &mut ByteReader) -> Result<UnconnectedPing, Error>
Source§impl Writer for UnconnectedPing
impl Writer for UnconnectedPing
Source§fn write_to_bytes(&self) -> Result<ByteWriter, Error>
fn write_to_bytes(&self) -> Result<ByteWriter, Error>
This is a utility function to write
Self
to a ByteWriter
without
needing to create a ByteWriter
first.Auto Trait Implementations§
impl Freeze for UnconnectedPing
impl RefUnwindSafe for UnconnectedPing
impl Send for UnconnectedPing
impl Sync for UnconnectedPing
impl Unpin for UnconnectedPing
impl UnwindSafe for UnconnectedPing
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