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

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

#include "tcp.h"

Go to the source code of this file.

Data Structures

struct  HTTPCallback
 Callback for when the HTTP handler has something to tell us. More...
class  NetworkHTTPSocketHandler
 Base socket handler for HTTP traffic. More...

Functions

void NetworkHTTPInitialize ()
 Initialize the HTTP socket handler.
void NetworkHTTPUninitialize ()
 Uninitialize the HTTP socket handler.

Variables

constexpr int HTTP_429_TOO_MANY_REQUESTS = 429
 HTTP error code for when the client is doing too many requests.

Detailed Description

Basic functions to send and receive HTTP packets.

Definition in file http.h.

Function Documentation

◆ NetworkHTTPInitialize()

void NetworkHTTPInitialize ( )

Initialize the HTTP socket handler.

Definition at line 257 of file http_curl.cpp.

References _http_thread, _http_thread_exit, _winhttp_session, Debug, FileExists(), GetNetworkRevisionString(), HttpThread(), StartNewThread(), and StaticWinHttpCallback().

Referenced by NetworkStartUp().

◆ NetworkHTTPUninitialize()

void NetworkHTTPUninitialize ( )

Uninitialize the HTTP socket handler.

Definition at line 292 of file http_curl.cpp.

References _http_cv, _http_mutex, _http_thread, _http_thread_exit, _winhttp_session, NetworkHTTPSocketHandler::HTTPReceive(), and lock.

Referenced by NetworkShutDown().

Variable Documentation

◆ HTTP_429_TOO_MANY_REQUESTS

int HTTP_429_TOO_MANY_REQUESTS = 429
constexpr

HTTP error code for when the client is doing too many requests.

Definition at line 15 of file http.h.

Referenced by HttpThread(), and NetworkHTTPRequest::WinHttpCallback().