Basic functions to receive and send UDP packets. More...
#include "../../stdafx.h"
#include "../../date_func.h"
#include "../../debug.h"
#include "udp.h"
Go to the source code of this file.
Defines | |
#define | UDP_COMMAND(type) case type: this->NetworkPacketReceive_ ## type ## _command(p, client_addr); break; |
Defines a simple (switch) case for each network packet. | |
#define | DEFINE_UNAVAILABLE_UDP_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 UDP packets.
Definition in file udp.cpp.
#define DEFINE_UNAVAILABLE_UDP_RECEIVE_COMMAND | ( | type | ) |
void NetworkUDPSocketHandler::NetworkPacketReceive_## type ##_command(\ Packet *p, NetworkAddress *client_addr) { \ DEBUG(net, 0, "[udp] received packet type %d on wrong port from %s", \ type, client_addr->GetAddressAsString()); \ }
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 |
#define UDP_COMMAND | ( | type | ) | case type: this->NetworkPacketReceive_ ## type ## _command(p, client_addr); break; |
Defines a simple (switch) case for each network packet.
type | the packet type to create the case for |
Definition at line 286 of file udp.cpp.
Referenced by NetworkUDPSocketHandler::HandleUDPPacket().