#include <connection.hpp>
Classes | |
struct | function_filter |
Public Types | |
typedef boost::shared_ptr < connection > | ptr |
typedef boost::weak_ptr < connection > | wptr |
Public Member Functions | |
connection (mace::cmt::thread *t=&mace::cmt::thread::current()) | |
mace::cmt::thread * | get_thread () const |
void | add_method (const std::string &mid, const rpc_method &m) |
std::string | add_method (const rpc_method &m) |
template<typename ParamSeq > | |
mace::cmt::future< json::value > | call_fused (const std::string &method_name, const ParamSeq ¶m) |
template<typename ParamSeq > | |
void | create_call (const std::string &method_name, const ParamSeq ¶m, json::value &msg) |
template<typename R , typename ParamSeq > | |
mace::cmt::future< R > | call_fused (const std::string &method_name, const ParamSeq ¶m) |
template<typename ParamSeq > | |
void | notice_fused (const std::string &method_name, const ParamSeq ¶m) |
void | handle_call (const json::value &c, json::value &result) |
void | handle_notice (const json::value &m) |
Public Attributes | |
boost::signal< void()> | closed |
Protected Member Functions | |
template<typename Seq > | |
void | pack_params (json::value &v, const Seq &s, const boost::true_type &is_named) |
template<typename Seq > | |
void | pack_params (json::value &v, const Seq &s, const boost::false_type &is_named) |
void | break_promises () |
void | handle_call (const json::value &m) |
void | handle_result (const json::value &m) |
void | handle_error (const json::value &m) |
virtual void | send (const json::value &msg) |
virtual void | send (const json::value &msg, const connection::pending_result::ptr &pr) |
virtual uint64_t | next_method_id () |
Friends | |
class | connection_private |
Manages RPC call state including:
Does not implement communication details which are provided by derived classes which reimplement send() and call the protected handler methods.
Definition at line 53 of file connection.hpp.
t | - the thread in which messages will be sent and callbacks invoked |
std::string mace::rpc::json::connection::add_method | ( | const rpc_method & | m | ) |
The connection will generate and return a method name