Constructors

Synopses

Declared in <rpc/server.h>

Construct a command from a plain RpcMethodFnType factory function pointer.

CRPCCommand(
    std::string category,
    RpcMethodFnType fn);

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);

Parameters

Name

Description

category

The help category the command is grouped under.

fn

Factory returning the method metadata and request handler.

name

The method name clients invoke.

actor

The handler callback that processes the request.

args

Method arguments paired with whether each is named‐only.

unique_id

Identifier used to detect aliased commands.

Created with MrDocs