MACE  1.0.0
 All Classes Namespaces Files Functions Variables Enumerations Defines
Public Member Functions | Protected Member Functions | Protected Attributes
mace::rpc::connection_base Class Reference

#include <connection_base.hpp>

Inheritance diagram for mace::rpc::connection_base:
mace::rpc::connection< IODelegate > mace::rpc::tcp::connection< IODelegate > mace::rpc::http::connection< IODelegate >

List of all members.

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 &&param)
std::string create_method_id ()
connection_baseoperator= (connection_base &&m)

Protected Member Functions

void raw_call (std::string &&meth, datavec &&param, const detail::pending_result::ptr &pr)
 connection_base (detail::connection_base *b)
 connection_base (connection_base &&m)

Protected Attributes

detail::connection_base * my

Detailed Description

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.


Member Function Documentation

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
Returns:
null if no method with ID known.
cmt::future<datavec> mace::rpc::connection_base::raw_call ( std::string &&  mid,
datavec &&  param 
)

raw interface, returns the serialized data given the serialized parameters.

Parameters:
midmethod 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.

Parameters:
pr- result handler, if not specified result will be ignored.

The documentation for this class was generated from the following file: