|
OpenTTD Source 20260311-master-g511d3794ce
|
Types used for networking. More...
Go to the source code of this file.
Data Structures | |
| struct | NetworkCompanyStats |
| Simple calculated statistics of a company. More... | |
| class | NetworkAuthorizedKeys |
| Simple helper to (more easily) manage authorized keys. More... | |
Typedefs | |
| using | ClientPoolID = PoolID<uint16_t, struct ClientPoolIDTag, MAX_CLIENTS + 1 , 0xFFFF> |
| Indices into the client related pools. | |
| using | AdminID = PoolID<uint8_t, struct AdminIDTag, 16, 0xFF> |
| Indices into the admin tables. | |
Enumerations | |
| enum class | NetworkVehicleType : uint8_t { Train = 0 , Truck , Bus , Aircraft , Ship , End } |
| Vehicletypes in the order they are send in info packets. More... | |
| enum class | ServerGameType : uint8_t { Local = 0 , Public , InviteOnly } |
| Game type the server can be using. More... | |
| enum | ClientID : uint32_t { INVALID_CLIENT_ID = 0 , CLIENT_ID_SERVER = 1 , CLIENT_ID_FIRST = 2 } |
| 'Unique' identifier to be given to clients More... | |
| enum | DestType : uint8_t { DESTTYPE_BROADCAST , DESTTYPE_TEAM , DESTTYPE_CLIENT } |
| Destination of our chat messages. More... | |
| enum | NetworkAction : uint8_t { NETWORK_ACTION_JOIN , NETWORK_ACTION_LEAVE , NETWORK_ACTION_SERVER_MESSAGE , NETWORK_ACTION_CHAT , NETWORK_ACTION_CHAT_COMPANY , NETWORK_ACTION_CHAT_CLIENT , NETWORK_ACTION_GIVE_MONEY , NETWORK_ACTION_NAME_CHANGE , NETWORK_ACTION_COMPANY_SPECTATOR , NETWORK_ACTION_COMPANY_JOIN , NETWORK_ACTION_COMPANY_NEW , NETWORK_ACTION_KICKED , NETWORK_ACTION_EXTERNAL_CHAT } |
| Actions that can be used for NetworkTextMessage. More... | |
| enum class | NetworkErrorCode : uint8_t { General , Desync , SavegameFailed , ConnectionLost , IllegalPacket , NewGRFMismatch , NotAuthorized , NotExpected , WrongRevision , NameInUse , WrongPassword , CompanyMismatch , Kicked , Cheater , ServerFull , TooManyCommands , TimeoutPassword , TimeoutComputer , TimeoutMap , TimeoutJoin , InvalidClientName , NotOnAllowList , NoAuthenticationMethodAvailable } |
| The error codes we send around in the protocols. More... | |
Variables | |
| static const uint | MAX_CLIENTS = 255 |
| How many clients can we have. | |
Types used for networking.
Definition in file network_type.h.
Indices into the admin tables.
Definition at line 53 of file network_type.h.
| using ClientPoolID = PoolID<uint16_t, struct ClientPoolIDTag, MAX_CLIENTS + 1 , 0xFFFF> |
Indices into the client related pools.
Definition at line 50 of file network_type.h.
| enum ClientID : uint32_t |
'Unique' identifier to be given to clients
| Enumerator | |
|---|---|
| INVALID_CLIENT_ID | Client is not part of anything. |
| CLIENT_ID_SERVER | Servers always have this ID. |
| CLIENT_ID_FIRST | The first client ID. |
Definition at line 43 of file network_type.h.
| enum DestType : uint8_t |
Destination of our chat messages.
Definition at line 69 of file network_type.h.
| enum NetworkAction : uint8_t |
Actions that can be used for NetworkTextMessage.
Definition at line 80 of file network_type.h.
|
strong |
The error codes we send around in the protocols.
Definition at line 100 of file network_type.h.
|
strong |
Vehicletypes in the order they are send in info packets.
| Enumerator | |
|---|---|
| Train | A train. |
| Truck | A road vehicle that stops at truck stops. |
| Bus | A road vehicle that stops at bus stops. |
| Aircraft | An airplane or helicopter. |
| Ship | A ship. |
| End | End marker for array sizes. |
Definition at line 22 of file network_type.h.
|
strong |
Game type the server can be using.
Used on the network protocol to communicate with Game Coordinator.
| Enumerator | |
|---|---|
| Local | Do not communicate with the game coordinator. |
| Public | The game is publicly accessible. |
| InviteOnly | The game can be accessed if you know the invite code. |
Definition at line 36 of file network_type.h.
|
static |
How many clients can we have.
Definition at line 17 of file network_type.h.
Referenced by ServerNetworkGameSocketHandler::AllowConnection(), NetworkMakeClientNameUnique(), NetworkStartServerWindow::OnClick(), NetworkStartServerWindow::OnQueryTextFinished(), NetworkGameWindow::UpdateWidgetSize(), and NetworkJoinStatusWindow::UpdateWidgetSize().