|
JSON-RPC 2.0
JSON-RPC 2.0 Modern C++ Library
|
Type-safe handlers for JSON-RPC method calls and notifications. More...
#include <expected>#include <optional>#include <utility>#include <variant>#include <asio/awaitable.hpp>#include <nlohmann/json.hpp>#include <spdlog/spdlog.h>#include "jsonrpc/endpoint/jsonrpc_traits.hpp"Go to the source code of this file.
Classes | |
| class | jsonrpc::endpoint::TypedMethodHandler< ParamsType, ResultType, ErrorType > |
| class | jsonrpc::endpoint::TypedNotificationHandler< ParamsType, ErrorType > |
Namespaces | |
| namespace | jsonrpc |
| namespace | jsonrpc::endpoint |
Type-safe handlers for JSON-RPC method calls and notifications.
This file contains handler classes that safely adapt typed C++ functions to work with the JSON-RPC protocol. We use class-based handlers instead of direct lambda functions because:
This design prevents potential memory corruption that could occur with direct lambda captures in coroutines, especially when those lambdas capture by reference.
Definition in file typed_handlers.hpp.