pub struct UnconnectedPong {
pub timestamp: u64,
pub server_id: u64,
pub magic: Magic,
}
Expand description
Sent in response to a UnconnectedPing
packet.
This is used to determine the latency between the client and the server, and to determine
that the peer is online.
Note:
If the client is a Minecraft: Bedrock Edition client, this packet is not sent
and the
UnconnectedPong
from the mcpe
module is sent instead.
Fields§
§timestamp: u64
§server_id: u64
§magic: Magic
Trait Implementations§
Source§impl Clone for UnconnectedPong
impl Clone for UnconnectedPong
Source§fn clone(&self) -> UnconnectedPong
fn clone(&self) -> UnconnectedPong
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 UnconnectedPong
impl Debug for UnconnectedPong
Source§impl From<OfflinePacket> for UnconnectedPong
impl From<OfflinePacket> for UnconnectedPong
Source§fn from(packet: OfflinePacket) -> Self
fn from(packet: OfflinePacket) -> Self
Converts to this type from the input type.
Source§impl From<RakPacket> for UnconnectedPong
impl From<RakPacket> for UnconnectedPong
Source§impl From<UnconnectedPong> for OfflinePacket
impl From<UnconnectedPong> for OfflinePacket
Source§fn from(packet: UnconnectedPong) -> Self
fn from(packet: UnconnectedPong) -> Self
Converts to this type from the input type.
Source§impl From<UnconnectedPong> for RakPacket
impl From<UnconnectedPong> for RakPacket
Source§fn from(packet: UnconnectedPong) -> Self
fn from(packet: UnconnectedPong) -> Self
Converts to this type from the input type.
Source§impl Reader<UnconnectedPong> for UnconnectedPong
impl Reader<UnconnectedPong> for UnconnectedPong
Source§fn read(_binary_readerr: &mut ByteReader) -> Result<UnconnectedPong, Error>
fn read(_binary_readerr: &mut ByteReader) -> Result<UnconnectedPong, Error>
Source§impl Writer for UnconnectedPong
impl Writer for UnconnectedPong
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 UnconnectedPong
impl RefUnwindSafe for UnconnectedPong
impl Send for UnconnectedPong
impl Sync for UnconnectedPong
impl Unpin for UnconnectedPong
impl UnwindSafe for UnconnectedPong
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