#include <client.h>
Collaboration diagram for ClientData_t:
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. | |
ClientData * | configNext |
A pointer to the next client that needs some part of the game configuration. | |
ClientData * | configPrev |
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. |
Definition at line 40 of file client.h.
union { ... } |
Indicates the client has joined the server's game.
Definition at line 103 of file client.h.
Referenced by AckConnAccept(), HandleConnDisconn(), MsgFailDisconnect(), and NetCliToSrv().
The socket address used to communicate directly with the client.
Definition at line 66 of file client.h.
Referenced by FailConnAccept(), SendAck(), and ValidateClient().
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 |
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().
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().
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().
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().
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().
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().