#include <tcp_server.hpp>
Inherits mace::rpc::json::detail::tcp_server_base.
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()) |
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.