12 #ifndef NETWORK_CORE_TCP_CONTENT_H
13 #define NETWORK_CORE_TCP_CONTENT_H
18 #include "../../debug.h"
Base socket handler for all Content TCP sockets.
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...
virtual ~NetworkContentSocketHandler()
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.
Base socket handler for all TCP sockets.
void CloseSocket()
Close the actual socket of the connection.
Subdirectory
The different kinds of subdirectories OpenTTD uses.
Network stuff has many things that needs to be included and/or implemented by default.
Basic functions to create, fill and read packets.
Internal entity of a packet.
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.