celGameFactoryManager Class Reference
This is an interface you should implement in order to manage the events from the factory of game sessions. More...
#include <physicallayer/network.h>
Public Member Functions | |
virtual void | GameInfoReceived (celGameInfo *game_info, csTicks server_latency) |
The game factory is searching for available games (it has been started with iCelGameFactory::StartSearchForGameList), and a game has been found. | |
virtual csPtr< iCelDataBuffer > | GetClientEventBaseline (celClientEventType event_type) |
Return the baseline of a client event. | |
virtual csPtr< iCelDataBuffer > | GetNetworkLinkBaseline (celNetworkLinkType link_type) |
Return the baseline of a network link. | |
virtual csPtr< iCelDataBuffer > | GetServerEventBaseline (celServerEventType event_type) |
Return the baseline of a server event. | |
virtual bool | InitClient (iCelGame *game) |
A client is created and has to be initialized. | |
virtual bool | InitServer (iCelGame *game) |
A server is created and has to be initialized. | |
virtual void | ServerNetworkStateChanged (celServerNetworkState new_state, celServerNetworkState previous_state, csString reason="")=0 |
The state of the network connection from the client to the server has changed. |
Detailed Description
This is an interface you should implement in order to manage the events from the factory of game sessions.You can use it to:
- receive the information on new games accessible.
- catch the changes of the connection state from the client to the server.
- initialize the client and the server.
- provide the baselines of the client and server events, and of the network links.
Definition at line 240 of file network.h.
Member Function Documentation
|
The game factory is searching for available games (it has been started with iCelGameFactory::StartSearchForGameList), and a game has been found.
|
|
Return the baseline of a client event. Baselines are the default types and values of the fields of an event. They are used to limit the network traffic by delta-compression and by allowing the system to not be forced to send the types of the data. It is not obligatory to provide the baselines and this function can return 0, but this can result in some network overhead. |
|
Return the baseline of a network link. It is not obligatory to provide the baselines and this function can return 0, but this can result in some network overhead. |
|
Return the baseline of a server event. It is not obligatory to provide the baselines and this function can return 0, but this can result in some network overhead. |
|
A client is created and has to be initialized. The iCelGameClient object is accessible from the iCelGame object. You should create here a physical layer which will be the copy of the physical layer of the server. You should wait for network links from the server before adding most entities, but you can start loading the level, ie the static entities. If the type of the game is CEL_NET_SINGLEPLAYER, you do not need to create a physical layer and you can access directly the one from the server. You should register here the client manager. |
|
A server is created and has to be initialized. The iCelGameServer object is accessible from the celGame object. You should create here the physical layer, the initial entities and their behaviors. You should register here the server manager. |
|
The state of the network connection from the client to the server has changed. An extra comment can be specified when new_state is:
|
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