37 void ConnectFailure();
Class for handling the client side of the TURN connection.
bool Receive_TURN_ERROR(Packet &p) override
TURN server was unable to connect the client or server based on the token.
bool connect_started
Whether we started the connection.
uint8_t tracking_number
Tracking number of this connection.
std::string token
Token of this connection.
void Connect()
Connect to the TURN server.
bool Receive_TURN_CONNECTED(Packet &p) override
TURN server has connected client and server together and will now relay all packets to each other.
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.
void SendReceive()
Check whether we received/can send some data from/to the TURN server and when that's the case handle ...
std::string connection_string
The connection string of the TURN server we are connecting to.
std::shared_ptr< TCPConnecter > connecter
Connecter instance.
NetworkRecvStatus CloseConnection(bool error=true) override
This will put this socket handler in a close state.
Base socket handler for all TURN TCP sockets.
NetworkRecvStatus
Status of a network client; reasons why a client has quit.
Internal entity of a packet.
Basic functions to receive and send TCP packets to/from the TURN server.