|
Wire Sysio Wire Sysion 1.0.0
|
Implements JSON-RPC 2.0 over a set of io streams. More...
#include <variant_connection.hpp>
Public Types | |
| typedef std::function< variant(const variants &)> | method |
| typedef std::function< variant(const variant_object &)> | named_param_method |
Public Member Functions | |
| variant_connection (fc::variant_stream::ptr in, fc::variant_stream::ptr out) | |
| ~variant_connection () | |
| future< void > | exec () |
| logger | get_logger () const |
| void | set_logger (const logger &l) |
server interface | |
Adding methods to the interface allows the remote side to call them. | |
| void | add_method (const fc::string &name, method) |
| void | add_named_param_method (const fc::string &name, named_param_method) |
| void | remove_method (const fc::string &name) |
client interface | |
| void | notice (const fc::string &method) |
| void | notice (const fc::string &method, const variants &args) |
| void | notice (const fc::string &method, const variant_object &named_args) |
| future< fc::variant > | async_call (const fc::string &method, const variant_object &args) |
| args will be handled as named params | |
| future< fc::variant > | async_call (const fc::string &method, mutable_variant_object args) |
| future< fc::variant > | async_call (const fc::string &method, const variants &args) |
| Sending in an array of variants will be handled as positional arguments. | |
| future< fc::variant > | async_call (const fc::string &method) |
| future< fc::variant > | async_call (const fc::string &method, const fc::variant &a1) |
| future< fc::variant > | async_call (const fc::string &method, const fc::variant &a1, const fc::variant &a2) |
| future< fc::variant > | async_call (const fc::string &method, const fc::variant &a1, const fc::variant &a2, const fc::variant &a3) |
| template<typename Result > | |
| Result | call (const fc::string &method, const fc::variant &a1, const fc::variant &a2, const fc::variant &a3, microseconds timeout=microseconds::maximum()) |
| template<typename Result > | |
| Result | call (const fc::string &method, const fc::variant &a1, const fc::variant &a2, microseconds timeout=microseconds::maximum()) |
| template<typename Result > | |
| Result | call (const fc::string &method, const fc::variant &a1, microseconds timeout=microseconds::maximum()) |
| template<typename Result > | |
| Result | call (const fc::string &method, variant_object a1, microseconds timeout=microseconds::maximum()) |
| template<typename Result > | |
| Result | call (const fc::string &method, mutable_variant_object a1, microseconds timeout=microseconds::maximum()) |
| template<typename Result > | |
| Result | call (const fc::string &method, microseconds timeout=microseconds::maximum()) |
| variant | call (const fc::string &method, const variant_object &named_args) |
| Sending in a variant_object will be issued as named parameters. | |
Each JSON RPC message is expected to be on its own line, violators will be prosecuted to the fullest extent of the law.
Definition at line 18 of file variant_connection.hpp.
| std::function<variant(const variants&)> fc::rpc::variant_connection::method |
Definition at line 21 of file variant_connection.hpp.
| std::function<variant(const variant_object&)> fc::rpc::variant_connection::named_param_method |
Definition at line 22 of file variant_connection.hpp.
| fc::rpc::variant_connection::variant_connection | ( | fc::variant_stream::ptr | in, |
| fc::variant_stream::ptr | out ) |
| fc::rpc::variant_connection::~variant_connection | ( | ) |
| void fc::rpc::variant_connection::add_method | ( | const fc::string & | name, |
| method | ) |
| void fc::rpc::variant_connection::add_named_param_method | ( | const fc::string & | name, |
| named_param_method | ) |
| future< fc::variant > fc::rpc::variant_connection::async_call | ( | const fc::string & | method | ) |
| future< fc::variant > fc::rpc::variant_connection::async_call | ( | const fc::string & | method, |
| const fc::variant & | a1 ) |
| future< fc::variant > fc::rpc::variant_connection::async_call | ( | const fc::string & | method, |
| const fc::variant & | a1, | ||
| const fc::variant & | a2 ) |
| future< fc::variant > fc::rpc::variant_connection::async_call | ( | const fc::string & | method, |
| const fc::variant & | a1, | ||
| const fc::variant & | a2, | ||
| const fc::variant & | a3 ) |
| future< fc::variant > fc::rpc::variant_connection::async_call | ( | const fc::string & | method, |
| const variant_object & | args ) |

| future< fc::variant > fc::rpc::variant_connection::async_call | ( | const fc::string & | method, |
| const variants & | args ) |
| future< fc::variant > fc::rpc::variant_connection::async_call | ( | const fc::string & | method, |
| mutable_variant_object | args ) |
|
inline |
Definition at line 80 of file variant_connection.hpp.

|
inline |
|
inline |
| variant fc::rpc::variant_connection::call | ( | const fc::string & | method, |
| const variant_object & | named_args ) |
|
inline |
|
inline |
Definition at line 114 of file variant_connection.hpp.

|
inline |
| future< void > fc::rpc::variant_connection::exec | ( | ) |
Starts processing messages from input
| logger fc::rpc::variant_connection::get_logger | ( | ) | const |
| void fc::rpc::variant_connection::notice | ( | const fc::string & | method | ) |
| void fc::rpc::variant_connection::notice | ( | const fc::string & | method, |
| const variant_object & | named_args ) |
| void fc::rpc::variant_connection::notice | ( | const fc::string & | method, |
| const variants & | args ) |
| void fc::rpc::variant_connection::remove_method | ( | const fc::string & | name | ) |
| void fc::rpc::variant_connection::set_logger | ( | const logger & | l | ) |