Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | Related Pages | Examples

Client Class Reference
[GanefServer]

An object of this class represents a client currently connected to the server. You should create your own class inheriting from this one so you can associate any data you wish with a client/player in the game. More...

#include <client.h>

Inheritance diagram for Client:

TestClient List of all members.

Public Types

enum  ClientState { NEWCLIENT = 0, CONNECTED = 1, CONNECTION_ABORTED = 2, DICONNECTED = 3 }

Public Member Functions

const ClientState getState () const
void setState (const ClientState &_s)
 Client (ServerFramework *fw, const ipaddress &addr, int port)
 ~Client ()
const ipaddress & getAddress ()
const int getPort ()
const unsigned int getId () const
void registerRTT (unsigned int ms)
void registerLastPacketReceivedTime (unsigned int time)
unsigned int getLastPacketReceivedTime () const
unsigned int getRTT () const
unsigned int getNextOutgoingSeqNo (ServerPacket *packet)
bool hasCalledOnConnect () const
void setCalledOnConnect (bool b)
bool hasCalledOnDisconnect () const
void setCalledOnDisconnect (bool b)
bool isPacketReadyForDelivery (ServerPacket *packet)
ServerPacketincrementNextIngoingSeqNo (ServerPacket *packet)
unsigned int bufferedPackets () const
unsigned int getNextOutgoingPacketSeqNumber (ServerPacket *packet)

Friends

bool operator== (const Client &c1, const Client &c2)
 Used when clients connect to see if its a reconnect.

Detailed Description

An object of this class represents a client currently connected to the server. You should create your own class inheriting from this one so you can associate any data you wish with a client/player in the game.

Author:
Lars Langer and Emanuel Greisen
Examples:

testserver/testserverframework.cpp, testserver/testserverframework.h, testserver/testserversnakebite.cpp, and testserver/testserversnakebite.h.

Definition at line 41 of file client.h.


The documentation for this class was generated from the following files:
Generated on Mon Feb 6 12:24:51 2006 for Ganef by  doxygen 1.4.4