OpenTTD Source 20261112-master-gbcbec5e63f
http_none.cpp
Go to the documentation of this file.
1/*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <https://www.gnu.org/licenses/old-licenses/gpl-2.0>.
6 */
7
9
10#include "../../stdafx.h"
11
12#include "http.h"
13
14#include "../../safeguards.h"
15
16/* static */ void NetworkHTTPSocketHandler::Connect(std::string_view, HTTPCallback *callback, std::string&&)
17{
18 /* No valid HTTP backend was compiled in, so we fail all HTTP requests. */
19 callback->OnFailure();
20}
21
23{
24}
25
27{
28}
29
static void Connect(std::string_view uri, HTTPCallback *callback, std::string &&data="")
Connect to the given URI.
Definition http_curl.cpp:92
static void HTTPReceive()
Do the receiving for all HTTP connections.
Basic functions to send and receive HTTP packets.
void NetworkHTTPInitialize()
Initialize the HTTP socket handler.
Definition http_none.cpp:26
void NetworkHTTPUninitialize()
Uninitialize the HTTP socket handler.
Definition http_none.cpp:30
A number of safeguards to prevent using unsafe methods.
Definition of base types and functions in a cross-platform compatible way.
Callback for when the HTTP handler has something to tell us.
Definition http.h:16
virtual void OnFailure()=0
An error has occurred and the connection has been closed.