CEL

Public API Reference

iCelGameClient Struct Reference

The main object to manage the client game logic. More...

#include <physicallayer/network.h>

List of all members.

Public Member Functions

virtual csTicks ConvertServerClock (csTicks server_time) const =0
 Convert a time from the server clock to the client clock.
virtual iCelEntityGetMappedEntity (uint entity_id) const =0
 Return the entity on the client side that is network linked with an entity with ID entity_id on the server side.
virtual uint GetMappedID (uint entity_id) const =0
 Return the ID of the entity on the client side that is network linked with an entity with ID entity_id on the server side.
virtual void GetNetworkStats (celNetworkServerStats &stats) const =0
 Return the network stats of this client.
virtual celPlayerGetPlayer ()=0
 Return the current player associated with this client.
virtual void LaunchClientEvent (celClientEventData &event_data)=0
 Ask the game client to send an event to the server.
virtual void RegisterClientManager (celGameClientManager *manager)=0
 Register the manager of this client.
virtual void SetMaximumBandwidth (size_t width)=0
 The maximum bandwidth of the network data transmission in bytes per second.
virtual void SetNetworkPeriod (csTicks period)=0
 Specify the maximum frequency at which the client can send data.
virtual void SetReady ()=0
 Indicate that the client has loaded everything and is ready to play.
virtual void SetServerTimeOut (csTicks timeout)=0
 The client will consider itself connected to the server until the connection is broken during specified time.
virtual void UpdatePlayer (celPlayer *player)=0
 Update the data of the current player.


Detailed Description

The main object to manage the client game logic.

You can use it to:

You should define and register a celGameClientManager which will catch the events from this client.

Definition at line 519 of file network.h.


Member Function Documentation

virtual csTicks iCelGameClient::ConvertServerClock ( csTicks  server_time  )  const [pure virtual]

Convert a time from the server clock to the client clock.

virtual iCelEntity* iCelGameClient::GetMappedEntity ( uint  entity_id  )  const [pure virtual]

Return the entity on the client side that is network linked with an entity with ID entity_id on the server side.

virtual uint iCelGameClient::GetMappedID ( uint  entity_id  )  const [pure virtual]

Return the ID of the entity on the client side that is network linked with an entity with ID entity_id on the server side.

virtual void iCelGameClient::GetNetworkStats ( celNetworkServerStats stats  )  const [pure virtual]

Return the network stats of this client.

virtual celPlayer* iCelGameClient::GetPlayer (  )  [pure virtual]

Return the current player associated with this client.

virtual void iCelGameClient::LaunchClientEvent ( celClientEventData event_data  )  [pure virtual]

Ask the game client to send an event to the server.

virtual void iCelGameClient::RegisterClientManager ( celGameClientManager manager  )  [pure virtual]

Register the manager of this client.

Only one manager can be registered at a time.

virtual void iCelGameClient::SetMaximumBandwidth ( size_t  width  )  [pure virtual]

The maximum bandwidth of the network data transmission in bytes per second.

A bandwidth of 0 means that it is unlimited.

virtual void iCelGameClient::SetNetworkPeriod ( csTicks  period  )  [pure virtual]

Specify the maximum frequency at which the client can send data.

virtual void iCelGameClient::SetReady (  )  [pure virtual]

Indicate that the client has loaded everything and is ready to play.

virtual void iCelGameClient::SetServerTimeOut ( csTicks  timeout  )  [pure virtual]

The client will consider itself connected to the server until the connection is broken during specified time.

virtual void iCelGameClient::UpdatePlayer ( celPlayer player  )  [pure virtual]

Update the data of the current player.

The server will check if the new data are valid and a subsequent celGameClientManager::PlayerUpdated will be called with the validated data.


The documentation for this struct was generated from the following file:
Generated for CEL: Crystal Entity Layer by doxygen 1.4.7