Changeset View
Changeset View
Standalone View
Standalone View
src/rpc/server.h
Show First 20 Lines • Show All 241 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Returns a list of registered commands | * Returns a list of registered commands | ||||
* @returns List of registered commands. | * @returns List of registered commands. | ||||
*/ | */ | ||||
std::vector<std::string> listCommands() const; | std::vector<std::string> listCommands() const; | ||||
/** | /** | ||||
* Appends a ContextFreeRPCCommand to the dispatch table. | * Appends a ContextFreeRPCCommand to the dispatch table. | ||||
* | |||||
* Returns false if RPC server is already running (dump concurrency | * Returns false if RPC server is already running (dump concurrency | ||||
* protection). | * protection). | ||||
* | |||||
* Commands cannot be overwritten (returns false). | * Commands cannot be overwritten (returns false). | ||||
* | |||||
* Commands with different method names but the same callback function will | |||||
* be considered aliases, and only the first registered method name will | |||||
* show up in the help text command listing. Aliased commands do not have | |||||
* to have the same behavior. Server and client code can distinguish | |||||
* between calls based on method name, and aliased commands can also | |||||
* register different names, types, and numbers of parameters. | |||||
*/ | */ | ||||
bool appendCommand(const std::string &name, | bool appendCommand(const std::string &name, | ||||
const ContextFreeRPCCommand *pcmd); | const ContextFreeRPCCommand *pcmd); | ||||
}; | }; | ||||
bool IsDeprecatedRPCEnabled(ArgsManager &args, const std::string &method); | bool IsDeprecatedRPCEnabled(ArgsManager &args, const std::string &method); | ||||
extern CRPCTable tableRPC; | extern CRPCTable tableRPC; | ||||
Show All 27 Lines |