Skip to content

Class Engine::Network::ByteReader

ClassList > Engine > Network > ByteReader

Zero-copy binary buffer reader for safe network packet deserialization.

  • #include <ByteStream.hpp>

Public Functions

Type Name
ByteReader (const uint8_t * data, size_t size) noexcept
bool HasMore () noexcept const
size_t Offset () noexcept const
bool Read (T & out) noexcept
bool ReadBytes (uint8_t * out, size_t count) noexcept
bool ReadString (std::string & out)
size_t Remaining () noexcept const
void Reset () noexcept

Public Functions Documentation

function ByteReader

inline Engine::Network::ByteReader::ByteReader (
    const uint8_t * data,
    size_t size
) noexcept

function HasMore

inline bool Engine::Network::ByteReader::HasMore () noexcept const

function Offset

inline size_t Engine::Network::ByteReader::Offset () noexcept const

function Read

template<typename T>
inline bool Engine::Network::ByteReader::Read (
    T & out
) noexcept

function ReadBytes

inline bool Engine::Network::ByteReader::ReadBytes (
    uint8_t * out,
    size_t count
) noexcept

function ReadString

inline bool Engine::Network::ByteReader::ReadString (
    std::string & out
) 

function Remaining

inline size_t Engine::Network::ByteReader::Remaining () noexcept const

function Reset

inline void Engine::Network::ByteReader::Reset () noexcept


The documentation for this class was generated from the following file /home/runner/work/r-type/r-type/Engine/include/Network/ByteStream.hpp