#include <json_rpc.hpp>
◆ JsonRpcPeer() [1/2]
Wrap a message channel.
The peer installs an on_message handler on the channel; do not replace it after construction.
◆ ~JsonRpcPeer()
| pulp::runtime::JsonRpcPeer::~JsonRpcPeer |
( |
| ) |
|
◆ JsonRpcPeer() [2/2]
| pulp::runtime::JsonRpcPeer::JsonRpcPeer |
( |
const JsonRpcPeer & | | ) |
|
|
delete |
◆ notify()
| bool pulp::runtime::JsonRpcPeer::notify |
( |
std::string_view | method, |
|
|
std::string_view | params_json ) |
◆ on_notification()
Register a notification handler.
◆ operator=()
◆ register_method()
| void pulp::runtime::JsonRpcPeer::register_method |
( |
std::string_view | name, |
|
|
JsonRpcMethodHandler | handler ) |
Register a method handler.
Replacing a handler with nullptr unregisters.
◆ send_request()
| bool pulp::runtime::JsonRpcPeer::send_request |
( |
std::string_view | method, |
|
|
std::string_view | params_json, |
|
|
JsonRpcResponseCallback | callback ) |
Send a request.
params_json must be a JSON-encoded array or object (or empty for no params). The callback fires exactly once with the response. Returns false if the channel is closed.
The documentation for this class was generated from the following file:
- /home/runner/work/pulp/pulp/core/runtime/include/pulp/runtime/json_rpc.hpp