Ult3D
Implementation of "Ultimate 3D Game Engine Design & Architecture" by Allan Sherrod
|
#include <Packet.h>
Public Member Functions | |
Packet (NetPacketValue usage, NetPacketValue id, const char *data, int size) | |
~Packet () | |
int | GetPacketSize () const |
NetPacketValue | GetUsage () const |
NetPacketValue | GetId () const |
NetPacketValue * | GetData () |
int | GetDataSize () |
Wraps data to be sent over the network.
Ult::Packet::Packet | ( | NetPacketValue | usage, |
NetPacketValue | id, | ||
const char * | data, | ||
int | size ) |
Packet constructor.
usage | Category value for the packet, e.g. NetSystemUsage or custom. |
id | Identifier/Type value for the packet, e.g. NetMsgType. |
data | Packet data bytes, max length is MAX_PACKET_SIZE. Copied internally. |
size | The number of packet data bytes. |
Ult::Packet::~Packet | ( | ) |
Packet destructor.
|
inline |
Returns a pointer to the packet data.
int Ult::Packet::GetDataSize | ( | ) |
Returns the size of the packet data in bytes.
|
inline |
Returns the packet Id type value.
|
inline |
Returns the size in bytes of 1 Packet instance.
|
inline |
Returns the packet usage value.