OpenTTD Source: src/network/core/tcp_http.cpp File Reference

OpenTTD Source 1.11.0-RC1

Macros | Variables
tcp_http.cpp File Reference
`#include "../../stdafx.h"`
`#include "../../debug.h"`
`#include "../../rev.h"`
`#include "../network_func.h"`
`#include "tcp_http.h"`
`#include "../../safeguards.h"`

Go to the source code of this file.

## Macros
#define | return_error(msg) { DEBUG(net, 0, msg); return -1; }
| Helper to simplify the error handling. More...

## Variables
static std::vector< NetworkHTTPSocketHandler * > | _http_connections
| List of open HTTP connections.
static const char *const | NEWLINE = "\r\n"
| End of line marker.
static const char *const | END_OF_HEADER = "\r\n\r\n"
| End of header marker.
static const char *const | HTTP_1_0 = "HTTP/1.0 "
| Preamble for HTTP 1.0 servers.
static const char *const | HTTP_1_1 = "HTTP/1.1 "
| Preamble for HTTP 1.1 servers.
static const char *const | CONTENT_LENGTH = "Content-Length: "
| Header for the length of the content.
static const char *const | LOCATION = "Location: "
| Header for location.

## Detailed Description

Basic functions to receive and send HTTP TCP packets.

Definition in file tcp_http.cpp.

## Macro Definition Documentation

## ◆ return_error

#define return_error | ( |  | msg | ) | { DEBUG(net, 0, msg); return -1; }

Helper to simplify the error handling.

Parameters

  msg | the error message to show.

Definition at line 87 of file tcp_http.cpp.