StormByte C++ Library: Network module 0.0.9999
StormByte-Network is a StormByte library module for handling and create network connections
|
The class representing a packet. Explicitelly instantiate this class to get packets identified by their opcode The buffer should contain the opcode and the data. More...
#include <packet.hxx>
Public Member Functions | |
Packet (const Packet &other)=default | |
The copy constructor of the Packet class. | |
Packet (Packet &&other) noexcept=default | |
The move constructor of the Packet class. | |
virtual | ~Packet () noexcept=default |
The destructor of the Packet class. | |
Packet & | operator= (const Packet &other)=default |
The assignment operator of the Packet class. | |
Packet & | operator= (Packet &&other) noexcept=default |
The move assignment operator of the Packet class. | |
const Buffer::ConstByteSpan | Data () const noexcept |
The function to get the opcode of the packet. | |
const unsigned short & | Opcode () const noexcept |
The function to get the opcode of the packet. | |
Static Public Member Functions | |
static ExpectedPacket | Read (const PacketInstanceFunction &pif, PacketReaderFunction reader) noexcept |
The function to get the packet instance. | |
Protected Member Functions | |
Packet (const unsigned short &opcode) noexcept | |
virtual Expected< void, PacketError > | Initialize (PacketReaderFunction reader) noexcept=0 |
The function to initialize the packet. | |
Protected Attributes | |
Buffer::Simple | m_buffer |
The data buffer of the packet. | |
The class representing a packet. Explicitelly instantiate this class to get packets identified by their opcode The buffer should contain the opcode and the data.
|
default |
|
defaultnoexcept |
|
noexcept |
The function to get the opcode of the packet.
|
protectedpure virtualnoexcept |
The function to initialize the packet.
|
noexcept |
The function to get the opcode of the packet.
|
staticnoexcept |
The function to get the packet instance.
pif | The packet instance function. |
client | The client socket. |