#include <server.h>
Definition at line 147 of file server.h.
◆ Actor
RPC method handler reading request and assigning result.
Should return true if request is fully handled, false if it should be passed on to subsequent handlers.
Definition at line 152 of file server.h.
◆ CRPCCommand() [1/2]
CRPCCommand::CRPCCommand |
( |
std::string |
_category, |
|
|
std::string |
_name, |
|
|
Actor |
_actor, |
|
|
std::vector< std::pair< std::string, bool > > |
_args, |
|
|
intptr_t |
_unique_id |
|
) |
| |
|
inline |
Constructor taking Actor callback supporting multiple handlers.
Definition at line 157 of file server.h.
◆ CRPCCommand() [2/2]
Simplified constructor taking plain RpcMethodFnType function pointer.
Definition at line 165 of file server.h.
◆ actor
◆ argNames
std::vector<std::pair<std::string, bool> > CRPCCommand::argNames |
List of method arguments and whether they are named-only.
Incoming RPC requests contain a "params" field that can either be an array containing unnamed arguments or an object containing named arguments. The "argNames" vector is used in the latter case to transform the params object into an array. Each argument in "argNames" gets mapped to a unique position in the array, based on the order it is listed, unless the argument is a named-only argument with argNames[x].second set to true. Named-only arguments are combined into a JSON object that is appended after other arguments, see transformNamedArguments for details.
Definition at line 187 of file server.h.
◆ category
std::string CRPCCommand::category |
◆ name
std::string CRPCCommand::name |
◆ unique_id
The documentation for this class was generated from the following file: