#include <session_impl.hpp>
Public Types | |
| typedef std::map < boost::shared_ptr < stream_socket > , boost::intrusive_ptr < peer_connection > > | connection_map |
| typedef std::map< sha1_hash, boost::shared_ptr< torrent > > | torrent_map |
| typedef std::deque < boost::intrusive_ptr < peer_connection > > | connection_queue |
| typedef boost::recursive_mutex | mutex_t |
| typedef std::list < boost::function < boost::shared_ptr < torrent_plugin >torrent *)> > | extension_list_t |
Public Member Functions | |
| session_impl (std::pair< int, int > listen_port_range, fingerprint const &cl_fprint, char const *listen_interface="0.0.0.0") | |
| ~session_impl () | |
| void | add_extension (boost::function< boost::shared_ptr< torrent_plugin >(torrent *)> ext) |
| void | operator() () |
| void | open_listen_port () |
| void | async_accept () |
| void | on_incoming_connection (boost::shared_ptr< stream_socket > const &s, boost::weak_ptr< socket_acceptor > const &as, asio::error_code const &e) |
| boost::weak_ptr< torrent > | find_torrent (const sha1_hash &info_hash) |
| peer_id const & | get_peer_id () const |
| void | process_connection_queue () |
| void | close_connection (boost::intrusive_ptr< peer_connection > const &p) |
| void | connection_completed (boost::intrusive_ptr< peer_connection > const &p) |
| void | connection_failed (boost::shared_ptr< stream_socket > const &s, tcp::endpoint const &a, char const *message) |
| void | set_settings (session_settings const &s) |
| session_settings const & | settings () const |
| void | add_dht_node (std::pair< std::string, int > const &node) |
| void | add_dht_node (udp::endpoint n) |
| void | add_dht_router (std::pair< std::string, int > const &node) |
| void | set_dht_settings (dht_settings const &s) |
| dht_settings const & | kad_settings () const |
| void | start_dht (entry const &startup_state) |
| void | stop_dht () |
| entry | dht_state () const |
| bool | is_aborted () const |
| void | set_ip_filter (ip_filter const &f) |
| bool | listen_on (std::pair< int, int > const &port_range, const char *net_interface=0) |
| bool | is_listening () const |
| torrent_handle | add_torrent (torrent_info const &ti, boost::filesystem::path const &save_path, entry const &resume_data, bool compact_mode, int block_size) |
| torrent_handle | add_torrent (char const *tracker_url, sha1_hash const &info_hash, char const *name, boost::filesystem::path const &save_path, entry const &resume_data, bool compact_mode, int block_size) |
| void | remove_torrent (torrent_handle const &h) |
| std::vector< torrent_handle > | get_torrents () |
| void | set_severity_level (alert::severity_t s) |
| std::auto_ptr< alert > | pop_alert () |
| int | upload_rate_limit () const |
| int | download_rate_limit () const |
| void | set_download_rate_limit (int bytes_per_second) |
| void | set_upload_rate_limit (int bytes_per_second) |
| void | set_max_half_open_connections (int limit) |
| void | set_max_connections (int limit) |
| void | set_max_uploads (int limit) |
| int | num_uploads () const |
| int | num_connections () const |
| session_status | status () const |
| void | set_peer_id (peer_id const &id) |
| void | set_key (int key) |
| unsigned short | listen_port () const |
| void | abort () |
| torrent_handle | find_torrent_handle (sha1_hash const &info_hash) |
| void | second_tick (asio::error_code const &e) |
| void | check_invariant (const char *place=0) |
Public Attributes | |
| mutex_t | m_mutex |
| alert_manager | m_alerts |
| io_service | m_io_service |
| asio::strand | m_strand |
| bandwidth_manager | m_dl_bandwidth_manager |
| bandwidth_manager | m_ul_bandwidth_manager |
| tracker_manager | m_tracker_manager |
| torrent_map | m_torrents |
| connection_map | m_connections |
| connection_map | m_half_open |
| connection_queue | m_connection_queue |
| ip_filter | m_ip_filter |
| peer_id | m_peer_id |
| int | m_key |
| std::pair< int, int > | m_listen_port_range |
| tcp::endpoint | m_listen_interface |
| boost::shared_ptr < socket_acceptor > | m_listen_socket |
| session_settings | m_settings |
| volatile bool | m_abort |
| int | m_max_uploads |
| int | m_max_connections |
| int | m_half_open_limit |
| stat | m_stat |
| bool | m_incoming_connection |
| file_pool | m_files |
| boost::posix_time::ptime | m_last_tick |
| boost::intrusive_ptr < dht::dht_tracker > | m_dht |
| dht_settings | m_dht_settings |
| deadline_timer | m_timer |
| extension_list_t | m_extensions |
| checker_impl | m_checker_impl |
| boost::scoped_ptr< boost::thread > | m_thread |
| boost::scoped_ptr< boost::thread > | m_checker_thread |
Friends | |
| class | ::libtorrent::peer_connection |
| struct | checker_impl |
| class | invariant_access |
Definition at line 159 of file session_impl.hpp.
| typedef std::map<boost::shared_ptr<stream_socket> , boost::intrusive_ptr<peer_connection> > libtorrent::aux::session_impl::connection_map |
Definition at line 168 of file session_impl.hpp.
| typedef std::map<sha1_hash, boost::shared_ptr<torrent> > libtorrent::aux::session_impl::torrent_map |
Definition at line 169 of file session_impl.hpp.
| typedef std::deque<boost::intrusive_ptr<peer_connection> > libtorrent::aux::session_impl::connection_queue |
Definition at line 171 of file session_impl.hpp.
| typedef boost::recursive_mutex libtorrent::aux::session_impl::mutex_t |
Definition at line 192 of file session_impl.hpp.
| typedef std::list<boost::function<boost::shared_ptr< torrent_plugin>torrent*)> > libtorrent::aux::session_impl::extension_list_t |
Definition at line 393 of file session_impl.hpp.
| libtorrent::aux::session_impl::session_impl | ( | std::pair< int, int > | listen_port_range, | |
| fingerprint const & | cl_fprint, | |||
| char const * | listen_interface = "0.0.0.0" | |||
| ) |
Definition at line 448 of file session_impl.cpp.
References libtorrent::big_number::begin(), asio::detail::socket_ops::bind(), libtorrent::big_number::end(), listen_port(), m_checker_impl, m_checker_thread, m_dl_bandwidth_manager, m_key, m_peer_id, m_strand, m_thread, m_timer, m_ul_bandwidth_manager, second_tick(), libtorrent::fingerprint::to_string(), and asio::io_service::strand::wrap().
| libtorrent::aux::session_impl::~session_impl | ( | ) |
Definition at line 1551 of file session_impl.cpp.
References l, libtorrent::aux::checker_impl::m_abort, m_abort, m_checker_impl, m_checker_thread, libtorrent::aux::checker_impl::m_cond, m_connections, m_io_service, libtorrent::aux::checker_impl::m_mutex, m_mutex, m_thread, m_torrents, libtorrent::aux::checker_impl::m_torrents, asio::io_service::stop(), and stop_dht().
| void libtorrent::aux::session_impl::add_extension | ( | boost::function< boost::shared_ptr< torrent_plugin >(torrent *)> | ext | ) |
| void libtorrent::aux::session_impl::operator() | ( | ) |
Definition at line 1011 of file session_impl.cpp.
References libtorrent::tracker_manager::abort_all_requests(), asio::ip::basic_endpoint< InternetProtocol >::address(), asio::detail::socket_ops::bind(), libtorrent::tracker_manager::empty(), asio::placeholders::iterator, libtorrent::tracker_request::key, l, libtorrent::tracker_request::listen_port, m_abort, m_connection_queue, m_connections, m_half_open, m_io_service, m_key, m_listen_interface, m_listen_port_range, m_mutex, m_settings, m_strand, m_torrents, m_tracker_manager, open_listen_port(), asio::ip::basic_endpoint< InternetProtocol >::port(), libtorrent::tracker_manager::queue_request(), asio::io_service::reset(), asio::io_service::run(), asio::io_service::stop(), libtorrent::session_settings::stop_tracker_timeout, and asio::io_service::strand::wrap().
| void libtorrent::aux::session_impl::open_listen_port | ( | ) |
Definition at line 583 of file session_impl.cpp.
References asio::ip::basic_endpoint< InternetProtocol >::address(), async_accept(), asio::system_error::code(), simple_client::e, libtorrent::alert::fatal, asio::detail::error_base< T >::host_not_found, m_alerts, m_io_service, m_listen_interface, m_listen_port_range, m_listen_socket, asio::ip::basic_endpoint< InternetProtocol >::port(), libtorrent::alert_manager::post_alert(), asio::ip::basic_endpoint< InternetProtocol >::protocol(), libtorrent::alert_manager::should_post(), asio::ip::address::to_string(), and asio::system_error::what().
Referenced by listen_on(), and operator()().
| void libtorrent::aux::session_impl::async_accept | ( | ) |
Definition at line 685 of file session_impl.cpp.
References asio::detail::socket_ops::bind(), c, m_io_service, m_listen_socket, and on_incoming_connection().
Referenced by open_listen_port().
| void libtorrent::aux::session_impl::on_incoming_connection | ( | boost::shared_ptr< stream_socket > const & | s, | |
| boost::weak_ptr< socket_acceptor > const & | as, | |||
| asio::error_code const & | e | |||
| ) |
Referenced by async_accept().
| boost::weak_ptr< torrent > libtorrent::aux::session_impl::find_torrent | ( | const sha1_hash & | info_hash | ) |
Definition at line 1114 of file session_impl.cpp.
References asio::placeholders::iterator, and m_torrents.
Referenced by add_torrent(), libtorrent::peer_connection::attach_to_torrent(), libtorrent::call_member(), libtorrent::torrent_handle::connect_peer(), libtorrent::torrent_handle::file_progress(), libtorrent::torrent_handle::force_reannounce(), libtorrent::torrent_handle::get_download_queue(), libtorrent::torrent_handle::get_peer_info(), libtorrent::torrent_handle::is_valid(), libtorrent::torrent_handle::status(), and libtorrent::torrent_handle::write_resume_data().
| peer_id const& libtorrent::aux::session_impl::get_peer_id | ( | ) | const [inline] |
Definition at line 196 of file session_impl.hpp.
References m_peer_id.
Referenced by libtorrent::torrent::generate_tracker_request(), libtorrent::bt_peer_connection::on_receive(), libtorrent::torrent::tracker_response(), and libtorrent::bt_peer_connection::write_handshake().
| void libtorrent::aux::session_impl::process_connection_queue | ( | ) |
Definition at line 656 of file session_impl.cpp.
References c, simple_client::e, m_connection_queue, m_half_open, and m_half_open_limit.
Referenced by close_connection(), libtorrent::torrent::connect_to_peer(), connection_completed(), and libtorrent::torrent::on_name_lookup().
| void libtorrent::aux::session_impl::close_connection | ( | boost::intrusive_ptr< peer_connection > const & | p | ) |
Definition at line 809 of file session_impl.cpp.
References asio::placeholders::iterator, l, m_connection_queue, m_connections, m_half_open, m_mutex, and process_connection_queue().
Referenced by libtorrent::peer_connection::disconnect().
| void libtorrent::aux::session_impl::connection_completed | ( | boost::intrusive_ptr< peer_connection > const & | p | ) |
Definition at line 987 of file session_impl.cpp.
References asio::placeholders::iterator, l, m_abort, m_connections, m_half_open, m_mutex, and process_connection_queue().
Referenced by libtorrent::peer_connection::on_connection_complete().
| void libtorrent::aux::session_impl::connection_failed | ( | boost::shared_ptr< stream_socket > const & | s, | |
| tcp::endpoint const & | a, | |||
| char const * | message | |||
| ) |
Definition at line 750 of file session_impl.cpp.
References asio::ip::basic_endpoint< InternetProtocol >::address(), libtorrent::alert::debug, asio::placeholders::iterator, l, m_alerts, m_connections, m_half_open, m_mutex, libtorrent::alert_manager::post_alert(), libtorrent::alert_manager::should_post(), and asio::ip::address::to_string().
Referenced by libtorrent::catch(), libtorrent::torrent::connect_to_peer(), libtorrent::torrent::files_checked(), libtorrent::peer_connection::on_connection_complete(), and libtorrent::torrent::on_name_lookup().
| void libtorrent::aux::session_impl::set_settings | ( | session_settings const & | s | ) |
Definition at line 571 of file session_impl.cpp.
References libtorrent::session_settings::file_pool_size, asio::placeholders::iterator, l, m_files, m_mutex, m_settings, libtorrent::file_pool::resize(), and libtorrent::session_settings::user_agent.
| session_settings const& libtorrent::aux::session_impl::settings | ( | ) | const [inline] |
Definition at line 209 of file session_impl.hpp.
References m_settings.
Referenced by add_torrent(), libtorrent::torrent::connect_to_url_seed(), libtorrent::peer_connection::incoming_request(), libtorrent::peer_connection::second_tick(), libtorrent::torrent::settings(), libtorrent::torrent::should_announce_dht(), libtorrent::web_peer_connection::web_peer_connection(), libtorrent::bt_peer_connection::write_extensions(), and libtorrent::web_peer_connection::write_request().
| void libtorrent::aux::session_impl::add_dht_node | ( | std::pair< std::string, int > const & | node | ) |
Definition at line 1521 of file session_impl.cpp.
References l, m_dht, and m_mutex.
Referenced by libtorrent::peer_connection::incoming_dht_port().
| void libtorrent::aux::session_impl::add_dht_node | ( | udp::endpoint | n | ) |
| void libtorrent::aux::session_impl::add_dht_router | ( | std::pair< std::string, int > const & | node | ) |
| void libtorrent::aux::session_impl::set_dht_settings | ( | dht_settings const & | s | ) |
Definition at line 1502 of file session_impl.cpp.
References asio::ip::basic_endpoint< InternetProtocol >::address(), l, m_dht, m_dht_settings, m_listen_interface, m_mutex, and libtorrent::dht_settings::service_port.
| dht_settings const& libtorrent::aux::session_impl::kad_settings | ( | ) | const [inline] |
Definition at line 216 of file session_impl.hpp.
References m_dht_settings.
Referenced by libtorrent::bt_peer_connection::on_receive().
| void libtorrent::aux::session_impl::start_dht | ( | entry const & | startup_state | ) |
Definition at line 1481 of file session_impl.cpp.
References asio::ip::basic_endpoint< InternetProtocol >::address(), l, m_dht, m_dht_settings, m_io_service, m_listen_interface, and m_mutex.
| void libtorrent::aux::session_impl::stop_dht | ( | ) |
Definition at line 1494 of file session_impl.cpp.
References l, m_dht, and m_mutex.
Referenced by ~session_impl().
| entry libtorrent::aux::session_impl::dht_state | ( | ) | const |
| bool libtorrent::aux::session_impl::is_aborted | ( | ) | const [inline] |
Definition at line 221 of file session_impl.hpp.
References m_abort.
Referenced by add_torrent(), libtorrent::torrent::attach_peer(), libtorrent::torrent::on_name_lookup(), libtorrent::torrent::on_peer_name_lookup(), libtorrent::torrent::on_proxy_name_lookup(), libtorrent::aux::checker_impl::operator()(), and libtorrent::torrent::~torrent().
| void libtorrent::aux::session_impl::set_ip_filter | ( | ip_filter const & | f | ) |
Definition at line 547 of file session_impl.cpp.
References libtorrent::ip_filter::access(), asio::ip::basic_endpoint< InternetProtocol >::address(), libtorrent::ip_filter::blocked, asio::placeholders::iterator, l, m_connections, m_ip_filter, and m_mutex.
| bool libtorrent::aux::session_impl::listen_on | ( | std::pair< int, int > const & | port_range, | |
| const char * | net_interface = 0 | |||
| ) |
Definition at line 1388 of file session_impl.cpp.
References asio::ip::basic_endpoint< InternetProtocol >::address(), asio::ip::address::from_string(), l, listen_port(), m_dht, m_dht_settings, m_incoming_connection, m_listen_interface, m_listen_port_range, m_listen_socket, m_mutex, open_listen_port(), and libtorrent::dht_settings::service_port.
| bool libtorrent::aux::session_impl::is_listening | ( | ) | const |
| torrent_handle libtorrent::aux::session_impl::add_torrent | ( | torrent_info const & | ti, | |
| boost::filesystem::path const & | save_path, | |||
| entry const & | resume_data, | |||
| bool | compact_mode, | |||
| int | block_size | |||
| ) |
Definition at line 1178 of file session_impl.cpp.
References libtorrent::dht::dht_tracker::add_node(), libtorrent::torrent_info::begin_files(), asio::detail::socket_ops::bind(), libtorrent::torrent_info::end_files(), libtorrent::aux::checker_impl::find_torrent(), find_torrent(), libtorrent::torrent_info::info_hash(), is_aborted(), asio::placeholders::iterator, l, m_checker_impl, libtorrent::aux::checker_impl::m_cond, m_dht, m_extensions, m_listen_interface, libtorrent::aux::checker_impl::m_mutex, m_mutex, libtorrent::aux::checker_impl::m_torrents, libtorrent::torrent_info::nodes(), nodes(), and settings().
| torrent_handle libtorrent::aux::session_impl::add_torrent | ( | char const * | tracker_url, | |
| sha1_hash const & | info_hash, | |||
| char const * | name, | |||
| boost::filesystem::path const & | save_path, | |||
| entry const & | resume_data, | |||
| bool | compact_mode, | |||
| int | block_size | |||
| ) |
Definition at line 1261 of file session_impl.cpp.
References find_torrent(), libtorrent::aux::checker_impl::find_torrent(), is_aborted(), asio::placeholders::iterator, l, m_checker_impl, m_extensions, m_listen_interface, m_mutex, libtorrent::aux::checker_impl::m_mutex, m_torrents, and settings().
| void libtorrent::aux::session_impl::remove_torrent | ( | torrent_handle const & | h | ) |
Definition at line 1326 of file session_impl.cpp.
References libtorrent::aux::piece_checker_data::abort, libtorrent::torrent::abort(), asio::ip::basic_endpoint< InternetProtocol >::address(), libtorrent::tracker_request::event, libtorrent::aux::checker_impl::find_torrent(), libtorrent::torrent::generate_tracker_request(), libtorrent::torrent::get_handle(), libtorrent::alert::info, libtorrent::torrent_info::info_hash(), libtorrent::torrent::is_paused(), asio::placeholders::iterator, libtorrent::tracker_request::key, l, libtorrent::tracker_request::listen_port, m_alerts, m_checker_impl, libtorrent::torrent_handle::m_chk, libtorrent::torrent_handle::m_info_hash, m_key, m_listen_interface, libtorrent::aux::checker_impl::m_mutex, m_mutex, libtorrent::torrent_handle::m_ses, m_strand, m_torrents, m_tracker_manager, asio::ip::basic_endpoint< InternetProtocol >::port(), libtorrent::alert_manager::post_alert(), libtorrent::aux::piece_checker_data::processing, libtorrent::tracker_manager::queue_request(), libtorrent::aux::checker_impl::remove_torrent(), libtorrent::alert_manager::should_post(), libtorrent::torrent::should_request(), libtorrent::tracker_request::stopped, libtorrent::torrent::torrent_file(), libtorrent::torrent::tracker_login(), and libtorrent::torrent_info::trackers().
| std::vector< torrent_handle > libtorrent::aux::session_impl::get_torrents | ( | ) |
Definition at line 1139 of file session_impl.cpp.
References asio::placeholders::iterator, l, m_checker_impl, libtorrent::aux::checker_impl::m_mutex, m_mutex, libtorrent::aux::checker_impl::m_processing, m_torrents, and libtorrent::aux::checker_impl::m_torrents.
| void libtorrent::aux::session_impl::set_severity_level | ( | alert::severity_t | s | ) |
Definition at line 1646 of file session_impl.cpp.
References l, m_alerts, m_mutex, and libtorrent::alert_manager::set_severity().
| std::auto_ptr< alert > libtorrent::aux::session_impl::pop_alert | ( | ) |
Definition at line 1638 of file session_impl.cpp.
References libtorrent::alert_manager::get(), l, m_alerts, m_mutex, and libtorrent::alert_manager::pending().
| int libtorrent::aux::session_impl::upload_rate_limit | ( | ) | const |
Definition at line 1652 of file session_impl.cpp.
References l, m_mutex, m_ul_bandwidth_manager, and libtorrent::bandwidth_manager::throttle().
| int libtorrent::aux::session_impl::download_rate_limit | ( | ) | const |
Definition at line 1658 of file session_impl.cpp.
References l, m_dl_bandwidth_manager, m_mutex, and libtorrent::bandwidth_manager::throttle().
| void libtorrent::aux::session_impl::set_download_rate_limit | ( | int | bytes_per_second | ) |
Definition at line 1537 of file session_impl.cpp.
References libtorrent::bandwidth_limit::inf, l, m_dl_bandwidth_manager, m_mutex, and libtorrent::bandwidth_manager::throttle().
| void libtorrent::aux::session_impl::set_upload_rate_limit | ( | int | bytes_per_second | ) |
Definition at line 1612 of file session_impl.cpp.
References libtorrent::bandwidth_limit::inf, l, m_mutex, m_ul_bandwidth_manager, and libtorrent::bandwidth_manager::throttle().
| void libtorrent::aux::session_impl::set_max_half_open_connections | ( | int | limit | ) |
| void libtorrent::aux::session_impl::set_max_connections | ( | int | limit | ) |
| void libtorrent::aux::session_impl::set_max_uploads | ( | int | limit | ) |
| int libtorrent::aux::session_impl::num_uploads | ( | ) | const |
| int libtorrent::aux::session_impl::num_connections | ( | ) | const |
Definition at line 1632 of file session_impl.cpp.
References l, m_connections, m_half_open, and m_mutex.
| session_status libtorrent::aux::session_impl::status | ( | ) | const |
Definition at line 1441 of file session_impl.cpp.
References libtorrent::session_status::dht_node_cache, libtorrent::session_status::dht_nodes, libtorrent::session_status::dht_torrents, libtorrent::stat::download_payload_rate(), libtorrent::stat::download_rate(), libtorrent::session_status::download_rate, libtorrent::session_status::has_incoming_connections, l, m_connections, m_dht, m_incoming_connection, m_mutex, m_stat, libtorrent::session_status::num_peers, libtorrent::session_status::payload_download_rate, libtorrent::session_status::payload_upload_rate, libtorrent::session_status::total_download, libtorrent::session_status::total_payload_download, libtorrent::stat::total_payload_download(), libtorrent::session_status::total_payload_upload, libtorrent::stat::total_payload_upload(), libtorrent::stat::total_protocol_download(), libtorrent::stat::total_protocol_upload(), libtorrent::session_status::total_upload, libtorrent::stat::upload_payload_rate(), libtorrent::stat::upload_rate(), and libtorrent::session_status::upload_rate.
| void libtorrent::aux::session_impl::set_peer_id | ( | peer_id const & | id | ) |
| void libtorrent::aux::session_impl::set_key | ( | int | key | ) |
| unsigned short libtorrent::aux::session_impl::listen_port | ( | ) | const |
Definition at line 1435 of file session_impl.cpp.
References l, m_listen_interface, m_mutex, and asio::ip::basic_endpoint< InternetProtocol >::port().
Referenced by listen_on(), libtorrent::peer_connection::peer_connection(), session_impl(), libtorrent::torrent::torrent(), and libtorrent::bt_peer_connection::write_extensions().
| void libtorrent::aux::session_impl::abort | ( | ) |
Definition at line 533 of file session_impl.cpp.
References l, libtorrent::aux::checker_impl::m_abort, m_abort, m_checker_impl, m_io_service, libtorrent::aux::checker_impl::m_mutex, m_mutex, and asio::io_service::stop().
| torrent_handle libtorrent::aux::session_impl::find_torrent_handle | ( | sha1_hash const & | info_hash | ) |
| void libtorrent::aux::session_impl::second_tick | ( | asio::error_code const & | e | ) |
Definition at line 865 of file session_impl.cpp.
References asio::ip::basic_endpoint< InternetProtocol >::address(), libtorrent::allocate_resources(), asio::detail::socket_ops::bind(), c, libtorrent::alert::debug, libtorrent::peer_connection::disconnect(), libtorrent::torrent::generate_tracker_request(), libtorrent::torrent::get_handle(), libtorrent::peer_connection::has_timed_out(), libtorrent::alert::info, libtorrent::torrent::is_aborted(), asio::placeholders::iterator, libtorrent::peer_connection::keep_alive(), libtorrent::tracker_request::key, l, libtorrent::tracker_request::listen_port, m_abort, m_alerts, m_connections, libtorrent::torrent::m_connections_quota, m_io_service, m_key, m_last_tick, m_listen_interface, m_max_connections, m_max_uploads, m_mutex, m_stat, m_strand, m_timer, m_torrents, m_tracker_manager, libtorrent::torrent::m_uploads_quota, asio::error_code::message(), libtorrent::peer_connection::pid(), asio::ip::basic_endpoint< InternetProtocol >::port(), libtorrent::alert_manager::post_alert(), libtorrent::tracker_manager::queue_request(), libtorrent::peer_connection::remote(), libtorrent::stat::second_tick(), libtorrent::torrent::second_tick(), libtorrent::peer_connection::set_failed(), libtorrent::alert_manager::should_post(), libtorrent::torrent::should_request(), asio::io_service::stop(), libtorrent::torrent::tracker_login(), and asio::io_service::strand::wrap().
Referenced by session_impl().
| void libtorrent::aux::session_impl::check_invariant | ( | const char * | place = 0 |
) |
Definition at line 1665 of file session_impl.cpp.
References asio::placeholders::iterator, m_connections, and m_half_open.
friend class ::libtorrent::peer_connection [friend] |
Definition at line 162 of file session_impl.hpp.
friend struct checker_impl [friend] |
Definition at line 164 of file session_impl.hpp.
friend class invariant_access [friend] |
Definition at line 165 of file session_impl.hpp.
Definition at line 193 of file session_impl.hpp.
Referenced by abort(), add_dht_node(), add_dht_router(), add_torrent(), libtorrent::peer_connection::assign_bandwidth(), libtorrent::torrent::assign_bandwidth(), libtorrent::call_member(), libtorrent::catch(), libtorrent::torrent::check_files(), close_connection(), libtorrent::torrent_handle::connect_peer(), connection_completed(), connection_failed(), dht_state(), libtorrent::torrent::disconnect_all(), download_rate_limit(), libtorrent::peer_connection::expire_bandwidth(), libtorrent::torrent::expire_bandwidth(), libtorrent::torrent_handle::file_progress(), libtorrent::torrent::files_checked(), libtorrent::torrent_handle::force_reannounce(), libtorrent::torrent_handle::get_download_queue(), libtorrent::torrent_handle::get_peer_info(), get_torrents(), is_listening(), libtorrent::torrent_handle::is_valid(), listen_on(), listen_port(), num_connections(), num_uploads(), libtorrent::peer_connection::on_connection_complete(), libtorrent::torrent::on_name_lookup(), libtorrent::torrent::on_peer_name_lookup(), libtorrent::torrent::on_proxy_name_lookup(), libtorrent::web_peer_connection::on_receive(), libtorrent::peer_connection::on_receive_data(), libtorrent::peer_connection::on_send_data(), operator()(), libtorrent::aux::checker_impl::operator()(), pop_alert(), remove_torrent(), second_tick(), set_dht_settings(), set_download_rate_limit(), set_ip_filter(), set_key(), set_max_connections(), set_max_half_open_connections(), set_max_uploads(), set_peer_id(), set_settings(), set_severity_level(), set_upload_rate_limit(), libtorrent::peer_connection::setup_receive(), libtorrent::peer_connection::setup_send(), start_dht(), status(), libtorrent::torrent_handle::status(), stop_dht(), libtorrent::torrent::tracker_request_error(), libtorrent::torrent::tracker_request_timed_out(), libtorrent::torrent::tracker_response(), libtorrent::torrent::tracker_warning(), upload_rate_limit(), libtorrent::torrent_handle::write_resume_data(), and ~session_impl().
Definition at line 276 of file session_impl.hpp.
Referenced by libtorrent::torrent::alerts(), libtorrent::torrent::check_fastresume(), libtorrent::torrent::check_files(), connection_failed(), libtorrent::torrent::on_dht_announce_response(), libtorrent::torrent::on_name_lookup(), libtorrent::torrent::on_proxy_name_lookup(), libtorrent::web_peer_connection::on_receive(), open_listen_port(), libtorrent::aux::checker_impl::operator()(), libtorrent::torrent::piece_failed(), pop_alert(), remove_torrent(), second_tick(), libtorrent::torrent::set_metadata(), set_severity_level(), libtorrent::torrent::tracker_request_error(), libtorrent::torrent::tracker_request_timed_out(), libtorrent::torrent::tracker_response(), and libtorrent::torrent::tracker_warning().
Definition at line 283 of file session_impl.hpp.
Referenced by abort(), async_accept(), libtorrent::torrent::connect_to_peer(), libtorrent::peer_connection::disconnect(), libtorrent::torrent::on_name_lookup(), open_listen_port(), operator()(), second_tick(), start_dht(), and ~session_impl().
Definition at line 284 of file session_impl.hpp.
Referenced by libtorrent::torrent::connect_to_url_seed(), libtorrent::torrent::on_dht_announce(), libtorrent::torrent::on_proxy_name_lookup(), operator()(), remove_torrent(), libtorrent::torrent::resolve_peer_country(), second_tick(), session_impl(), libtorrent::torrent::torrent(), libtorrent::torrent::tracker_response(), and libtorrent::torrent::try_next_tracker().
Definition at line 290 of file session_impl.hpp.
Referenced by download_rate_limit(), libtorrent::torrent::expire_bandwidth(), libtorrent::torrent::request_bandwidth(), session_impl(), and set_download_rate_limit().
Definition at line 291 of file session_impl.hpp.
Referenced by libtorrent::torrent::expire_bandwidth(), libtorrent::torrent::request_bandwidth(), session_impl(), set_upload_rate_limit(), and upload_rate_limit().
Definition at line 293 of file session_impl.hpp.
Referenced by operator()(), remove_torrent(), and second_tick().
Definition at line 294 of file session_impl.hpp.
Referenced by add_torrent(), libtorrent::peer_connection::check_invariant(), find_torrent(), get_torrents(), num_uploads(), operator()(), libtorrent::aux::checker_impl::operator()(), remove_torrent(), second_tick(), libtorrent::torrent::set_metadata(), and ~session_impl().
Definition at line 299 of file session_impl.hpp.
Referenced by libtorrent::torrent::attach_peer(), check_invariant(), close_connection(), connection_completed(), connection_failed(), num_connections(), operator()(), second_tick(), set_ip_filter(), status(), and ~session_impl().
Definition at line 303 of file session_impl.hpp.
Referenced by check_invariant(), close_connection(), connection_completed(), connection_failed(), num_connections(), operator()(), and process_connection_queue().
Definition at line 309 of file session_impl.hpp.
Referenced by close_connection(), libtorrent::torrent::connect_to_peer(), libtorrent::torrent::on_name_lookup(), operator()(), and process_connection_queue().
Definition at line 312 of file session_impl.hpp.
Referenced by libtorrent::torrent::connect_to_peer(), libtorrent::torrent::on_name_lookup(), libtorrent::torrent::on_peer_name_lookup(), libtorrent::torrent::on_proxy_name_lookup(), set_ip_filter(), and libtorrent::torrent::tracker_response().
Definition at line 315 of file session_impl.hpp.
Referenced by get_peer_id(), session_impl(), and set_peer_id().
Definition at line 320 of file session_impl.hpp.
Referenced by operator()(), remove_torrent(), second_tick(), session_impl(), and set_key().
| std::pair<int, int> libtorrent::aux::session_impl::m_listen_port_range |
Definition at line 323 of file session_impl.hpp.
Referenced by listen_on(), open_listen_port(), and operator()().
Definition at line 330 of file session_impl.hpp.
Referenced by add_torrent(), listen_on(), listen_port(), libtorrent::torrent::on_dht_announce(), open_listen_port(), operator()(), remove_torrent(), second_tick(), set_dht_settings(), and start_dht().
| boost::shared_ptr<socket_acceptor> libtorrent::aux::session_impl::m_listen_socket |
Definition at line 332 of file session_impl.hpp.
Referenced by async_accept(), is_listening(), listen_on(), and open_listen_port().
Definition at line 335 of file session_impl.hpp.
Referenced by operator()(), set_settings(), and settings().
Definition at line 340 of file session_impl.hpp.
Referenced by abort(), connection_completed(), is_aborted(), operator()(), second_tick(), and ~session_impl().
Definition at line 342 of file session_impl.hpp.
Referenced by second_tick(), and set_max_uploads().
Definition at line 343 of file session_impl.hpp.
Referenced by second_tick(), and set_max_connections().
Definition at line 346 of file session_impl.hpp.
Referenced by process_connection_queue(), and set_max_half_open_connections().
Definition at line 360 of file session_impl.hpp.
Referenced by libtorrent::torrent::init(), and set_settings().
| boost::posix_time::ptime libtorrent::aux::session_impl::m_last_tick |
| boost::intrusive_ptr<dht::dht_tracker> libtorrent::aux::session_impl::m_dht |
Definition at line 366 of file session_impl.hpp.
Referenced by add_dht_node(), add_dht_router(), add_torrent(), dht_state(), listen_on(), libtorrent::torrent::on_dht_announce(), libtorrent::bt_peer_connection::on_receive(), set_dht_settings(), start_dht(), status(), and stop_dht().
Definition at line 367 of file session_impl.hpp.
Referenced by kad_settings(), listen_on(), set_dht_settings(), and start_dht().
| deadline_timer libtorrent::aux::session_impl::m_timer |
Definition at line 400 of file session_impl.hpp.
Referenced by abort(), add_torrent(), find_torrent_handle(), get_torrents(), remove_torrent(), session_impl(), and ~session_impl().
| boost::scoped_ptr<boost::thread> libtorrent::aux::session_impl::m_thread |
| boost::scoped_ptr<boost::thread> libtorrent::aux::session_impl::m_checker_thread |
1.5.6