OpenTTD Source 20260311-master-g511d3794ce
tcp_content.h File Reference

Basic functions to receive and send TCP packets to/from the content server. More...

#include "os_abstraction.h"
#include "tcp.h"
#include "packet.h"
#include "../../debug.h"
#include "tcp_content_type.h"

Go to the source code of this file.

Data Structures

struct  IsEnumPacketType< PacketContentType >
 Mark PacketContentType as PacketType. More...
class  NetworkContentSocketHandler
 Base socket handler for all Content TCP sockets. More...

Enumerations

enum class  PacketContentType : uint8_t {
  ClientInfoList , ClientInfoID , ClientInfoExternalID , ClientInfoExternalIDMD5 ,
  ServerInfo , ClientContent , ServerContent
}
 Enum with all types of TCP content packets. More...

Functions

Subdirectory GetContentInfoSubDir (ContentType type)
 Helper to get the subdirectory a ContentInfo is located in.

Detailed Description

Basic functions to receive and send TCP packets to/from the content server.

Definition in file tcp_content.h.

Enumeration Type Documentation

◆ PacketContentType

enum class PacketContentType : uint8_t
strong

Enum with all types of TCP content packets.

Attention
The order MUST not be changed.
Enumerator
ClientInfoList 

Queries the content server for a list of info of a given content type.

ClientInfoID 

Queries the content server for information about a list of internal IDs.

ClientInfoExternalID 

Queries the content server for information about a list of external IDs.

ClientInfoExternalIDMD5 

Queries the content server for information about a list of external IDs and MD5.

ServerInfo 

Reply of content server with information about content.

ClientContent 

Request a content file given an internal ID.

ServerContent 

Reply with the content of the given ID.

Definition at line 23 of file tcp_content.h.

Function Documentation

◆ GetContentInfoSubDir()