Packet
The Packet class is a nested class of Reader
Public member functions
//Construct a new Packet
Packet(std::shared_ptr<Client> client, const Stream &data, int instruction);
//Destruct the Packet
~Packet();
//Get a pointer the client that send the packet
std::shared_ptr<Client> getClient() const;
//Get the instruction of the packet
int getInstruction() const;
//Get the data of the packet
Stream &getData();Private attributes
//The client that send the packet
std::shared_ptr<Client> _client;
//The binary data
Stream _data;
//The instruction
int _instruction;Member functions documentation
Constructor
Parameters
clienta shared pointer to the client that send the packetdataa binary Streaminstructionthe packet instruction
getClient
return the pointer to the client that send the packet
getinstruction
return the packet's intsruction
getData
return the packet's data
Last updated