OpenTTD Source 20260109-master-g241b5fcdfe
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
10#include "../../stdafx.h"
11#include "../../debug.h"
12#include "../../rev.h"
13#include "../network_internal.h"
14
15#include "http.h"
16
17#include "../../safeguards.h"
18
19/* static */ void NetworkHTTPSocketHandler::Connect(std::string_view, HTTPCallback *callback, std::string&&)
20{
21 /* No valid HTTP backend was compiled in, so we fail all HTTP requests. */
22 callback->OnFailure();
23}
24
26{
27}
28
30{
31}
32
static void Connect(std::string_view uri, HTTPCallback *callback, std::string &&data="")
Connect to the given URI.
Definition http_curl.cpp:91
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:29
void NetworkHTTPUninitialize()
Uninitialize the HTTP socket handler.
Definition http_none.cpp:33
Callback for when the HTTP handler has something to tell us.
Definition http.h:18
virtual void OnFailure()=0
An error has occurred and the connection has been closed.