#include <clientpacket.h>
Inheritance diagram for ClientPacket:
Public Member Functions | ||||
ClientPacket (char *data, unsigned int size) | ||||
Constructor used when receiving packets. | ||||
ClientPacket (const ClientData *fdata, unsigned char type=4, unsigned char priority=1, bool reliable=false) | ||||
Constructor used when client-data is signaling back. | ||||
~ClientPacket () | ||||
void | makeSendReady () | |||
This method makes the packet ready for sending (htonl(...) is called on header fields). | ||||
unsigned int | getUserID () const | |||
Will return the ID of the user for whom that packet is from/to. | ||||
Readers | ||||
| ||||
template<class T> | ||||
void | readPtr (ClientData *receiver, T **ptrptr, ClientFramework *framework) | |||
The class T must be a subclass of ClientData. | ||||
template<class T> | ||||
T * | readObject (ClientFramework *f) | |||
The class T must be a subclass of ClientData. | ||||
ClientPacket * | readPacket (unsigned int psize) | |||
This method will create a new packet of size psize from current possition. | ||||
Static Public Member Functions | ||||
static ClientPacket * | createAckPacket (ClientPacket *packet) | |||
This will create an ack-packet. | ||||
static ClientPacket * | createDummyPacket () | |||
static ClientPacket * | createSystemPacket (ClientFramework *f, FrameworkPacket::SpecialReceivers receiver) | |||
static ClientPacket * | createPluginPacket (const Plugin< ClientPacket > *plugin, const ClientPacket *_packet) | |||
Will create a plugin packet from a plugin. | ||||
Protected Member Functions | ||||
ClientPacket (ClientFramework *f, unsigned int receiver, unsigned char type=4, unsigned char priority=1, unsigned int bodysize=INITIAL_BODY_SIZE, bool reliable=false) | ||||
Constructor used when client-data is signaling back. |
testclient/testclientframework.cpp, testclient/testclientframework.h, testclient/testclientsnakebite.cpp, and testclient/testclientsnakebite.h.
Definition at line 40 of file clientpacket.h.