OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
10 #ifndef NETWORK_TURN_H
11 #define NETWORK_TURN_H
36 void ConnectFailure();
std::string connection_string
The connection string of the TURN server we are connecting to.
bool Receive_TURN_CONNECTED(Packet *p) override
TURN server has connected client and server together and will now relay all packets to each other.
"Helper" class for creating TCP connections in a non-blocking manner
TCPConnecter * connecter
Connecter instance.
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.
uint8 tracking_number
Tracking number of this connection.
NetworkRecvStatus
Status of a network client; reasons why a client has quit.
bool connect_started
Whether we started the connection.
bool Receive_TURN_ERROR(Packet *p) override
TURN server was unable to connect the client or server based on the token.
void CDECL error(const char *s,...)
Error handling for fatal non-user errors.
static std::unique_ptr< ClientNetworkTurnSocketHandler > Turn(const std::string &token, uint8 tracking_number, const std::string &ticket, const std::string &connection_string)
Prepare a TURN 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.