3#include <StormByte/network/typedefs.hxx>
18 class STORMBYTE_NETWORK_PUBLIC
Packet {
55 const Buffer::ConstByteSpan Data() const noexcept;
61 const
unsigned short& Opcode() const noexcept;
72 Buffer::Simple m_buffer;
74 Packet(const
unsigned short& opcode) noexcept;
83 const
unsigned short m_opcode;
The class representing an error in the packet.
Definition exception.hxx:51
The class representing a packet. Explicitelly instantiate this class to get packets identified by the...
Definition packet.hxx:18
Packet(const Packet &other)=default
The copy constructor of the Packet class.
virtual ~Packet() noexcept=default
The destructor of the Packet class.
Packet(Packet &&other) noexcept=default
The move constructor of the Packet class.
The namespace containing read items.
Contains all the network-related classes and utilities.
Definition client.hxx:10
StormByte::Expected< std::shared_ptr< Packet >, PacketError > ExpectedPacket
The expected packet type.
Definition typedefs.hxx:37
std::function< ExpectedBuffer(const size_t &)> PacketReaderFunction
The packet reader function type.
Definition typedefs.hxx:39
std::function< std::shared_ptr< Packet >(const unsigned short &)> PacketInstanceFunction
The packet instance function type.
Definition typedefs.hxx:38