# 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.

## Functions

| DEFINE_UNAVAILABLE_CONTENT_RECEIVE_COMMAND (PACKET_CONTENT_CLIENT_INFO_LIST)
| DEFINE_UNAVAILABLE_CONTENT_RECEIVE_COMMAND (PACKET_CONTENT_CLIENT_INFO_ID)
| DEFINE_UNAVAILABLE_CONTENT_RECEIVE_COMMAND (PACKET_CONTENT_CLIENT_INFO_EXTID)
| DEFINE_UNAVAILABLE_CONTENT_RECEIVE_COMMAND (PACKET_CONTENT_CLIENT_INFO_EXTID_MD5)
| DEFINE_UNAVAILABLE_CONTENT_RECEIVE_COMMAND (PACKET_CONTENT_SERVER_INFO)
| DEFINE_UNAVAILABLE_CONTENT_RECEIVE_COMMAND (PACKET_CONTENT_CLIENT_CONTENT)
| DEFINE_UNAVAILABLE_CONTENT_RECEIVE_COMMAND (PACKET_CONTENT_SERVER_CONTENT)

## 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 73 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 121 of file tcp_content.cpp.