10 #ifndef NETWORK_STUN_H
11 #define NETWORK_STUN_H
32 static std::unique_ptr<ClientNetworkStunSocketHandler>
Stun(
const std::string &
token, uint8_t
family);
Class for handling the client side of the STUN connection.
void Connect(const std::string &token, uint8_t family)
Connect to the STUN server over either IPv4 or IPv6.
std::string token
Token of this STUN handler.
void SendReceive()
Check whether we received/can send some data from/to the STUN server and when that's the case handle ...
uint8_t family
Family of this STUN handler.
static std::unique_ptr< ClientNetworkStunSocketHandler > Stun(const std::string &token, uint8_t family)
Send a STUN packet to the STUN server.
std::shared_ptr< TCPConnecter > connecter
Connecter instance.
NetworkAddress local_addr
Local addresses of the socket.
NetworkRecvStatus CloseConnection(bool error=true) override
This will put this socket handler in a close state.
bool sent_result
Did we sent the result of the STUN connection?
Wrapper for (un)resolved network addresses; there's no reason to transform a numeric IP to a string a...
Base socket handler for all STUN TCP sockets.
NetworkRecvStatus
Status of a network client; reasons why a client has quit.
Basic functions to receive and send TCP packets to/from the STUN server.