# tcp_content.cpp File Reference

Basic functions to receive and send Content packets. More...

`#include "../../stdafx.h"`
`#include "tcp_content.h"`

Go to the source code of this file.

## Defines
#define | CONTENT_COMMAND(type) case type: return this->NetworkPacketReceive_ ## type ## _command(p); break;
| Defines a simple (switch) case for each network packet.
#define | DEFINE_UNAVAILABLE_CONTENT_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.

## Detailed Description

Basic functions to receive and send Content packets.

Definition in file tcp_content.cpp.

## Define Documentation

#define CONTENT_COMMAND | ( | type |  | ) | case type: return this->NetworkPacketReceive_ ## type ## _command(p); break;

Defines a simple (switch) case for each network packet.

Parameters:

  | type | the packet type to create the case for

Definition at line 102 of file tcp_content.cpp.

Referenced by NetworkContentSocketHandler::HandlePacket().

#define DEFINE_UNAVAILABLE_CONTENT_RECEIVE_COMMAND | ( | type |  | ) |

Value:

    bool NetworkContentSocketHandler::NetworkPacketReceive_## type ##_command(Packet *p) \
    { \
      DEBUG(net, 0, "[tcp/content] received illegal packet type %d from %s", \
          type, this->client_addr.GetAddressAsString()); \
      return false; \
    }

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.

Parameters:

  | type | the packet type to create the stub for

Definition at line 152 of file tcp_content.cpp.