OpenTTD Source
20240919-master-gdf0233f4c2
|
Go to the documentation of this file.
10 #ifndef NETWORK_TURN_H
11 #define NETWORK_TURN_H
37 void ConnectFailure();
bool Receive_TURN_CONNECTED(Packet &p) override
TURN server has connected client and server together and will now relay all packets to each other.
std::string connection_string
The connection string of the TURN server we are connecting to.
static std::unique_ptr< ClientNetworkTurnSocketHandler > Turn(const std::string &token, uint8_t tracking_number, const std::string &ticket, const std::string &connection_string)
Prepare a TURN connection.
std::shared_ptr< TCPConnecter > connecter
Connecter instance.
bool Receive_TURN_ERROR(Packet &p) override
TURN server was unable to connect the client or server based on the token.
Base socket handler for all TURN TCP sockets.
Class for handling the client side of the TURN connection.
std::string token
Token of this connection.
Internal entity of a packet.
void Connect()
Connect to the TURN server.
NetworkRecvStatus
Status of a network client; reasons why a client has quit.
bool connect_started
Whether we started the connection.
uint8_t tracking_number
Tracking number of this connection.
void SendReceive()
Check whether we received/can send some data from/to the TURN server and when that's the case handle ...
NetworkRecvStatus CloseConnection(bool error=true) override
This will put this socket handler in a close state.