#include <IOServerHandler.h>
Public Member Functions | |
IOServerHandler (int port, boost::function< void(IOServerHandler *, boost::shared_ptr< Session >)> af, boost::function< void(boost::shared_ptr< Session >)> ef, asio::io_service &io_service_) | |
virtual | ~IOServerHandler () |
virtual void | stop () |
void | run () |
void | asyncAccept () |
Private Member Functions | |
void | _signal () |
void | handleAsyncAccept (const asio::error_code &ec) |
Private Attributes | |
Synchronizer | accept_synchronizer |
asio::io_service & | io_service |
asio::ip::tcp::acceptor * | m_pAcceptor |
boost::shared_ptr< Session > | session_ptr |
boost::function< void(IOServerHandler *, boost::shared_ptr< Session >) | m_af ) |
boost::function< void(boost::shared_ptr < Session >)> | m_ef |
IOServerHandler::IOServerHandler | ( | int | port, | |
boost::function< void(IOServerHandler *, boost::shared_ptr< Session >)> | af, | |||
boost::function< void(boost::shared_ptr< Session >)> | ef, | |||
asio::io_service & | io_service_ | |||
) | [inline] |
References io_service, m_pAcceptor, and UT_DEBUGMSG.
virtual IOServerHandler::~IOServerHandler | ( | ) | [inline, virtual] |
References m_pAcceptor, stop(), and UT_DEBUGMSG.
void IOServerHandler::_signal | ( | ) | [inline, private] |
References m_af, session_ptr, UT_DEBUGMSG, and UT_return_if_fail.
void IOServerHandler::asyncAccept | ( | ) | [inline] |
References abicollab::service::error(), handleAsyncAccept(), io_service, m_ef, m_pAcceptor, session_ptr, UT_DEBUGMSG, and UT_return_if_fail.
Referenced by TCPAccountHandler::_handleAccept(), and run().
void IOServerHandler::handleAsyncAccept | ( | const asio::error_code & | ec | ) | [inline, private] |
References accept_synchronizer, Synchronizer::signal(), and UT_DEBUGMSG.
Referenced by asyncAccept().
void IOServerHandler::run | ( | ) | [inline] |
References asyncAccept(), and UT_DEBUGMSG.
Referenced by TCPAccountHandler::connect().
virtual void IOServerHandler::stop | ( | ) | [inline, virtual] |
References DELETEP, m_pAcceptor, and UT_DEBUGMSG.
Referenced by TCPAccountHandler::_teardownAndDestroyHandler(), and ~IOServerHandler().
Referenced by handleAsyncAccept().
asio::io_service& IOServerHandler::io_service [private] |
Referenced by asyncAccept(), and IOServerHandler().
boost::function<void (IOServerHandler*, boost::shared_ptr<Session>) IOServerHandler::m_af) [private] |
Referenced by _signal().
boost::function<void (boost::shared_ptr<Session>)> IOServerHandler::m_ef [private] |
Referenced by asyncAccept().
asio::ip::tcp::acceptor* IOServerHandler::m_pAcceptor [private] |
Referenced by asyncAccept(), IOServerHandler(), stop(), and ~IOServerHandler().
boost::shared_ptr<Session> IOServerHandler::session_ptr [private] |
Referenced by _signal(), and asyncAccept().