Public Member Functions | Static Public Member Functions | Data Fields

# NetworkClientInfo Struct Reference

Container for all information known about a client. More...

`#include <network_base.h>`

Inheritance diagram for NetworkClientInfo:

## Public Member Functions
| NetworkClientInfo (ClientID client_id=INVALID_CLIENT_ID)
| Create a new client.
| ~NetworkClientInfo ()
| Basically a client is leaving us right now.
## Static Public Member Functions
static NetworkClientInfo * | GetByClientID (ClientID client_id)
| Return the CI given it's client-identifier.
## Data Fields
ClientID | client_id
| Client identifier (same as ClientState->client_id).
char | client_name [NETWORK_CLIENT_NAME_LENGTH]
| Name of the client.
byte | client_lang
| The language of the client.
CompanyID | client_playas
| As which company is this client playing (CompanyID).
Date | join_date
| Gamedate the client has joined.

## Detailed Description

Container for all information known about a client.

Definition at line 27 of file network_base.h.

## Constructor & Destructor Documentation

NetworkClientInfo::NetworkClientInfo | ( | ClientID | client_id = `INVALID_CLIENT_ID` | ) | `[inline]`

Create a new client.

Parameters:

  | client_id | The unique identifier of the client.

Definition at line 38 of file network_base.h.

## Member Function Documentation

NetworkClientInfo * NetworkClientInfo::GetByClientID | ( | ClientID | client_id | ) | `[static]`

Return the CI given it's client-identifier.

Parameters:

  | client_id | the ClientID to search for

Returns:
  return a pointer to the corresponding NetworkClientInfo struct or NULL when not found

Definition at line 113 of file network.cpp.

References client_id, and FOR_ALL_CLIENT_INFOS.

Referenced by CmdCompanyCtrl(), NetworkChatWindow::DrawWidget(), NetworkAutoCleanCompanies(), NetworkFindName(), NetworkServerChangeClientName(), NetworkServerDoMove(), NetworkServerSendChat(), NetworkUpdateClientInfo(), NetworkUpdateClientName(), MainWindow::OnHotkey(), NetworkClientListPopupWindow::OnMouseLoop(), PopupClientList(), ClientNetworkGameSocketHandler::Receive_SERVER_CHAT(), ClientNetworkGameSocketHandler::Receive_SERVER_CLIENT_INFO(), ClientNetworkGameSocketHandler::Receive_SERVER_ERROR_QUIT(), ClientNetworkGameSocketHandler::Receive_SERVER_JOIN(), ClientNetworkGameSocketHandler::Receive_SERVER_MOVE(), ClientNetworkGameSocketHandler::Receive_SERVER_QUIT(), ServerNetworkGameSocketHandler::SendWelcome(), and NetworkChatWindow::UpdateWidgetSize().

The documentation for this struct was generated from the following files:

- src/network/network_base.h
- src/network/network.cpp