OpenTTD Source
20241121-master-g67a0fccfad
|
Basic functions to receive and send TCP packets to/from the Game Coordinator server. More...
Go to the source code of this file.
Data Structures | |
class | NetworkCoordinatorSocketHandler |
Base socket handler for all Game Coordinator TCP sockets. More... | |
Basic functions to receive and send TCP packets to/from the Game Coordinator server.
Definition in file tcp_coordinator.h.
enum ConnectionType |
The type of connection the Game Coordinator can detect we have.
Enumerator | |
---|---|
CONNECTION_TYPE_UNKNOWN | The Game Coordinator hasn't informed us yet what type of connection we have. |
CONNECTION_TYPE_ISOLATED | The Game Coordinator failed to find a way to connect to your server. Nobody will be able to join. |
CONNECTION_TYPE_DIRECT | The Game Coordinator can directly connect to your server. |
CONNECTION_TYPE_STUN | The Game Coordinator can connect to your server via a STUN request. |
CONNECTION_TYPE_TURN | The Game Coordinator needs you to connect to a relay. |
Definition at line 52 of file tcp_coordinator.h.
The type of error from the Game Coordinator.
Definition at line 63 of file tcp_coordinator.h.
enum PacketCoordinatorType : uint8_t |
Enum with all types of TCP Game Coordinator packets.
The order MUST not be changed.
GC -> packets from Game Coordinator to either Client or Server. SERVER -> packets from Server to Game Coordinator. CLIENT -> packets from Client to Game Coordinator. SERCLI -> packets from either the Server or Client to Game Coordinator.
Enumerator | |
---|---|
PACKET_COORDINATOR_GC_ERROR | Game Coordinator indicates there was an error. |
PACKET_COORDINATOR_SERVER_REGISTER | Server registration. |
PACKET_COORDINATOR_GC_REGISTER_ACK | Game Coordinator accepts the registration. |
PACKET_COORDINATOR_SERVER_UPDATE | Server sends an set intervals an update of the server. |
PACKET_COORDINATOR_CLIENT_LISTING | Client is requesting a listing of all public servers. |
PACKET_COORDINATOR_GC_LISTING | Game Coordinator returns a listing of all public servers. |
PACKET_COORDINATOR_CLIENT_CONNECT | Client wants to connect to a server based on an invite code. |
PACKET_COORDINATOR_GC_CONNECTING | Game Coordinator informs the client of the token assigned to the connection attempt. |
PACKET_COORDINATOR_SERCLI_CONNECT_FAILED | Client/server tells the Game Coordinator the current connection attempt failed. |
PACKET_COORDINATOR_GC_CONNECT_FAILED | Game Coordinator informs client/server it has given up on the connection attempt. |
PACKET_COORDINATOR_CLIENT_CONNECTED | Client informs the Game Coordinator the connection with the server is established. |
PACKET_COORDINATOR_GC_DIRECT_CONNECT | Game Coordinator tells client to directly connect to the hostname:port of the server. |
PACKET_COORDINATOR_GC_STUN_REQUEST | Game Coordinator tells client/server to initiate a STUN request. |
PACKET_COORDINATOR_SERCLI_STUN_RESULT | Client/server informs the Game Coordinator of the result of the STUN request. |
PACKET_COORDINATOR_GC_STUN_CONNECT | Game Coordinator tells client/server to connect() reusing the STUN local address. |
PACKET_COORDINATOR_GC_NEWGRF_LOOKUP | Game Coordinator informs client about NewGRF lookup table updates needed for GC_LISTING. |
PACKET_COORDINATOR_GC_TURN_CONNECT | Game Coordinator tells client/server to connect to a specific TURN server. |
PACKET_COORDINATOR_END | Must ALWAYS be on the end of this list!! (period) |
Definition at line 28 of file tcp_coordinator.h.