Each game is identified by a uid, passed to the ctor. More...
#include <GameHosting.hh>
Inheritance diagram for server::GameHosting:

Public Member Functions | |
| GameHosting (int game_uid, const xml::XMLConfig &cfg, BaseSRules *rules) | |
| void | addClient (Client *cl) |
| Add a client to this game. | |
| enum eGameState | getState () const |
| Get client current status. | |
| pthread_t | getThreadId () const |
| Get the thread_t structure of the thread running this game. | |
| virtual void | sendPacket (const Packet &p) |
| Send a packet to all clients. | |
Static Public Member Functions | |
| static void * | startThread (void *gh_inst) |
| Start the thread. | |
Each game is identified by a uid, passed to the ctor.
Instance of this class are under Server control, each of them run in a separate thread.
| void server::GameHosting::addClient | ( | Client * | cl | ) |
| pthread_t server::GameHosting::getThreadId | ( | ) | const |
Get the thread_t structure of the thread running this game.
Mostly useful for joining with the main thread.
| void server::GameHosting::sendPacket | ( | const Packet & | p | ) | [virtual] |
| void * server::GameHosting::startThread | ( | void * | gh_inst | ) | [static] |
Start the thread.
Call run(), and exit.
| gh_inst | A GameHosting instance, corresponding to the game. |
1.4.7