Asynchrounous HTTP JSON-RPC server implemented using libmicrohttpd and libjsoncpp.
More...
#include <json_rpc_http_server.hpp>
|
using | result_callback_type = std::function<void(std::optional<Json::Value>)> |
| Type alias for the callback function for returning response values to the server.
|
|
using | handler_callback_type |
| Callback function type provided by the application for processing requests.
|
|
Asynchrounous HTTP JSON-RPC server implemented using libmicrohttpd and libjsoncpp.
Definition at line 22 of file json_rpc_http_server.hpp.
◆ handler_callback_type
Initial value: std::function<
std::function< void(std::optional< Json::Value >)> result_callback_type
Type alias for the callback function for returning response values to the server.
Callback function type provided by the application for processing requests.
Definition at line 29 of file json_rpc_http_server.hpp.
◆ result_callback_type
Type alias for the callback function for returning response values to the server.
Definition at line 26 of file json_rpc_http_server.hpp.
◆ json_rpc_http_server() [1/3]
cbdc::rpc::json_rpc_http_server::json_rpc_http_server |
( |
network::endpoint_t | endpoint, |
|
|
bool | enable_cors = false ) |
|
explicit |
Construct a new server.
- Parameters
-
endpoint | network endpoint to listen on. |
enable_cors | true if CORS should be enabled. |
Definition at line 13 of file json_rpc_http_server.cpp.
◆ ~json_rpc_http_server()
cbdc::rpc::json_rpc_http_server::~json_rpc_http_server |
( |
| ) |
|
◆ json_rpc_http_server() [2/3]
◆ json_rpc_http_server() [3/3]
◆ init()
auto cbdc::rpc::json_rpc_http_server::init |
( |
| ) |
-> bool |
Start listening for incoming connections and processing requests.
- Returns
- true if listening was successful.
Definition at line 51 of file json_rpc_http_server.cpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ register_handler_callback()
void cbdc::rpc::json_rpc_http_server::register_handler_callback |
( |
handler_callback_type | handler_callback | ) |
|
The documentation for this class was generated from the following files: