ClientData_t Struct Reference
[Networking]

Stores information on a client for use on the server. More...

#include <client.h>

Collaboration diagram for ClientData_t:

Collaboration graph
[legend]

Data Fields

union {
   struct {
      Bool   active: 1
 Indicates the client has joined the server's game.
      Bool   bcast: 1
 Indicates the client can be contacted with IPv4 UDP broadcasts.
      Bool   contact: 1
 Indicates that the client has contacted the server and that a connection is being established.
      Bool   disconn: 1
 Indicates the client is in the process of disconnecting.
      Bool   hasGameOpts: 1
 Indicates that the client has acknowledged the game options.
      Bool   mcast: 1
 Indicates the client can be contacted with IPv6 UDP multicasts.
   } 
   Uint8   flags
 Flags that modify how this client is handled.
}; 
SocketAddr addr
 The socket address used to communicate directly with the client.
Uint8 cid
 The index of the client.
Uint16 configAckCnt
 The number of game configuration messages that this client has acknowledged.
Uint16 configFirst
 The index of the first configuration message sent to this client.
ClientDataconfigNext
 A pointer to the next client that needs some part of the game configuration.
ClientDataconfigPrev
 A pointer to the previous client that needs some part of the game configuration.
Uint32 disconnTime
 The time when the client attempted to disconnect.
Uint32 randId
 The random ID sent from the client during the connection process.
UpdateTimes sentUpdateTimes [32]
 The time of the transmitted update for each of the players.

Detailed Description

Stores information on a client for use on the server.

Author:
Jeff Jackowski

Definition at line 40 of file client.h.


Field Documentation

union { ... }

Bool ClientData_t::active

Indicates the client has joined the server's game.

Definition at line 103 of file client.h.

Referenced by AckConnAccept(), HandleConnDisconn(), MsgFailDisconnect(), and NetCliToSrv().

SocketAddr ClientData_t::addr

The socket address used to communicate directly with the client.

Definition at line 66 of file client.h.

Referenced by FailConnAccept(), SendAck(), and ValidateClient().

Bool ClientData_t::bcast

Indicates the client can be contacted with IPv4 UDP broadcasts.

Definition at line 111 of file client.h.

Uint8 ClientData_t::cid

The index of the client.

The client data is stored in an array and this value is the index into the array. It is needed when only a pointer to the client is available, such as when the game configuration messages are sent and a linked list of clients (see configNext and configPrev) is traversed.

Definition at line 87 of file client.h.

Referenced by AddToConfigList(), FailConnAccept(), HandleConnReq(), MsgFailDisconnect(), MsgFailDropConnection(), and RemoveFromConfigList().

Uint16 ClientData_t::configAckCnt

The number of game configuration messages that this client has acknowledged.

Definition at line 79 of file client.h.

Uint16 ClientData_t::configFirst

The index of the first configuration message sent to this client.

Definition at line 74 of file client.h.

Referenced by AddToConfigList().

ClientData* ClientData_t::configNext

A pointer to the next client that needs some part of the game configuration.

Definition at line 45 of file client.h.

Referenced by AddToConfigList(), and RemoveFromConfigList().

ClientData* ClientData_t::configPrev

A pointer to the previous client that needs some part of the game configuration.

Definition at line 50 of file client.h.

Referenced by AddToConfigList(), and RemoveFromConfigList().

Bool ClientData_t::contact

Indicates that the client has contacted the server and that a connection is being established.

Definition at line 99 of file client.h.

Referenced by HandleConnDisconn(), MsgFailDisconnect(), and NetCliToSrv().

Bool ClientData_t::disconn

Indicates the client is in the process of disconnecting.

Definition at line 107 of file client.h.

Referenced by HandleConnDisconn(), and MsgFailDisconnect().

Uint32 ClientData_t::disconnTime

The time when the client attempted to disconnect.

This is used to support reliable disconnects by maintaing client data for up to 4 seconds after the disconnect message. Only valid when the ClientData::disconn flag is set.

Definition at line 62 of file client.h.

Referenced by HandleConnDisconn(), and MsgFailDisconnect().

Uint8 ClientData_t::flags

Flags that modify how this client is handled.

The initial value is zero and is reset when clients disconnect.

Definition at line 93 of file client.h.

Referenced by FailConnAccept(), MsgFailDropConnection(), and Send().

Bool ClientData_t::hasGameOpts

Indicates that the client has acknowledged the game options.

Definition at line 120 of file client.h.

Bool ClientData_t::mcast

Indicates the client can be contacted with IPv6 UDP multicasts.

Warning:
This is not yet implemented.

Definition at line 116 of file client.h.

Uint32 ClientData_t::randId

The random ID sent from the client during the connection process.

Definition at line 70 of file client.h.

Referenced by AckConnAccept(), and FailConnAccept().

UpdateTimes ClientData_t::sentUpdateTimes[32]

The time of the transmitted update for each of the players.

Todo:
Reevaluate the need for this field.

Definition at line 55 of file client.h.


The documentation for this struct was generated from the following file:
Generated on Mon May 28 04:41:44 2007 for Retro Tank Super Attack by  doxygen 1.5.2