#include <tracker_manager.hpp>

Public Member Functions | |
| timeout_handler (asio::strand &str) | |
| void | set_timeout (int completion_timeout, int read_timeout) |
| void | restart_read_timeout () |
| void | cancel () |
| virtual void | on_timeout ()=0 |
| virtual | ~timeout_handler () |
Private Types | |
| typedef boost::mutex | mutex_t |
Private Member Functions | |
| void | timeout_callback (asio::error_code const &) |
| boost::intrusive_ptr < timeout_handler > | self () |
Private Attributes | |
| asio::strand & | m_strand |
| boost::posix_time::ptime | m_start_time |
| boost::posix_time::ptime | m_read_time |
| asio::deadline_timer | m_timeout |
| int | m_completion_timeout |
| int | m_read_timeout |
| mutex_t | m_mutex |
| int | m_refs |
Friends | |
| void | intrusive_ptr_add_ref (timeout_handler const *) |
| void | intrusive_ptr_release (timeout_handler const *) |
Definition at line 155 of file tracker_manager.hpp.
typedef boost::mutex libtorrent::timeout_handler::mutex_t [private] |
Definition at line 189 of file tracker_manager.hpp.
| libtorrent::timeout_handler::timeout_handler | ( | asio::strand & | str | ) |
Definition at line 290 of file tracker_manager.cpp.
| virtual libtorrent::timeout_handler::~timeout_handler | ( | ) | [inline, virtual] |
Definition at line 168 of file tracker_manager.hpp.
| void libtorrent::timeout_handler::set_timeout | ( | int | completion_timeout, | |
| int | read_timeout | |||
| ) |
Definition at line 300 of file tracker_manager.cpp.
References asio::basic_deadline_timer< Time, TimeTraits, TimerService >::async_wait(), asio::detail::socket_ops::bind(), asio::basic_deadline_timer< Time, TimeTraits, TimerService >::expires_at(), m_completion_timeout, m_read_time, m_read_timeout, m_start_time, m_strand, m_timeout, timeout_callback(), and asio::io_service::strand::wrap().
Referenced by libtorrent::http_tracker_connection::http_tracker_connection(), and libtorrent::udp_tracker_connection::udp_tracker_connection().
| void libtorrent::timeout_handler::restart_read_timeout | ( | ) |
Definition at line 314 of file tracker_manager.cpp.
References m_read_time.
Referenced by libtorrent::udp_tracker_connection::announce_response(), libtorrent::udp_tracker_connection::connect_response(), libtorrent::http_tracker_connection::connected(), libtorrent::udp_tracker_connection::name_lookup(), libtorrent::http_tracker_connection::name_lookup(), libtorrent::http_tracker_connection::receive(), libtorrent::udp_tracker_connection::scrape_response(), and libtorrent::http_tracker_connection::sent().
| void libtorrent::timeout_handler::cancel | ( | ) |
Definition at line 319 of file tracker_manager.cpp.
References asio::basic_deadline_timer< Time, TimeTraits, TimerService >::cancel(), m_completion_timeout, and m_timeout.
Referenced by libtorrent::tracker_connection::close().
| virtual void libtorrent::timeout_handler::on_timeout | ( | ) | [pure virtual] |
Implemented in libtorrent::http_tracker_connection, and libtorrent::udp_tracker_connection.
Referenced by timeout_callback().
| void libtorrent::timeout_handler::timeout_callback | ( | asio::error_code const & | error | ) | [private] |
Definition at line 325 of file tracker_manager.cpp.
References asio::basic_deadline_timer< Time, TimeTraits, TimerService >::async_wait(), asio::detail::socket_ops::bind(), asio::basic_deadline_timer< Time, TimeTraits, TimerService >::expires_at(), m_completion_timeout, m_read_time, m_read_timeout, m_start_time, m_strand, m_timeout, on_timeout(), and asio::io_service::strand::wrap().
Referenced by set_timeout().
| boost::intrusive_ptr<timeout_handler> libtorrent::timeout_handler::self | ( | ) | [inline, private] |
Reimplemented in libtorrent::http_tracker_connection, and libtorrent::udp_tracker_connection.
Definition at line 174 of file tracker_manager.hpp.
| void intrusive_ptr_add_ref | ( | timeout_handler const * | c | ) | [friend] |
| void intrusive_ptr_release | ( | timeout_handler const * | c | ) | [friend] |
Reimplemented in libtorrent::http_tracker_connection, and libtorrent::udp_tracker_connection.
Definition at line 177 of file tracker_manager.hpp.
Referenced by set_timeout(), and timeout_callback().
boost::posix_time::ptime libtorrent::timeout_handler::m_start_time [private] |
Definition at line 180 of file tracker_manager.hpp.
Referenced by set_timeout(), and timeout_callback().
boost::posix_time::ptime libtorrent::timeout_handler::m_read_time [private] |
Definition at line 182 of file tracker_manager.hpp.
Referenced by restart_read_timeout(), set_timeout(), and timeout_callback().
Definition at line 184 of file tracker_manager.hpp.
Referenced by cancel(), set_timeout(), and timeout_callback().
int libtorrent::timeout_handler::m_completion_timeout [private] |
Definition at line 186 of file tracker_manager.hpp.
Referenced by cancel(), set_timeout(), and timeout_callback().
int libtorrent::timeout_handler::m_read_timeout [private] |
Definition at line 187 of file tracker_manager.hpp.
Referenced by set_timeout(), and timeout_callback().
mutex_t libtorrent::timeout_handler::m_mutex [mutable, private] |
Definition at line 190 of file tracker_manager.hpp.
Referenced by libtorrent::intrusive_ptr_add_ref(), and libtorrent::intrusive_ptr_release().
int libtorrent::timeout_handler::m_refs [mutable, private] |
Definition at line 191 of file tracker_manager.hpp.
Referenced by libtorrent::intrusive_ptr_add_ref(), and libtorrent::intrusive_ptr_release().
1.5.6