BitShares-Core
7.0.2
BitShares blockchain node software and command-line wallet software
|
Go to the documentation of this file.
5 namespace fc {
namespace rpc {
13 _methods.emplace(std::pair<std::string,method>(name,std::move(m)));
23 auto method_itr = _methods.find(method_name);
24 if( method_itr == _methods.end() && _unhandled )
25 return _unhandled( method_name, args );
26 FC_ASSERT( method_itr != _methods.end(),
"Unknown Method: ${name}", (
"name",method_name) );
27 return method_itr->second(args);
43 _awaiting.erase(await);
54 auto itr = _awaiting.find(request_id);
60 for(
auto item : _awaiting )
66 _unhandled = unhandled;
void handle_reply(const response &response)
a placeholder for the result of an asynchronous operation.
void add_method(const std::string &name, method m)
#define FC_EXCEPTION(EXCEPTION_TYPE, FORMAT,...)
Used to generate a useful error report when an exception is thrown.
variant wait_for_response(const variant &request_id)
void on_unhandled(const std::function< variant(const string &, const variants &)> &unhandled)
static ptr create(const char *desc FC_TASK_NAME_DEFAULT_ARG)
std::shared_ptr< exception > exception_ptr
std::vector< variant > variants
std::function< variant(const variants &)> method
request start_remote_call(const string &method_name, variants args)
optional< fc::variant > result
void remove_method(const std::string &name)
#define FC_ASSERT(TEST,...)
Checks a condition and throws an assert_exception if the test is FALSE.
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
const T & wait(const microseconds &timeout=microseconds::maximum()) const
variant local_call(const string &method_name, const variants &args)
optional< error_object > error