MACE  1.0.0
 All Classes Namespaces Files Functions Variables Enumerations Defines
Public Types | Public Member Functions
mace::rpc::json::tcp_server< InterfaceType > Class Template Reference

#include <tcp_server.hpp>

Inherits mace::rpc::json::detail::tcp_server_base.

List of all members.

Public Types

typedef boost::shared_ptr
< tcp_server
ptr

Public Member Functions

template<typename SessionType >
 tcp_server (const boost::function< boost::shared_ptr< SessionType >()> &sg, uint16_t port, mace::cmt::thread *t=&mace::cmt::thread::current())
template<typename SessionType >
 tcp_server (const boost::shared_ptr< SessionType > &shared_session, uint16_t port, mace::cmt::thread *t=&mace::cmt::thread::current())

Detailed Description

template<typename InterfaceType>
class mace::rpc::json::tcp_server< InterfaceType >

A services listens for new incoming tcp connections and opens a JSON-RPC tcp_connection with InterfaceType's method.

Each connection has the opportunity to have a unique session by creating a new instance of SessionType and providing a functor that will generate a new session.

The simplest case is the shared session in which all connections invoke methods on the same instance of InterfaceType.

Definition at line 22 of file tcp_server.hpp.


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