#include <serverdata.h>
Inheritance diagram for ServerData:
Public Member Functions | |
ServerData (ServerFramework *f, char packet_priority, bool packet_reliable) | |
~ServerData () | |
void | sendCreateObjectToAll () const |
Will send a create-object packet to all clients. | |
void | sendCreateObject (const std::map< unsigned int, Client * > &clientlist) const |
Creates and sends a create-object packet to a list of clients. | |
void | sendCreateObject (Client *client) const |
void | sendUpdateToAll (unsigned char type, bool reliable) const |
Will send an update packet to all clients. | |
void | sendUpdate (const std::map< unsigned int, Client * > &clientlist, unsigned char type, bool reliable) const |
Creates and sends an update packet to a list of clients. | |
void | sendUpdate (Client *client, unsigned char type, bool reliable) const |
void | sendDestroyToAll () const |
Will send a destroy/delete-object packet to all clients. | |
void | sendDestroy (const std::map< unsigned int, Client * > &clientlist) const |
Create and sends a destroy-object packet to a list of clients. | |
void | sendDestroy (Client *client) const |
virtual const unsigned int | getClassId () const =0 |
This must produce a unique id for this class, it will be used on the client side to construct new objects. | |
virtual void | fillUpdatePacket (ServerPacket *packet, unsigned char type) const =0 |
Here the data-class should fill in data according to update type `type`. | |
virtual void | fillCreateObjectPacket (ServerPacket *packet) const =0 |
Here the data-class should fill in all data required by the constructor on the client side. | |
virtual void | clientPacket (Client *client, unsigned char type, ServerPacket *packet)=0 |
Called when ever we receive a packet for this object from a client. |
OPTIMIZE: we could enqueue the packet directly if there is only one receiver in the client-list
testserver/testserversnakebite.cpp, and testserver/testserversnakebite.h.
Definition at line 49 of file serverdata.h.