#include <connection_base.hpp>
Public Member Functions | |
| const method * | get_method (const std::string &name) const |
| void | add_method (const std::string &name, const method &) |
| std::string | add_method (const method &m) |
| cmt::future< datavec > | raw_call (std::string &&mid, datavec &¶m) |
| std::string | create_method_id () |
| connection_base & | operator= (connection_base &&m) |
Protected Member Functions | |
| void | raw_call (std::string &&meth, datavec &¶m, const detail::pending_result::ptr &pr) |
| connection_base (detail::connection_base *b) | |
| connection_base (connection_base &&m) | |
Protected Attributes | |
| detail::connection_base * | my |
Defines the basic functionality for all RPC types. This includes maintaining a database of methods that may be called and a pending result queue.
Derived classes will implement the message packing/unpacking and transport method.
Definition at line 21 of file connection_base.hpp.
| void mace::rpc::connection_base::add_method | ( | const std::string & | name, |
| const method & | |||
| ) |
Add a method with the given ID
| std::string mace::rpc::connection_base::add_method | ( | const method & | m | ) |
Add a method and generate an ID
| const method* mace::rpc::connection_base::get_method | ( | const std::string & | name | ) | const |
| cmt::future<datavec> mace::rpc::connection_base::raw_call | ( | std::string && | mid, |
| datavec && | param | ||
| ) |
raw interface, returns the serialized data given the serialized parameters.
| mid | method name to call |
| void mace::rpc::connection_base::raw_call | ( | std::string && | meth, |
| datavec && | param, | ||
| const detail::pending_result::ptr & | pr | ||
| ) | [protected] |
Call method ID with param and use the given result handler if specified.
| pr | - result handler, if not specified result will be ignored. |
1.8.0