3#include <StormByte/network/typedefs.hxx>
21 class STORMBYTE_NETWORK_PUBLIC
Packet {
58 const
unsigned short& Opcode() const noexcept;
75 virtual Buffer::Consumer Serialize() const noexcept;
82 Packet(const
unsigned short& opcode) noexcept;
92 const
unsigned short m_opcode;
The class representing an error in the packet.
Definition exception.hxx:51
Represents a network packet.
Definition packet.hxx:21
Packet(const Packet &other)=default
Copy constructor.
virtual ~Packet() noexcept=default
Destructor.
Packet(Packet &&other) noexcept=default
Move constructor.
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:38
std::function< ExpectedBuffer(const size_t &)> PacketReaderFunction
The packet reader function type.
Definition typedefs.hxx:40
std::function< std::shared_ptr< Packet >(const unsigned short &)> PacketInstanceFunction
The packet instance function type.
Definition typedefs.hxx:39