CRPCCommand::CRPCCommand

Constructors

Synopses

Declared in <rpc/server.h>

Construct a command from a plain RpcMethodFnType factory function pointer.

CRPCCommand(
    std::string category,
    RpcMethodFnType fn);
» more...

Construct a command from an Actor callback supporting multiple handlers.

CRPCCommand(
    std::string category,
    std::string name,
    Actor actor,
    std::vector<std::pair<std::string, bool>> args,
    intptr_t unique_id);
» more...

Parameters

NameDescription
categoryThe help category the command is grouped under.
fnFactory returning the method metadata and request handler.
nameThe method name clients invoke.
actorThe handler callback that processes the request.
argsMethod arguments paired with whether each is named-only.
unique_idIdentifier used to detect aliased commands.