celGameServerManager Class Reference
This is an interface you should implement in order to manage the events from the server. More...
#include <physicallayer/network.h>
Public Member Functions | |
virtual bool | AuthorizePlayer (celPlayer *player, csString &reason)=0 |
A player is asking to join the game. | |
virtual void | HandleClientEvent (celPlayer *player, celClientEventType event_type, csTicks event_time, iCelDataBuffer *event_data)=0 |
A client event has been catched. | |
virtual void | PersistenceProblem (celPlayer *player, iCelEntity *entity, iCelPropertyClass *pc, celPersistenceResult persist_code)=0 |
An entity is controlled by a player and a problem was encountered while updating the data of this entity. | |
virtual void | PlayerNetworkStateChanged (celPlayer *player, celPlayerNetworkState new_state, celPlayerNetworkState previous_state)=0 |
The state of the network connection to the player has changed. | |
virtual void | ServerEnd ()=0 |
The game is finished and the server will be closed. | |
virtual celPlayer * | ValidatePlayerUpdate (celPlayer *previous_player_data)=0 |
Check if the new data of a player are valid. |
Detailed Description
This is an interface you should implement in order to manage the events from the server.You can use it to:
- authorize players to join the game, check the validity of the data of the players.
- listen for changes in the state of the network connections to the clients.
- catch the client events.
- handle the detection of cheats.
- close the game.
Definition at line 602 of file network.h.
Member Function Documentation
|
A player is asking to join the game. Return true if the new player is accepted, false otherwise (for example, because the player has been banned). A text explaining the reason of a negative answer can be specified. |
|
A client event has been catched.
|
|
An entity is controlled by a player and a problem was encountered while updating the data of this entity.
|
|
The state of the network connection to the player has changed.
|
|
The game is finished and the server will be closed. You should delete here all entities and the physical layer. |
|
Check if the new data of a player are valid. It happens when iCelGameClient::UpdatePlayer has been called on the client side.
|
The documentation for this class was generated from the following file:
- physicallayer/network.h
Generated for CEL: Crystal Entity Layer by doxygen 1.4.6