Helper to read network data.
More...
#include <reader.hpp>
|
|
static std::expected< std::uint16_t, error_code > | read_uint16 (std::span< const std::byte > &data) |
| | Helper to read a 16-bit integer in network byte order.
|
| |
|
static std::expected< std::uint32_t, error_code > | read_uint32 (std::span< const std::byte > &data) |
| | Helper to read a 32-bit integer in network byte order.
|
| |
|
static std::expected< std::int64_t, error_code > | read_int64 (std::span< const std::byte > &data) |
| | Helper to read a 64-bit integer in network byte order.
|
| |
|
static void | write_uuid (std::vector< std::byte > &buffer, const boost::uuids::uuid &uuid) |
| | Helper to write a UUID (16 bytes).
|
| |
|
static std::expected< std::string, error_code > | read_string (std::span< const std::byte > &data) |
| | Helper to read a string with 16-bit length prefix.
|
| |
|
static std::expected< boost::uuids::uuid, error_code > | read_uuid (std::span< const std::byte > &data) |
| | Helper to read a UUID (16 bytes).
|
| |
|
static std::expected< bool, error_code > | read_bool (std::span< const std::byte > &data) |
| | Helper to read a boolean (1 byte).
|
| |
Helper to read network data.