10#ifndef NETWORK_CORE_TCP_CONTENT_H
11#define NETWORK_CORE_TCP_CONTENT_H
virtual bool Receive_CLIENT_CONTENT(Packet &p)
Client requesting the actual content: uint16_t count of unique ids uint32_t unique id (count times).
virtual bool Receive_CLIENT_INFO_EXTID(Packet &p)
Client requesting a list of content info based on an external 'unique' id; GRF ID for NewGRFS,...
virtual bool Receive_CLIENT_INFO_EXTID_MD5(Packet &p)
Client requesting a list of content info based on an external 'unique' id; GRF ID + MD5 checksum for ...
virtual bool Receive_SERVER_INFO(Packet &p)
Server sending list of content info: uint8_t type (invalid ID == does not exist) uint32_t id uint32_t...
virtual bool Receive_CLIENT_INFO_ID(Packet &p)
Client requesting a list of content info: uint16_t count of ids uint32_t id (count times).
virtual bool Receive_SERVER_CONTENT(Packet &p)
Server sending list of content info: uint32_t unique id uint32_t file size (0 == does not exist) stri...
NetworkContentSocketHandler(SOCKET s=INVALID_SOCKET)
Create a new cs socket handler for a given cs.
bool ReceivePackets()
Receive a packet at TCP level.
virtual bool Receive_CLIENT_INFO_LIST(Packet &p)
Client requesting a list of content info: uint8_t type uint32_t openttd version (or 0xFFFFFFFF if usi...
~NetworkContentSocketHandler() override
On destructing of this class, the socket needs to be closed.
bool ReceiveInvalidPacket(PacketContentType type)
Helper for logging receiving invalid packets.
bool HandlePacket(Packet &p)
Handle the given packet, i.e.
NetworkTCPSocketHandler(SOCKET s=INVALID_SOCKET)
Construct a socket handler for a TCP connection.
void CloseSocket()
Close the actual socket of the connection.
Functions related to debugging.
Subdirectory
The different kinds of subdirectories OpenTTD uses.
Includes and/or implementations for the network stuff.
Basic functions to create, fill and read packets.
Basic functions to receive and send TCP packets.
Subdirectory GetContentInfoSubDir(ContentType type)
Helper to get the subdirectory a ContentInfo is located in.
Basic types related to the content on the content server.
ContentType
The values in the enum are important; they are used as database 'keys'.
PacketContentType
Enum with all types of TCP content packets.