10 #ifndef __PION_TCPTIMER_HEADER__
11 #define __PION_TCPTIMER_HEADER__
13 #include <boost/asio.hpp>
14 #include <boost/shared_ptr.hpp>
15 #include <boost/enable_shared_from_this.hpp>
16 #include <boost/thread/mutex.hpp>
17 #include <pion/PionConfig.hpp>
18 #include <pion/net/TCPConnection.hpp>
29 :
public boost::enable_shared_from_this<TCPTimer>
38 TCPTimer(TCPConnectionPtr& conn_ptr);
45 void start(
const boost::uint32_t seconds);
58 void timerCallback(
const boost::system::error_code& ec);
62 TCPConnectionPtr m_conn_ptr;
65 boost::asio::deadline_timer m_timer;
79 typedef boost::shared_ptr<TCPTimer> TCPTimerPtr;
TCPTimer(TCPConnectionPtr &conn_ptr)
void start(const boost::uint32_t seconds)
void cancel(void)
cancel the timer (operation completed)