#include <Client.h>
Inheritance diagram for CClient:
Public Member Functions | |
CClient (CMailbox *pGUIMailbox=NULL) | |
CClient. | |
~CClient () | |
~CClient | |
bool | IsGameOver () const |
IsGameOver. | |
void | SetDelayGameStart (bool bStart=true) |
SetDelayGameStart. | |
bool | StartGame () |
StartGame. | |
bool | SetClientMode (int32 mode) |
SetClientMode. | |
int32 | GetClientMode () const |
GetClientMode. | |
bool | SetClientPort (uint16 port) |
SetClientPort. | |
bool | ConnectToRemoteClient (const int8 *pAddress, uint16 port=CAFFEINE_PORT_NUMBER) |
ConnectToRemoteClient. | |
bool | LoadGameModule (const int8 *path) |
LoadGameModule. | |
bool | IsGameModuleLoaded () |
IsGameModuleLoaded. | |
const CDescription *const | GetGameInfo () |
GetGameInfo. | |
int32 | LoadPlayerModule (const int8 *path, bool bSetRandNum=false, uint32 randNum=0) |
LoadPlayerModule. | |
bool | UnloadPlayer (uint32 idx) |
UnloadPlayer. | |
bool | UnloadModuleFromCEID (CEID ceid) |
UnloadModuleFromCEID. | |
const CDescription *const | GetPlayerInfo (uint32 iPlayer) const |
GetPlayerInfo. | |
int32 | GetPlayerCount (int32 iType=-1) const |
GetPlayerCount. | |
uint32 | RunBenchmark (uint32 duration) |
RunBenchmark. | |
uint32 | GetBenchmarkRes () const |
GetBenchmarkValue. | |
Protected Member Functions | |
void | Run () |
Run. | |
bool | OnInit () |
OnInit. | |
void | ProcessNewConnections () |
ProcessNewConnections. | |
void | ProcessNewPlayers () |
void | CheckDelinquentConnections () |
CheckDelinquentConnections. | |
CPlayer * | RecastPlayer (CNetworkPlayer *pPlayer, int32 iNewType) |
Limitations: None | |
bool | LoadFromLibrary (PLAYERINFO &) |
LoadFromLibrary. | |
void | UnloadLibrary (PLAYERINFO &) |
Description: Waits until the player/game module is not running and then frees all memory used by that player/game module | |
void | EnableBroadcastUDPAddress (bool bEnable) |
EnableBroadcastUDPAddress. | |
void | BroadcastUDPIdentity () |
BroadcastUDPAddress. | |
uint32 | ResizePlayerList (int32 iAmount) |
SwitchModes. | |
void | RefreshGUI () |
RefreshGUI. | |
void | SendMessageToGUI (const CMessage *) |
SendMessageToGUI. |
Description: : The client class is the primary class that faciliates the functionality of the client software application.
Limitations: : None
|
CClient. Description: Class constructor Limitations: NONE |
|
~CClient Description:
|
|
BroadcastUDPAddress. Description: : This function sends a broadcast UDP message telling clients of the existance of this host client or tourn server
|
|
CheckDelinquentConnections. Description:
|
|
ConnectToRemoteClient. Description: Connects to another client
|
|
EnableBroadcastUDPAddress. Description: : This function enables or disables the broadcasting of CLanMessages initialized with client information. The broadcast messages are received by instances of the CAddressBook class listening on CAFFEINE_PORT_NUMBER.
|
|
GetBenchmarkValue. Description:: Returns the performance measure from the last time the benchmark was executed.
|
|
GetClientMode. Description: : Fetches the current mode of the client.
|
|
GetGameInfo. Description: This function returns the description of the game module.
|
|
GetPlayerCount. Description: This function returns the number of CPlayer connections.
|
|
GetPlayerInfo. Description: This function returns the description of the specified player. The players are referenced using their index. Call the GetPlayerCount() function to retrieve the value range of index numbers. Player indexes are zero based.
|
|
IsGameModuleLoaded. Description: This function checks to see if a game module has been Loaded.
|
|
IsGameOver. Description: Returns true if there is not a game being played currently.
|
|
LoadFromLibrary. Description: Loads a game of AI module from a DLL file
|
|
LoadGameModule. Description: Sets the path to the game module
|
|
LoadPlayerModule. Description: Adds a player module path to this client
|
|
OnInit. Description: Initializes the two sockets used by the client and starts the dispatcher
|
|
ProcessNewConnections. Description: Handles all processing of new incoming connections
|
|
|
|
RefreshGUI. Description: This function formats a message that instructs the GUI to refresh its player lists. The message is then queued for transmission.
|
|
SwitchModes. Description: : The current mode of the client is switched to the new provided mode. Any transitional operations that are required are performed here.
|
|
Run. Description: The main task loop for the CClient class
Implements CGenericTask. |
|
RunBenchmark. Description: : Executes a benchmark of the operating computer. The result can be used by the framework to ensure fairness during games between players operating on differntly-equipted machines.
|
|
SendMessageToGUI. Description: Sends the message to the client GUI.
|
|
SetClientMode. Description: : Sets the current mode of the client. If the new mode is invalid, the operating mode is not changed.
|
|
SetClientPort. Description: : The current mode of the client is switched to the new provided mode. Any transitional operations that are required are performed here.
|
|
SetDelayGameStart. Description: Sets or unsets the delay start option for the game module.
|
|
StartGame. Description: Starts a game if one isn't started already.
|
|
Description: Waits until the player/game module is not running and then frees all memory used by that player/game module
|
|
UnloadModuleFromCEID. Description: Will unload a player from a given ceid.
|
|
UnloadPlayer. Description:
|