OpenTTD Source
20240919-master-gdf0233f4c2
|
Go to the documentation of this file.
12 #ifndef NETWORK_CORE_TCP_TURN_H
13 #define NETWORK_CORE_TCP_TURN_H
18 #include "network_game_info.h"
bool HandlePacket(Packet &p)
Handle the given packet, i.e.
@ PACKET_TURN_TURN_CONNECTED
TURN server indicates the socket is now being relayed.
@ PACKET_TURN_END
Must ALWAYS be on the end of this list!! (period)
virtual bool Receive_SERCLI_CONNECT(Packet &p)
Client or servers wants to connect to the TURN server (on request by the Game Coordinator).
Base socket handler for all TURN TCP sockets.
Internal entity of a packet.
bool ReceivePackets()
Receive a packet at TCP level.
@ PACKET_TURN_SERCLI_CONNECT
Client or server is connecting to the TURN server.
bool ReceiveInvalidPacket(PacketTurnType type)
Helper for logging receiving invalid packets.
NetworkTurnSocketHandler(SOCKET s=INVALID_SOCKET)
Create a new cs socket handler for a given cs.
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.
@ PACKET_TURN_TURN_ERROR
TURN server is unable to relay.
PacketTurnType
Enum with all types of TCP TURN packets.
Base socket handler for all TCP sockets.