OpenTTD Source 20260621-master-g720d10536d
tcp.h File Reference

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

#include "address.h"
#include "packet.h"
#include <atomic>
#include <chrono>
#include <thread>

Go to the source code of this file.

Data Structures

class  NetworkTCPSocketHandler
 Base socket handler for all TCP sockets. More...
class  TCPConnecter
 "Helper" class for creating TCP connections in a non-blocking manner More...
class  TCPServerConnecter
 TCPConnecter that resolves the server invite code if needed before connecting. More...

Enumerations

enum class  SendPacketsState : uint8_t { Closed , NoneSent , PartlySent , AllSent }
 The states of sending the packets. More...

Detailed Description

Basic functions to receive and send TCP packets.

Definition in file tcp.h.

Enumeration Type Documentation

◆ SendPacketsState

enum class SendPacketsState : uint8_t
strong

The states of sending the packets.

Enumerator
Closed 

The connection got closed.

NoneSent 

The buffer is still full, so no (parts of) packets could be sent.

PartlySent 

The packets are partly sent; there are more packets to be sent in the queue.

AllSent 

All packets in the queue are sent.

Definition at line 21 of file tcp.h.