OpenTTD
|
Basic functions to receive and send HTTP TCP packets. More...
#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. |
Variables | |
static SmallVector < NetworkHTTPSocketHandler *, 1 > | _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. |
Basic functions to receive and send HTTP TCP packets.
Definition in file tcp_http.cpp.
#define return_error | ( | msg | ) | { DEBUG(net, 0, msg); return -1; } |
Helper to simplify the error handling.
msg | the error message to show. |
Definition at line 91 of file tcp_http.cpp.
Referenced by NetworkHTTPSocketHandler::Connect(), and NetworkHTTPSocketHandler::HandleHeader().
|
static |
List of open HTTP connections.
Definition at line 26 of file tcp_http.cpp.