12#ifndef NETWORK_CORE_TCP_TURN_H
13#define NETWORK_CORE_TCP_TURN_H
18#include "network_game_info.h"
Base socket handler for all TCP sockets.
Base socket handler for all TURN TCP sockets.
virtual bool Receive_SERCLI_CONNECT(Packet &p)
Client or servers wants to connect to the TURN server (on request by the Game Coordinator).
bool ReceivePackets()
Receive a packet at TCP level.
virtual bool Receive_TURN_CONNECTED(Packet &p)
TURN server has connected client and server together and will now relay all packets to each other.
virtual bool Receive_TURN_ERROR(Packet &p)
TURN server was unable to connect the client or server based on the token.
bool ReceiveInvalidPacket(PacketTurnType type)
Helper for logging receiving invalid packets.
bool HandlePacket(Packet &p)
Handle the given packet, i.e.
NetworkTurnSocketHandler(SOCKET s=INVALID_SOCKET)
Create a new cs socket handler for a given cs.
Network stuff has many things that needs to be included and/or implemented by default.
Basic functions to create, fill and read packets.
Internal entity of a packet.
Basic functions to receive and send TCP packets.
PacketTurnType
Enum with all types of TCP TURN packets.
@ PACKET_TURN_TURN_CONNECTED
TURN server indicates the socket is now being relayed.
@ PACKET_TURN_SERCLI_CONNECT
Client or server is connecting to the TURN server.
@ PACKET_TURN_TURN_ERROR
TURN server is unable to relay.
@ PACKET_TURN_END
Must ALWAYS be on the end of this list!! (period)