Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
httprpc.h
Go to the documentation of this file.
1// Copyright (c) 2015 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
5#ifndef BITCOIN_HTTPRPC_H
6#define BITCOIN_HTTPRPC_H
7
8#include <httpserver.h>
9#include <rpc/server.h>
10
11#include <any>
12
13class Config;
14
16private:
19
20 bool ProcessHTTPRequest(HTTPRequest *request);
21
22public:
23 const std::any &context;
24
28
30 HTTPRequest *request) {
31 return requestProcessor->ProcessHTTPRequest(request);
32 }
33};
34
40
42void InterruptHTTPRPC();
43
48void StopHTTPRPC();
49
54void StartREST(const std::any &context);
55
57void InterruptREST();
58
63void StopREST();
64
65#endif // BITCOIN_HTTPRPC_H
bool ProcessHTTPRequest(HTTPRequest *request)
Definition httprpc.cpp:295
const std::any & context
Definition httprpc.h:23
RPCServer & rpcServer
Definition httprpc.h:18
HTTPRPCRequestProcessor(Config &configIn, RPCServer &rpcServerIn, const std::any &contextIn)
Definition httprpc.h:25
static bool DelegateHTTPRequest(HTTPRPCRequestProcessor *requestProcessor, HTTPRequest *request)
Definition httprpc.h:29
In-flight HTTP request.
Definition httpserver.h:74
Class for registering and managing all RPC calls.
Definition server.h:40
void InterruptHTTPRPC()
Interrupt HTTP RPC subsystem.
Definition httprpc.cpp:477
void StopHTTPRPC()
Stop HTTP RPC subsystem.
Definition httprpc.cpp:481
void StartREST(const std::any &context)
Start HTTP REST subsystem.
Definition rest.cpp:832
void StopREST()
Stop HTTP REST subsystem.
Definition rest.cpp:844
void InterruptREST()
Interrupt RPC REST subsystem.
Definition rest.cpp:842
bool StartHTTPRPC(HTTPRPCRequestProcessor &httpRPCRequestProcessor)
Start HTTP RPC subsystem.
Definition httprpc.cpp:456
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85