Nexus Engine  v0.0.1
Loading...
Searching...
No Matches
Nexus::Network::Packet Class Referenceexport

Public Member Functions

 Packet (std::vector< byte > &storage) noexcept
template<typename T>
void Write (const T &value)
template<typename T>
bool Read (T &out)
bool ReadString (std::string &out)
std::span< const byteData () const noexcept
usize Remaining () const noexcept
void Reset () noexcept

Detailed Description

A read/write cursor over a byte buffer. Integral types go through Wire (big-endian on the wire); other trivially copyable types are copied raw.

Constructor & Destructor Documentation

◆ Packet()

Nexus::Network::Packet::Packet ( std::vector< byte > & storage)
inlineexplicitnoexcept

Member Function Documentation

◆ Data()

std::span< const byte > Nexus::Network::Packet::Data ( ) const
nodiscardnoexcept

◆ Read()

template<typename T>
bool Nexus::Network::Packet::Read ( T & out)
nodiscard

◆ ReadString()

bool Nexus::Network::Packet::ReadString ( std::string & out)
nodiscard

◆ Remaining()

usize Nexus::Network::Packet::Remaining ( ) const
nodiscardnoexcept

◆ Reset()

void Nexus::Network::Packet::Reset ( )
noexcept

◆ Write()

template<typename T>
void Nexus::Network::Packet::Write ( const T & value)

The documentation for this class was generated from the following files:
  • Source/Engine/Network/Serialization/Public/Packet.cppm
  • Source/Engine/Network/Serialization/Private/Packet.cpp
  • Source/Engine/Network/Serialization/Public/Packet.inl