Basic functions to receive and send TCP packets for game purposes. More...
#include "../../stdafx.h"
#include "../network.h"
#include "../network_internal.h"
#include "../../debug.h"
#include "table/strings.h"
Go to the source code of this file.
Defines | |
#define | GAME_COMMAND(type) case type: return this->NetworkPacketReceive_ ## type ## _command(p); break; |
Defines a simple (switch) case for each network packet. | |
#define | DEFINE_UNAVAILABLE_GAME_RECEIVE_COMMAND(type) |
Create stub implementations for all receive commands that only show a warning that the given command is not available for the socket where the packet came from. |
Basic functions to receive and send TCP packets for game purposes.
Definition in file tcp_game.cpp.
#define DEFINE_UNAVAILABLE_GAME_RECEIVE_COMMAND | ( | type | ) |
NetworkRecvStatus NetworkGameSocketHandler::NetworkPacketReceive_## type ##_command(Packet *p) \ { \ DEBUG(net, 0, "[tcp/game] received illegal packet type %d from client %d", \ type, this->client_id); \ return NETWORK_RECV_STATUS_MALFORMED_PACKET; \ }
Create stub implementations for all receive commands that only show a warning that the given command is not available for the socket where the packet came from.
type | the packet type to create the stub for |
Definition at line 158 of file tcp_game.cpp.
#define GAME_COMMAND | ( | type | ) | case type: return this->NetworkPacketReceive_ ## type ## _command(p); break; |
Defines a simple (switch) case for each network packet.
type | the packet type to create the case for |
Definition at line 63 of file tcp_game.cpp.
Referenced by NetworkGameSocketHandler::HandlePacket().