8#include "PacketReader.hpp"
9#include "PacketWriter.hpp"
25 static constexpr std::size_t
SIZE = 4;
Bounds checked reader of big-endian values over a byte buffer.
Definition PacketReader.hpp:15
Growable buffer of big-endian values, capped at MAX_PAYLOAD_SIZE.
Definition PacketWriter.hpp:16
Payload of a Ping message, 4 bytes, sent by a client to measure latency.
Definition PingMessage.hpp:21
bool serialize(PacketWriter &writer) const
Writes the payload in network byte order.
Definition PingMessage.cpp:5
std::uint32_t timestamp
Sender defined time value.
Definition PingMessage.hpp:22
bool deserialize(PacketReader &reader)
Reads the payload from a buffer.
Definition PingMessage.cpp:9
static constexpr std::size_t SIZE
Encoded size of the payload, in bytes.
Definition PingMessage.hpp:25