iCelGameServer Struct Reference
The main object to manage the server game logic. More...
#include <physicallayer/network.h>
Public Member Functions | |
virtual void | RegisterServerManager (celGameServerManager *manager)=0 |
Register the manager of this server. | |
virtual void | SetAdministrator (celPlayer *new_admin)=0 |
Set the administrator of the game. | |
virtual celPlayer * | GetAdministrator ()=0 |
Return the administrator of the game. | |
virtual iCelPlayerList * | GetPlayerList ()=0 |
Return the list of players connected to the server. | |
virtual celPlayerNetworkState | GetPlayerState (celPlayer *player)=0 |
Return the state of the network connection to the player. | |
virtual void | KickPlayer (celPlayer *player, csString reason)=0 |
Kick the player from the game, ie the player will be forced to disconnect from the game. | |
virtual iCelPlayerList * | CreateChannel (csStringID channel_id)=0 |
Create a channel, ie a list of players. | |
virtual void | RemoveChannel (csStringID channel_id)=0 |
Stop managing the list of players and delete it. | |
virtual void | LaunchServerEvent (celPlayer *player, celServerEventData &event_data)=0 |
A server event has to be sent to a player. | |
virtual void | LaunchServerEvent (csStringID channel_id, celServerEventData &event_data)=0 |
A server event has to be sent to the players in the channel. | |
virtual void | SetNetworkLink (celPlayer *player, celNetworkLinkData &link_data, bool player_controlled)=0 |
Establish a link between an entity and a player. | |
virtual void | ChangeLinkControl (iCelEntity *entity, celPlayer *player, bool player_controlled)=0 |
Define if it is the client or the server that will update the entity. | |
virtual void | SetNetworkLink (csStringID channel_id, celNetworkLinkData &link_data)=0 |
Establish a link between a source entity and the players in a list. | |
virtual void | RemoveNetworkLink (iCelEntity *entity, celPlayer *player)=0 |
Remove the existing link between the entity and the player, ie the state of the entity will no more be sent to the player. | |
virtual void | RemoveNetworkLink (iCelEntity *entity, csStringID channel_id)=0 |
Remove the existing link between the entity and the channel, ie the state of the entity will no more be sent to the players in the list. | |
virtual void | ChangeLevel (celGameInfo *new_game)=0 |
Level change, the game is re-initialized. | |
virtual void | SetNetworkPeriod (csTicks period)=0 |
Specify the maximum frequency at which the server can send data to clients. | |
virtual void | SetMaximumBandwidth (size_t width)=0 |
Specify the maximum bandwidth of the network data transmission in bytes per second. | |
virtual void | SetClientTimeOut (csTicks timeout)=0 |
The server will consider a client connected until the connection is broken (network state CEL_NET_PLAYER_UNREACHABLE) during the specified time. | |
virtual void | GetNetworkPlayerStats (celPlayer *player, celNetworkPlayerStats &stats) const =0 |
Return the network stats of the specified player. | |
virtual void | GetNetworkTotalStats (celNetworkPlayerTotalStats &stats) const =0 |
Return the network stats of this server. |
Detailed Description
The main object to manage the server game logic.You can use it to:
- get and set the administrator of the game, get the list of players of the game, kick a player from the game.
- create and remove channels, ie list of players.
- send server events, create and remove network links.
- re-initialize a game for example when a new level is started.
- set some options on the server.
- get some network statistics.
Definition at line 341 of file network.h.
Member Function Documentation
|
Level change, the game is re-initialized. Clear all pending network links and server events. The iCelGameClientManager of all players will be called with celGameClientManager::LevelChanged. All the players are marked as CEL_NET_PLAYER_CONNECTING, they will need to do iCelGameClient::SetReady.
|
|
Define if it is the client or the server that will update the entity. A network link between the player and the entity must be present.
|
|
Create a channel, ie a list of players. The list will be managed by the server which will listen to players disconnecting and will so remove them from the list. Channels are useful to send the same server events or create the same network links to a list of players.
|
|
Return the administrator of the game. The return value can be 0 if no administrator was defined in iCelGameFactory::CreateGame. |
|
Return the network stats of the specified player.
|
|
Return the network stats of this server.
|
|
Return the list of players connected to the server.
|
|
Return the state of the network connection to the player.
|
|
Kick the player from the game, ie the player will be forced to disconnect from the game. A text explaining the reason can be specified. |
|
A server event has to be sent to the players in the channel.
|
|
A server event has to be sent to a player.
|
|
Register the manager of this server. Only one manager can be registered at a time. |
|
Stop managing the list of players and delete it. Any existing network links to this channel will also be removed. |
|
Remove the existing link between the entity and the channel, ie the state of the entity will no more be sent to the players in the list.
|
|
Remove the existing link between the entity and the player, ie the state of the entity will no more be sent to the player.
|
|
Set the administrator of the game. It doesn't need to be a player already connected. |
|
The server will consider a client connected until the connection is broken (network state CEL_NET_PLAYER_UNREACHABLE) during the specified time.
|
|
Specify the maximum bandwidth of the network data transmission in bytes per second. A bandwidth of 0 means that it is unlimited. |
|
Establish a link between a source entity and the players in a list. When a link is set up, a copy entity will be created on each client side and the server manager will send periodically a part of the state of the entity to the copy entity. If a link between the entity and the channel is already present, the previous link will be removed.
|
|
Establish a link between an entity and a player. When a link is set up, a copy entity will be created on the client side and the server manager will send periodically a part of the state of the entity to the copy entity. If the entity is controlled on the client side, the network link will be in the other direction and the state of the entity will be sent periodically from the client side to the server side. If a link between the entity and the player is already present, the previous link will be removed.
|
|
Specify the maximum frequency at which the server can send data to clients.
|
The documentation for this struct was generated from the following file:
- physicallayer/network.h
Generated for CEL: Crystal Entity Layer by doxygen 1.4.4