OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
12 #ifndef NETWORK_CORE_TCP_TURN_H
13 #define NETWORK_CORE_TCP_TURN_H
virtual bool Receive_SERCLI_CONNECT(Packet *p)
Client or servers wants to connect to the TURN server (on request by the Game Coordinator).
virtual bool Receive_TURN_ERROR(Packet *p)
TURN server was unable to connect the client or server based on the token.
virtual bool Receive_TURN_CONNECTED(Packet *p)
TURN server has connected client and server together and will now relay all packets to each other.
Base socket handler for all TURN TCP sockets.
PacketTurnType
Enum with all types of TCP TURN packets.
bool HandlePacket(Packet *p)
Handle the given packet, i.e.
Internal entity of a packet.
bool ReceivePackets()
Receive a packet at TCP level.
@ PACKET_TURN_END
Must ALWAYS be on the end of this list!! (period)
@ PACKET_TURN_TURN_ERROR
TURN server is unable to relay.
@ PACKET_TURN_SERCLI_CONNECT
Client or server is connecting to the TURN server.
bool ReceiveInvalidPacket(PacketTurnType type)
Helper for logging receiving invalid packets.
@ PACKET_TURN_TURN_CONNECTED
TURN server indicates the socket is now being relayed.
NetworkTurnSocketHandler(SOCKET s=INVALID_SOCKET)
Create a new cs socket handler for a given cs.
Base socket handler for all TCP sockets.