10 #ifndef NETWORK_BASE_H
11 #define NETWORK_BASE_H
15 #include "../core/pool_type.hpp"
16 #include "../company_type.h"
17 #include "../timer/timer_game_economy.h"
Wrapper for network addresses.
Owner
Enum for all companies/owners.
NetworkClientInfoPool _networkclientinfo_pool("NetworkClientInfo")
Make sure both pools have the same size.
Pool< NetworkClientInfo, ClientIndex, 8, MAX_CLIENT_SLOTS, PT_NCLIENT > NetworkClientInfoPool
Type for the pool with client information.
Types used for networking.
ClientID
'Unique' identifier to be given to clients
@ INVALID_CLIENT_ID
Client is not part of anything.
Container for all information known about a client.
static NetworkClientInfo * GetByClientID(ClientID client_id)
Return the CI given it's client-identifier.
TimerGameEconomy::Date join_date
Gamedate the client has joined.
~NetworkClientInfo()
Basically a client is leaving us right now.
bool CanJoinCompany(CompanyID company_id) const
Returns whether the given company can be joined by this client.
CompanyID client_playas
As which company is this client playing (CompanyID)
ClientID client_id
Client identifier (same as ClientState->client_id)
std::string client_name
Name of the client.
std::string public_key
The public key of the client.
NetworkClientInfo(ClientID client_id=INVALID_CLIENT_ID)
Create a new client.
Base class for all PoolItems.
Base class for all pools.
Templated helper to make a type-safe 'typedef' representing a single POD value.