#include <peer_connection.hpp>

Definition at line 98 of file peer_connection.hpp.
typedef std::list<boost::shared_ptr<peer_plugin> > libtorrent::peer_connection::extension_list_t [protected] |
Definition at line 431 of file peer_connection.hpp.
Definition at line 106 of file peer_connection.hpp.
| libtorrent::peer_connection::peer_connection | ( | aux::session_impl & | ses, | |
| boost::weak_ptr< torrent > | t, | |||
| boost::shared_ptr< stream_socket > | s, | |||
| tcp::endpoint const & | remote, | |||
| tcp::endpoint const & | proxy | |||
| ) |
| libtorrent::peer_connection::peer_connection | ( | aux::session_impl & | ses, | |
| boost::shared_ptr< stream_socket > | s | |||
| ) |
Definition at line 119 of file peer_connection.cpp.
References libtorrent::big_number::begin(), libtorrent::big_number::end(), libtorrent::aux::session_impl::listen_port(), m_country, m_peer_id, m_remote, m_ses, m_socket, remote(), and to_string().
| libtorrent::peer_connection::~peer_connection | ( | ) | [virtual] |
| void libtorrent::peer_connection::add_extension | ( | boost::shared_ptr< peer_plugin > | ext | ) |
Definition at line 182 of file peer_connection.cpp.
References m_extensions.
Referenced by libtorrent::torrent::attach_peer().
| void libtorrent::peer_connection::init | ( | ) |
Definition at line 188 of file peer_connection.cpp.
References index, INVARIANT_CHECK, m_have_piece, m_num_pieces, and m_torrent.
Referenced by attach_to_torrent().
| virtual void libtorrent::peer_connection::on_metadata | ( | ) | [inline, virtual] |
Reimplemented in libtorrent::bt_peer_connection.
Definition at line 143 of file peer_connection.hpp.
| void libtorrent::peer_connection::set_upload_limit | ( | int | limit | ) |
Definition at line 1409 of file peer_connection.cpp.
References libtorrent::resource_request::inf, m_bandwidth_limit, m_upload_limit, libtorrent::bandwidth_limit::throttle(), and upload_channel.
Referenced by libtorrent::torrent::set_peer_upload_limit().
| void libtorrent::peer_connection::set_download_limit | ( | int | limit | ) |
Definition at line 1418 of file peer_connection.cpp.
References download_channel, libtorrent::resource_request::inf, m_bandwidth_limit, m_download_limit, and libtorrent::bandwidth_limit::throttle().
Referenced by libtorrent::torrent::set_peer_download_limit().
| bool libtorrent::peer_connection::prefer_whole_pieces | ( | ) | const [inline] |
Definition at line 148 of file peer_connection.hpp.
Referenced by libtorrent::request_a_block(), and libtorrent::web_peer_connection::web_peer_connection().
| void libtorrent::peer_connection::prefer_whole_pieces | ( | bool | b | ) | [inline] |
Definition at line 151 of file peer_connection.hpp.
| bool libtorrent::peer_connection::request_large_blocks | ( | ) | const [inline] |
Definition at line 154 of file peer_connection.hpp.
Referenced by libtorrent::web_peer_connection::web_peer_connection().
| void libtorrent::peer_connection::request_large_blocks | ( | bool | b | ) | [inline] |
Definition at line 157 of file peer_connection.hpp.
| void libtorrent::peer_connection::set_non_prioritized | ( | bool | b | ) | [inline] |
Definition at line 160 of file peer_connection.hpp.
Referenced by libtorrent::web_peer_connection::web_peer_connection().
| void libtorrent::peer_connection::announce_piece | ( | int | index | ) |
Definition at line 265 of file peer_connection.cpp.
References has_piece(), m_torrent, and write_have().
| bool libtorrent::peer_connection::can_write | ( | ) | const |
Definition at line 1903 of file peer_connection.cpp.
References INVARIANT_CHECK, m_bandwidth_limit, m_connecting, m_current_send_buffer, m_send_buffer, libtorrent::bandwidth_limit::quota_left(), and upload_channel.
Referenced by setup_send().
| bool libtorrent::peer_connection::can_read | ( | ) | const |
Definition at line 1915 of file peer_connection.cpp.
References download_channel, INVARIANT_CHECK, m_bandwidth_limit, m_connecting, and libtorrent::bandwidth_limit::quota_left().
Referenced by setup_receive().
| bool libtorrent::peer_connection::is_seed | ( | ) | const |
Definition at line 2142 of file peer_connection.cpp.
References INVARIANT_CHECK, m_have_piece, and m_num_pieces.
Referenced by fill_send_buffer(), libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), incoming_have(), libtorrent::policy::not_interested(), and libtorrent::torrent::num_seeds().
| bool libtorrent::peer_connection::has_timed_out | ( | ) | const |
Definition at line 2085 of file peer_connection.cpp.
References INVARIANT_CHECK, m_became_uninterested, m_became_uninteresting, m_connecting, m_interesting, m_last_receive, m_peer_interested, and m_timeout.
Referenced by libtorrent::aux::session_impl::second_tick().
| void libtorrent::peer_connection::keep_alive | ( | ) |
Definition at line 2129 of file peer_connection.cpp.
References INVARIANT_CHECK, m_connecting, m_last_sent, m_timeout, and write_keepalive().
Referenced by libtorrent::aux::session_impl::second_tick().
| peer_id const& libtorrent::peer_connection::pid | ( | ) | const [inline] |
Definition at line 179 of file peer_connection.hpp.
Referenced by libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::on_extended_handshake(), libtorrent::bt_peer_connection::on_receive(), and libtorrent::aux::session_impl::second_tick().
| void libtorrent::peer_connection::set_pid | ( | const peer_id & | pid | ) | [inline] |
Definition at line 180 of file peer_connection.hpp.
Referenced by libtorrent::bt_peer_connection::on_receive().
| bool libtorrent::peer_connection::has_piece | ( | int | i | ) | const |
Definition at line 284 of file peer_connection.cpp.
References INVARIANT_CHECK, m_have_piece, and m_torrent.
Referenced by announce_piece().
| std::deque< piece_block > const & libtorrent::peer_connection::download_queue | ( | ) | const |
Definition at line 301 of file peer_connection.cpp.
References m_download_queue.
Referenced by libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), and libtorrent::request_a_block().
| std::deque< piece_block > const & libtorrent::peer_connection::request_queue | ( | ) | const |
Definition at line 296 of file peer_connection.cpp.
References m_request_queue.
Referenced by libtorrent::request_a_block().
| std::deque< peer_request > const & libtorrent::peer_connection::upload_queue | ( | ) | const |
Definition at line 306 of file peer_connection.cpp.
References m_requests.
Referenced by libtorrent::web_peer_connection::get_peer_info(), and libtorrent::bt_peer_connection::get_peer_info().
| bool libtorrent::peer_connection::is_interesting | ( | ) | const [inline] |
Definition at line 187 of file peer_connection.hpp.
Referenced by libtorrent::policy::find_choke_candidate(), libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), incoming_have(), and libtorrent::policy::unchoked().
| bool libtorrent::peer_connection::is_choked | ( | ) | const [inline] |
Definition at line 188 of file peer_connection.hpp.
Referenced by libtorrent::policy::choke_one_peer(), libtorrent::policy::find_choke_candidate(), libtorrent::policy::find_seed_choke_candidate(), libtorrent::policy::find_seed_unchoke_candidate(), libtorrent::policy::find_unchoke_candidate(), libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), libtorrent::policy::interested(), libtorrent::policy::not_interested(), libtorrent::policy::pulse(), second_tick(), libtorrent::policy::seed_choke_one_peer(), libtorrent::policy::seed_unchoke_one_peer(), libtorrent::policy::unchoke_one_peer(), and libtorrent::bt_peer_connection::write_choke().
| bool libtorrent::peer_connection::is_peer_interested | ( | ) | const [inline] |
Definition at line 190 of file peer_connection.hpp.
Referenced by distribute_free_upload(), fill_send_buffer(), libtorrent::policy::find_choke_candidate(), libtorrent::policy::find_seed_unchoke_candidate(), libtorrent::policy::find_unchoke_candidate(), libtorrent::web_peer_connection::get_peer_info(), and libtorrent::bt_peer_connection::get_peer_info().
| bool libtorrent::peer_connection::has_peer_choked | ( | ) | const [inline] |
Definition at line 191 of file peer_connection.hpp.
Referenced by libtorrent::policy::block_finished(), libtorrent::policy::find_choke_candidate(), libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), libtorrent::policy::peer_is_interesting(), libtorrent::request_a_block(), and send_block_requests().
| boost::weak_ptr<torrent> libtorrent::peer_connection::associated_torrent | ( | ) | const [inline] |
Definition at line 197 of file peer_connection.hpp.
References m_torrent.
Referenced by libtorrent::torrent::check_invariant(), libtorrent::torrent::disconnect_all(), libtorrent::bt_peer_connection::dispatch_message(), libtorrent::web_peer_connection::downloading_piece_progress(), libtorrent::bt_peer_connection::downloading_piece_progress(), libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), libtorrent::torrent_handle::get_peer_info(), libtorrent::bt_peer_connection::on_bitfield(), libtorrent::web_peer_connection::on_connected(), libtorrent::bt_peer_connection::on_extended(), libtorrent::bt_peer_connection::on_extended_handshake(), libtorrent::bt_peer_connection::on_metadata(), libtorrent::web_peer_connection::on_receive(), libtorrent::bt_peer_connection::on_receive(), libtorrent::torrent::remove_peer(), libtorrent::bt_peer_connection::write_bitfield(), libtorrent::bt_peer_connection::write_cancel(), libtorrent::bt_peer_connection::write_handshake(), libtorrent::bt_peer_connection::write_have(), libtorrent::bt_peer_connection::write_piece(), libtorrent::web_peer_connection::write_request(), and libtorrent::bt_peer_connection::write_request().
| const stat& libtorrent::peer_connection::statistics | ( | ) | const [inline] |
Definition at line 200 of file peer_connection.hpp.
Referenced by libtorrent::policy::connection_closed(), libtorrent::policy::find_choke_candidate(), libtorrent::policy::find_disconnect_candidate(), libtorrent::policy::find_unchoke_candidate(), libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), incoming_piece(), libtorrent::request_a_block(), second_tick(), libtorrent::torrent::second_tick(), send_block_requests(), libtorrent::policy::peer::total_download(), and libtorrent::policy::peer::total_upload().
Definition at line 311 of file peer_connection.cpp.
References libtorrent::stat::add_stat(), INVARIANT_CHECK, and m_statistics.
Referenced by libtorrent::policy::connect_peer(), and libtorrent::policy::new_connection().
| void libtorrent::peer_connection::second_tick | ( | float | tick_interval | ) |
Definition at line 1466 of file peer_connection.cpp.
References libtorrent::piece_picker::abort_download(), libtorrent::stat::download_rate(), fill_send_buffer(), INVARIANT_CHECK, is_choked(), asio::placeholders::iterator, m_assume_fifo, m_bandwidth_limit, m_desired_queue_size, m_download_queue, m_extensions, m_free_upload, m_last_piece, m_max_out_request_queue, m_request_large_blocks, m_request_queue, m_ses, m_statistics, m_torrent, m_upload_limit, libtorrent::min_request_queue, on_tick(), libtorrent::session_settings::piece_timeout, libtorrent::request_a_block(), libtorrent::session_settings::request_queue_time, libtorrent::stat::second_tick(), send_block_requests(), libtorrent::aux::session_impl::settings(), statistics(), libtorrent::bandwidth_limit::throttle(), libtorrent::stat::total_payload_download(), libtorrent::stat::total_payload_upload(), and upload_channel.
Referenced by libtorrent::torrent::second_tick().
| boost::shared_ptr<stream_socket> libtorrent::peer_connection::get_socket | ( | ) | const [inline] |
Definition at line 206 of file peer_connection.hpp.
Referenced by libtorrent::torrent::attach_peer(), libtorrent::policy::has_connection(), libtorrent::policy::new_connection(), libtorrent::bt_peer_connection::on_receive(), and libtorrent::request_a_block().
| tcp::endpoint const& libtorrent::peer_connection::remote | ( | ) | const [inline] |
Definition at line 207 of file peer_connection.hpp.
Referenced by libtorrent::torrent::attach_peer(), libtorrent::catch(), libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), libtorrent::policy::has_connection(), libtorrent::policy::new_connection(), libtorrent::bt_peer_connection::on_extended_handshake(), peer_connection(), libtorrent::torrent::remove_peer(), libtorrent::request_a_block(), libtorrent::aux::session_impl::second_tick(), and libtorrent::bt_peer_connection::write_extensions().
| tcp::endpoint const& libtorrent::peer_connection::proxy | ( | ) | const [inline] |
Definition at line 208 of file peer_connection.hpp.
Referenced by libtorrent::torrent::attach_peer(), libtorrent::policy::has_connection(), libtorrent::policy::new_connection(), and libtorrent::request_a_block().
| std::vector< bool > const & libtorrent::peer_connection::get_bitfield | ( | ) | const |
Definition at line 318 of file peer_connection.cpp.
References m_have_piece.
Referenced by libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::on_bitfield(), libtorrent::torrent::remove_peer(), libtorrent::request_a_block(), and libtorrent::bt_peer_connection::write_bitfield().
| void libtorrent::peer_connection::disconnect | ( | ) |
Definition at line 1371 of file peer_connection.cpp.
References libtorrent::piece_picker::abort_download(), asio::detail::socket_ops::bind(), libtorrent::aux::session_impl::close_connection(), libtorrent::close_socket_ignore_error(), INVARIANT_CHECK, m_disconnecting, m_download_queue, libtorrent::aux::session_impl::m_io_service, m_request_queue, m_ses, m_socket, m_torrent, and asio::io_service::post().
Referenced by attach_to_torrent(), libtorrent::torrent::disconnect_all(), libtorrent::policy::disconnect_one_peer(), libtorrent::torrent::finished(), and libtorrent::aux::session_impl::second_tick().
| bool libtorrent::peer_connection::is_disconnecting | ( | ) | const [inline] |
Definition at line 214 of file peer_connection.hpp.
Referenced by libtorrent::policy::choke_one_peer(), libtorrent::policy::find_choke_candidate(), libtorrent::policy::find_disconnect_candidate(), libtorrent::policy::find_seed_choke_candidate(), libtorrent::policy::find_seed_unchoke_candidate(), libtorrent::policy::find_unchoke_candidate(), and libtorrent::policy::unchoke_one_peer().
| void libtorrent::peer_connection::on_connection_complete | ( | asio::error_code const & | e | ) |
Definition at line 1956 of file peer_connection.cpp.
References asio::ip::basic_endpoint< InternetProtocol >::address(), libtorrent::aux::session_impl::connection_completed(), libtorrent::aux::session_impl::connection_failed(), INVARIANT_CHECK, l, m_connecting, m_disconnecting, m_last_receive, libtorrent::aux::session_impl::m_mutex, m_remote, m_ses, m_socket, asio::error_code::message(), on_connected(), setup_receive(), setup_send(), and asio::ip::address::to_string().
Referenced by connect().
| bool libtorrent::peer_connection::is_connecting | ( | ) | const [inline] |
Definition at line 223 of file peer_connection.hpp.
Referenced by libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), and libtorrent::torrent::status().
| bool libtorrent::peer_connection::is_queued | ( | ) | const [inline] |
Definition at line 228 of file peer_connection.hpp.
Referenced by libtorrent::web_peer_connection::get_peer_info(), and libtorrent::bt_peer_connection::get_peer_info().
| void libtorrent::peer_connection::connect | ( | ) |
Definition at line 1923 of file peer_connection.cpp.
References asio::ip::basic_endpoint< InternetProtocol >::address(), asio::detail::socket_ops::bind(), libtorrent::alert::debug, INVARIANT_CHECK, m_connecting, m_peer_id, m_queued, m_remote, m_remote_proxy, m_ses, m_socket, m_torrent, on_connection_complete(), and asio::ip::address::to_string().
| void libtorrent::peer_connection::reset_upload_quota | ( | ) |
| size_type libtorrent::peer_connection::total_free_upload | ( | ) | const |
Definition at line 364 of file peer_connection.cpp.
References m_free_upload.
Referenced by libtorrent::web_peer_connection::get_peer_info(), and libtorrent::bt_peer_connection::get_peer_info().
| void libtorrent::peer_connection::add_free_upload | ( | size_type | free_upload | ) |
Definition at line 369 of file peer_connection.cpp.
References INVARIANT_CHECK, and m_free_upload.
Referenced by distribute_free_upload(), and libtorrent::policy::not_interested().
| void libtorrent::peer_connection::received_valid_data | ( | int | index | ) |
Definition at line 323 of file peer_connection.cpp.
References INVARIANT_CHECK, asio::placeholders::iterator, m_extensions, and m_trust_points.
| void libtorrent::peer_connection::received_invalid_data | ( | int | index | ) |
Definition at line 340 of file peer_connection.cpp.
References INVARIANT_CHECK, asio::placeholders::iterator, m_extensions, and m_trust_points.
| int libtorrent::peer_connection::trust_points | ( | ) | const |
| size_type libtorrent::peer_connection::share_diff | ( | ) | const |
Definition at line 1427 of file peer_connection.cpp.
References INVARIANT_CHECK, m_free_upload, m_statistics, m_torrent, ratio(), libtorrent::stat::total_payload_download(), and libtorrent::stat::total_payload_upload().
Referenced by distribute_free_upload(), libtorrent::policy::find_seed_choke_candidate(), libtorrent::policy::find_unchoke_candidate(), libtorrent::policy::interested(), and libtorrent::policy::not_interested().
| bool libtorrent::peer_connection::is_local | ( | ) | const [inline] |
Definition at line 254 of file peer_connection.hpp.
Referenced by libtorrent::torrent::attach_peer(), libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), libtorrent::policy::new_connection(), libtorrent::bt_peer_connection::on_receive(), and libtorrent::bt_peer_connection::write_extensions().
| void libtorrent::peer_connection::set_failed | ( | ) | [inline] |
Definition at line 256 of file peer_connection.hpp.
Referenced by libtorrent::aux::session_impl::second_tick().
| bool libtorrent::peer_connection::failed | ( | ) | const [inline] |
Definition at line 257 of file peer_connection.hpp.
Referenced by libtorrent::policy::connection_closed().
| int libtorrent::peer_connection::desired_queue_size | ( | ) | const [inline] |
| void libtorrent::peer_connection::incoming_keepalive | ( | ) |
Definition at line 468 of file peer_connection.cpp.
References INVARIANT_CHECK.
Referenced by libtorrent::bt_peer_connection::on_keepalive(), and libtorrent::bt_peer_connection::on_receive().
| void libtorrent::peer_connection::incoming_choke | ( | ) |
Definition at line 483 of file peer_connection.cpp.
References libtorrent::piece_picker::abort_download(), INVARIANT_CHECK, asio::placeholders::iterator, m_download_queue, m_peer_choked, m_request_queue, and m_torrent.
Referenced by libtorrent::bt_peer_connection::on_choke().
| void libtorrent::peer_connection::incoming_unchoke | ( | ) |
Definition at line 525 of file peer_connection.cpp.
References INVARIANT_CHECK, m_peer_choked, and m_torrent.
Referenced by libtorrent::web_peer_connection::on_connected(), and libtorrent::bt_peer_connection::on_unchoke().
| void libtorrent::peer_connection::incoming_interested | ( | ) |
Definition at line 545 of file peer_connection.cpp.
References INVARIANT_CHECK, m_peer_interested, and m_torrent.
Referenced by libtorrent::bt_peer_connection::on_interested().
| void libtorrent::peer_connection::incoming_not_interested | ( | ) |
Definition at line 565 of file peer_connection.cpp.
References INVARIANT_CHECK, m_became_uninterested, m_peer_interested, m_requests, and m_torrent.
Referenced by libtorrent::bt_peer_connection::on_not_interested().
| void libtorrent::peer_connection::incoming_have | ( | int | piece_index | ) |
Definition at line 591 of file peer_connection.cpp.
References INVARIANT_CHECK, is_interesting(), is_seed(), m_have_piece, m_num_pieces, and m_torrent.
Referenced by libtorrent::bt_peer_connection::on_have().
| void libtorrent::peer_connection::incoming_bitfield | ( | std::vector< bool > const & | bitfield | ) |
Definition at line 646 of file peer_connection.cpp.
References count, INVARIANT_CHECK, m_have_piece, m_num_pieces, and m_torrent.
Referenced by libtorrent::bt_peer_connection::on_bitfield(), and libtorrent::web_peer_connection::on_connected().
| void libtorrent::peer_connection::incoming_request | ( | peer_request const & | r | ) |
Definition at line 723 of file peer_connection.cpp.
References libtorrent::alert::debug, fill_send_buffer(), INVARIANT_CHECK, libtorrent::peer_request::length, m_choked, m_num_invalid_requests, m_peer_id, m_peer_interested, m_remote, m_requests, m_ses, m_torrent, libtorrent::session_settings::max_allowed_in_request_queue, libtorrent::peer_request::piece, libtorrent::aux::session_impl::settings(), and libtorrent::peer_request::start.
Referenced by libtorrent::bt_peer_connection::on_request().
| void libtorrent::peer_connection::incoming_piece | ( | peer_request const & | p, | |
| char const * | data | |||
| ) |
Definition at line 861 of file peer_connection.cpp.
References libtorrent::piece_picker::abort_download(), b, libtorrent::policy::block_finished(), libtorrent::alert::debug, libtorrent::stat::download_rate(), simple_client::e, INVARIANT_CHECK, libtorrent::piece_picker::is_finished(), libtorrent::piece_picker::is_piece_finished(), asio::placeholders::iterator, libtorrent::peer_request::length, m_assume_fifo, m_desired_queue_size, m_download_queue, m_peer_id, m_remote, m_torrent, libtorrent::piece_picker::mark_as_finished(), libtorrent::piece_picker::num_filtered(), libtorrent::peer_request::piece, libtorrent::policy::piece_finished(), libtorrent::request_a_block(), send_block_requests(), libtorrent::peer_request::start, statistics(), verify_piece(), and libtorrent::piece_manager::write().
Referenced by libtorrent::bt_peer_connection::on_piece(), and libtorrent::web_peer_connection::on_receive().
| void libtorrent::peer_connection::incoming_piece_fragment | ( | ) |
Definition at line 822 of file peer_connection.cpp.
References m_last_piece.
Referenced by libtorrent::bt_peer_connection::on_piece(), and libtorrent::web_peer_connection::on_receive().
| void libtorrent::peer_connection::incoming_cancel | ( | peer_request const & | r | ) |
Definition at line 1085 of file peer_connection.cpp.
References INVARIANT_CHECK, asio::placeholders::iterator, libtorrent::peer_request::length, m_requests, libtorrent::peer_request::piece, and libtorrent::peer_request::start.
Referenced by libtorrent::bt_peer_connection::on_cancel().
| void libtorrent::peer_connection::incoming_dht_port | ( | int | listen_port | ) |
Definition at line 1116 of file peer_connection.cpp.
References libtorrent::aux::session_impl::add_dht_node(), asio::ip::basic_endpoint< InternetProtocol >::address(), INVARIANT_CHECK, m_remote, and m_ses.
Referenced by libtorrent::bt_peer_connection::on_dht_port().
| void libtorrent::peer_connection::send_choke | ( | ) |
Definition at line 1205 of file peer_connection.cpp.
References INVARIANT_CHECK, m_choked, m_last_choke, m_num_invalid_requests, m_requests, and write_choke().
Referenced by libtorrent::policy::choke_one_peer(), fill_send_buffer(), libtorrent::policy::not_interested(), libtorrent::policy::pulse(), and libtorrent::policy::seed_choke_one_peer().
| void libtorrent::peer_connection::send_unchoke | ( | ) |
Definition at line 1226 of file peer_connection.cpp.
References INVARIANT_CHECK, m_choked, and write_unchoke().
Referenced by fill_send_buffer(), libtorrent::policy::interested(), libtorrent::policy::pulse(), libtorrent::policy::seed_unchoke_one_peer(), and libtorrent::policy::unchoke_one_peer().
| void libtorrent::peer_connection::send_interested | ( | ) |
Definition at line 1250 of file peer_connection.cpp.
References INVARIANT_CHECK, m_interesting, and write_interested().
Referenced by libtorrent::policy::peer_is_interesting().
| void libtorrent::peer_connection::send_not_interested | ( | ) |
Definition at line 1265 of file peer_connection.cpp.
References INVARIANT_CHECK, m_became_uninteresting, m_interesting, and write_not_interested().
| void libtorrent::peer_connection::add_request | ( | piece_block const & | b | ) |
Definition at line 1131 of file peer_connection.cpp.
References libtorrent::piece_block::block_index, INVARIANT_CHECK, m_remote, m_request_queue, m_torrent, and libtorrent::piece_block::piece_index.
Referenced by libtorrent::request_a_block().
| void libtorrent::peer_connection::cancel_request | ( | piece_block const & | b | ) |
Definition at line 1149 of file peer_connection.cpp.
References libtorrent::piece_block::block_index, INVARIANT_CHECK, asio::placeholders::iterator, libtorrent::peer_request::length, m_download_queue, m_request_queue, m_torrent, libtorrent::peer_request::piece, libtorrent::piece_block::piece_index, libtorrent::peer_request::start, and write_cancel().
Referenced by libtorrent::request_a_block().
| void libtorrent::peer_connection::send_block_requests | ( | ) |
Definition at line 1282 of file peer_connection.cpp.
References libtorrent::piece_block::block_index, libtorrent::stat::download_rate(), has_peer_choked(), INVARIANT_CHECK, asio::placeholders::iterator, libtorrent::peer_request::length, m_desired_queue_size, m_download_queue, m_extensions, m_last_piece, m_request_large_blocks, m_request_queue, m_torrent, libtorrent::peer_request::piece, libtorrent::piece_block::piece_index, libtorrent::peer_request::start, statistics(), verify_piece(), and write_request().
Referenced by incoming_piece(), libtorrent::request_a_block(), and second_tick().
| int libtorrent::peer_connection::max_assignable_bandwidth | ( | int | channel | ) | const [inline] |
Definition at line 302 of file peer_connection.hpp.
| void libtorrent::peer_connection::assign_bandwidth | ( | int | channel, | |
| int | amount | |||
| ) |
Definition at line 1643 of file peer_connection.cpp.
References libtorrent::bandwidth_limit::assign(), download_channel, l, m_bandwidth_limit, libtorrent::aux::session_impl::m_mutex, m_reading, m_ses, m_writing, setup_receive(), setup_send(), and upload_channel.
| void libtorrent::peer_connection::expire_bandwidth | ( | int | channel, | |
| int | amount | |||
| ) |
Definition at line 1664 of file peer_connection.cpp.
References download_channel, libtorrent::bandwidth_limit::expire(), l, m_bandwidth_limit, libtorrent::aux::session_impl::m_mutex, m_ses, setup_receive(), setup_send(), and upload_channel.
| void libtorrent::peer_connection::check_invariant | ( | ) | const |
Reimplemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Definition at line 2059 of file peer_connection.cpp.
References libtorrent::torrent::connection_for(), asio::placeholders::iterator, m_current_send_buffer, m_in_constructor, m_remote, m_send_buffer, m_ses, m_torrent, libtorrent::aux::session_impl::m_torrents, and m_write_pos.
| virtual void libtorrent::peer_connection::get_peer_info | ( | peer_info & | p | ) | const [pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by libtorrent::torrent_handle::get_peer_info().
| virtual bool libtorrent::peer_connection::in_handshake | ( | ) | const [pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
| virtual boost::optional<piece_block_progress> libtorrent::peer_connection::downloading_piece_progress | ( | ) | const [inline, virtual] |
Reimplemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Definition at line 327 of file peer_connection.hpp.
Referenced by libtorrent::torrent::bytes_done().
| void libtorrent::peer_connection::send_buffer | ( | char const * | begin, | |
| char const * | end | |||
| ) |
Definition at line 1801 of file peer_connection.cpp.
References m_current_send_buffer, m_send_buffer, and setup_send().
Referenced by libtorrent::bt_peer_connection::write_choke(), libtorrent::bt_peer_connection::write_have(), libtorrent::bt_peer_connection::write_interested(), libtorrent::bt_peer_connection::write_keepalive(), libtorrent::bt_peer_connection::write_not_interested(), libtorrent::web_peer_connection::write_request(), and libtorrent::bt_peer_connection::write_unchoke().
| buffer::interval libtorrent::peer_connection::allocate_send_buffer | ( | int | size | ) |
Definition at line 1808 of file peer_connection.cpp.
References m_current_send_buffer, and m_send_buffer.
Referenced by libtorrent::bt_peer_connection::write_bitfield(), libtorrent::bt_peer_connection::write_cancel(), libtorrent::bt_peer_connection::write_dht_port(), libtorrent::bt_peer_connection::write_extensions(), libtorrent::bt_peer_connection::write_handshake(), libtorrent::bt_peer_connection::write_piece(), and libtorrent::bt_peer_connection::write_request().
| void libtorrent::peer_connection::setup_send | ( | ) |
Definition at line 1679 of file peer_connection.cpp.
References asio::detail::socket_ops::bind(), asio::buffer(), can_write(), INVARIANT_CHECK, l, m_bandwidth_limit, m_connecting, m_current_send_buffer, libtorrent::aux::session_impl::m_mutex, m_send_buffer, m_ses, m_socket, m_torrent, m_write_pos, m_writing, on_send_data(), and upload_channel.
Referenced by assign_bandwidth(), expire_bandwidth(), on_connection_complete(), on_send_data(), send_buffer(), libtorrent::bt_peer_connection::write_bitfield(), libtorrent::bt_peer_connection::write_cancel(), libtorrent::bt_peer_connection::write_dht_port(), libtorrent::bt_peer_connection::write_extensions(), libtorrent::bt_peer_connection::write_handshake(), libtorrent::bt_peer_connection::write_piece(), and libtorrent::bt_peer_connection::write_request().
| void libtorrent::peer_connection::set_country | ( | char const * | c | ) | [inline] |
Definition at line 339 of file peer_connection.hpp.
| bool libtorrent::peer_connection::has_country | ( | ) | const [inline] |
Definition at line 345 of file peer_connection.hpp.
| virtual void libtorrent::peer_connection::write_choke | ( | ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by send_choke().
| virtual void libtorrent::peer_connection::write_unchoke | ( | ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by send_unchoke().
| virtual void libtorrent::peer_connection::write_interested | ( | ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by send_interested().
| virtual void libtorrent::peer_connection::write_not_interested | ( | ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by send_not_interested().
| virtual void libtorrent::peer_connection::write_request | ( | peer_request const & | r | ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by send_block_requests().
| virtual void libtorrent::peer_connection::write_cancel | ( | peer_request const & | r | ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by cancel_request().
| virtual void libtorrent::peer_connection::write_have | ( | int | index | ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by announce_piece().
| virtual void libtorrent::peer_connection::write_keepalive | ( | ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by keep_alive().
| virtual void libtorrent::peer_connection::write_piece | ( | peer_request const & | r | ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by fill_send_buffer().
| virtual void libtorrent::peer_connection::on_connected | ( | ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by on_connection_complete().
| virtual void libtorrent::peer_connection::on_tick | ( | ) | [inline, protected, virtual] |
| virtual void libtorrent::peer_connection::on_receive | ( | asio::error_code const & | error, | |
| std::size_t | bytes_transferred | |||
| ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by on_receive_data().
| virtual void libtorrent::peer_connection::on_sent | ( | asio::error_code const & | error, | |
| std::size_t | bytes_transferred | |||
| ) | [protected, pure virtual] |
Implemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Referenced by on_send_data().
| int libtorrent::peer_connection::send_buffer_size | ( | ) | const [inline, protected] |
Definition at line 367 of file peer_connection.hpp.
Referenced by fill_send_buffer(), and libtorrent::bt_peer_connection::write_piece().
| buffer::const_interval libtorrent::peer_connection::receive_buffer | ( | ) | const [inline, protected] |
Definition at line 374 of file peer_connection.hpp.
Referenced by libtorrent::bt_peer_connection::dispatch_message(), libtorrent::bt_peer_connection::downloading_piece_progress(), libtorrent::bt_peer_connection::on_bitfield(), libtorrent::bt_peer_connection::on_cancel(), libtorrent::bt_peer_connection::on_dht_port(), libtorrent::bt_peer_connection::on_extended(), libtorrent::bt_peer_connection::on_extended_handshake(), libtorrent::bt_peer_connection::on_have(), libtorrent::bt_peer_connection::on_piece(), libtorrent::web_peer_connection::on_receive(), libtorrent::bt_peer_connection::on_receive(), and libtorrent::bt_peer_connection::on_request().
| void libtorrent::peer_connection::cut_receive_buffer | ( | int | size, | |
| int | packet_size | |||
| ) | [protected] |
Definition at line 1446 of file peer_connection.cpp.
References INVARIANT_CHECK, m_packet_size, m_recv_buffer, and m_recv_pos.
Referenced by libtorrent::web_peer_connection::on_receive(), and reset_recv_buffer().
| void libtorrent::peer_connection::reset_recv_buffer | ( | int | packet_size | ) | [protected] |
Definition at line 1787 of file peer_connection.cpp.
References cut_receive_buffer(), m_packet_size, m_recv_buffer, and m_recv_pos.
Referenced by libtorrent::bt_peer_connection::bt_peer_connection(), libtorrent::web_peer_connection::on_connected(), and libtorrent::bt_peer_connection::on_receive().
| int libtorrent::peer_connection::packet_size | ( | ) | const [inline, protected] |
Definition at line 383 of file peer_connection.hpp.
Referenced by libtorrent::bt_peer_connection::dispatch_message(), libtorrent::bt_peer_connection::downloading_piece_progress(), libtorrent::bt_peer_connection::on_bitfield(), libtorrent::bt_peer_connection::on_cancel(), libtorrent::bt_peer_connection::on_choke(), libtorrent::bt_peer_connection::on_dht_port(), libtorrent::bt_peer_connection::on_extended(), libtorrent::bt_peer_connection::on_have(), libtorrent::bt_peer_connection::on_interested(), libtorrent::bt_peer_connection::on_not_interested(), libtorrent::bt_peer_connection::on_piece(), libtorrent::web_peer_connection::on_receive(), libtorrent::bt_peer_connection::on_receive(), libtorrent::bt_peer_connection::on_request(), libtorrent::bt_peer_connection::on_unchoke(), libtorrent::bt_peer_connection::write_bitfield(), libtorrent::bt_peer_connection::write_have(), and libtorrent::bt_peer_connection::write_piece().
| bool libtorrent::peer_connection::packet_finished | ( | ) | const [inline, protected] |
Definition at line 385 of file peer_connection.hpp.
Referenced by libtorrent::bt_peer_connection::dispatch_message(), libtorrent::bt_peer_connection::on_bitfield(), libtorrent::bt_peer_connection::on_cancel(), libtorrent::bt_peer_connection::on_choke(), libtorrent::bt_peer_connection::on_dht_port(), libtorrent::bt_peer_connection::on_extended_handshake(), libtorrent::bt_peer_connection::on_have(), libtorrent::bt_peer_connection::on_interested(), libtorrent::bt_peer_connection::on_not_interested(), libtorrent::bt_peer_connection::on_piece(), libtorrent::bt_peer_connection::on_receive(), libtorrent::bt_peer_connection::on_request(), and libtorrent::bt_peer_connection::on_unchoke().
| void libtorrent::peer_connection::setup_receive | ( | ) | [protected] |
Definition at line 1743 of file peer_connection.cpp.
References asio::detail::socket_ops::bind(), asio::buffer(), can_read(), download_channel, INVARIANT_CHECK, l, m_bandwidth_limit, m_connecting, libtorrent::aux::session_impl::m_mutex, m_non_prioritized, m_packet_size, m_reading, m_recv_buffer, m_recv_pos, m_ses, m_socket, m_torrent, and on_receive_data().
Referenced by assign_bandwidth(), libtorrent::bt_peer_connection::bt_peer_connection(), expire_bandwidth(), on_connection_complete(), and on_receive_data().
| void libtorrent::peer_connection::attach_to_torrent | ( | sha1_hash const & | ih | ) | [protected] |
Definition at line 410 of file peer_connection.cpp.
References libtorrent::disconnect_torrent::cancel(), disconnect(), libtorrent::aux::session_impl::find_torrent(), init(), INVARIANT_CHECK, m_disconnecting, m_have_piece, m_num_pieces, m_ses, and m_torrent.
Referenced by libtorrent::bt_peer_connection::on_receive().
| bool libtorrent::peer_connection::verify_piece | ( | peer_request const & | p | ) | const [protected] |
Definition at line 378 of file peer_connection.cpp.
References INVARIANT_CHECK, libtorrent::peer_request::length, m_request_large_blocks, m_torrent, libtorrent::peer_request::piece, and libtorrent::peer_request::start.
Referenced by libtorrent::bt_peer_connection::downloading_piece_progress(), incoming_piece(), and send_block_requests().
| boost::intrusive_ptr<peer_connection> libtorrent::peer_connection::self | ( | ) | [inline, protected] |
Definition at line 410 of file peer_connection.hpp.
| void libtorrent::peer_connection::on_send_data | ( | asio::error_code const & | error, | |
| std::size_t | bytes_transferred | |||
| ) | [protected] |
Definition at line 2005 of file peer_connection.cpp.
References fill_send_buffer(), INVARIANT_CHECK, l, m_bandwidth_limit, m_connecting, m_current_send_buffer, m_disconnecting, m_last_sent, libtorrent::aux::session_impl::m_mutex, m_send_buffer, m_ses, m_write_pos, m_writing, asio::error_code::message(), on_sent(), setup_send(), upload_channel, and libtorrent::bandwidth_limit::use_quota().
Referenced by setup_send().
| void libtorrent::peer_connection::on_receive_data | ( | asio::error_code const & | error, | |
| std::size_t | bytes_transferred | |||
| ) | [protected] |
Definition at line 1832 of file peer_connection.cpp.
References download_channel, INVARIANT_CHECK, l, m_bandwidth_limit, m_disconnecting, m_last_receive, libtorrent::aux::session_impl::m_mutex, m_packet_size, m_reading, m_recv_buffer, m_recv_pos, m_ses, asio::error_code::message(), on_receive(), setup_receive(), and libtorrent::bandwidth_limit::use_quota().
Referenced by setup_receive().
| void libtorrent::peer_connection::set_timeout | ( | int | s | ) | [inline, protected] |
Definition at line 428 of file peer_connection.hpp.
Referenced by libtorrent::web_peer_connection::web_peer_connection().
| void libtorrent::peer_connection::fill_send_buffer | ( | ) | [private] |
Definition at line 1594 of file peer_connection.cpp.
References INVARIANT_CHECK, is_peer_interested(), is_seed(), m_choked, m_have_piece, m_num_invalid_requests, m_requests, m_torrent, send_buffer_size(), send_choke(), send_unchoke(), and write_piece().
Referenced by incoming_request(), on_send_data(), and second_tick().
friend class invariant_access [friend] |
Reimplemented in libtorrent::bt_peer_connection, and libtorrent::web_peer_connection.
Definition at line 101 of file peer_connection.hpp.
| void intrusive_ptr_add_ref | ( | peer_connection const * | c | ) | [friend] |
| void intrusive_ptr_release | ( | peer_connection const * | c | ) | [friend] |
| boost::posix_time::ptime libtorrent::peer_connection::m_last_choke |
Reimplemented in libtorrent::bt_peer_connection.
Definition at line 312 of file peer_connection.hpp.
Referenced by send_choke().
bandwidth_limit libtorrent::peer_connection::m_bandwidth_limit[num_channels] [protected] |
Definition at line 399 of file peer_connection.hpp.
Referenced by assign_bandwidth(), libtorrent::bt_peer_connection::bt_peer_connection(), can_read(), can_write(), expire_bandwidth(), libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), on_receive_data(), on_send_data(), second_tick(), set_download_limit(), set_upload_limit(), setup_receive(), and setup_send().
stat libtorrent::peer_connection::m_statistics [protected] |
Definition at line 404 of file peer_connection.hpp.
Referenced by add_stat(), libtorrent::bt_peer_connection::on_bitfield(), libtorrent::bt_peer_connection::on_cancel(), libtorrent::bt_peer_connection::on_choke(), libtorrent::bt_peer_connection::on_dht_port(), libtorrent::bt_peer_connection::on_extended(), libtorrent::bt_peer_connection::on_have(), libtorrent::bt_peer_connection::on_interested(), libtorrent::bt_peer_connection::on_not_interested(), libtorrent::bt_peer_connection::on_piece(), libtorrent::web_peer_connection::on_receive(), libtorrent::bt_peer_connection::on_receive(), libtorrent::bt_peer_connection::on_request(), libtorrent::web_peer_connection::on_sent(), libtorrent::bt_peer_connection::on_sent(), libtorrent::bt_peer_connection::on_unchoke(), second_tick(), and share_diff().
aux::session_impl& libtorrent::peer_connection::m_ses [protected] |
Definition at line 408 of file peer_connection.hpp.
Referenced by assign_bandwidth(), attach_to_torrent(), libtorrent::catch(), check_invariant(), connect(), disconnect(), expire_bandwidth(), incoming_dht_port(), incoming_request(), on_connection_complete(), libtorrent::web_peer_connection::on_receive(), libtorrent::bt_peer_connection::on_receive(), on_receive_data(), on_send_data(), peer_connection(), second_tick(), setup_receive(), setup_send(), libtorrent::bt_peer_connection::write_extensions(), libtorrent::bt_peer_connection::write_handshake(), and libtorrent::web_peer_connection::write_request().
int libtorrent::peer_connection::m_max_out_request_queue [protected] |
Definition at line 426 of file peer_connection.hpp.
Referenced by libtorrent::bt_peer_connection::on_extended_handshake(), libtorrent::bt_peer_connection::on_receive(), second_tick(), and libtorrent::web_peer_connection::web_peer_connection().
Definition at line 432 of file peer_connection.hpp.
Referenced by add_extension(), libtorrent::bt_peer_connection::dispatch_message(), libtorrent::bt_peer_connection::on_bitfield(), libtorrent::bt_peer_connection::on_cancel(), libtorrent::bt_peer_connection::on_choke(), libtorrent::bt_peer_connection::on_extended(), libtorrent::bt_peer_connection::on_extended_handshake(), libtorrent::bt_peer_connection::on_have(), libtorrent::bt_peer_connection::on_interested(), libtorrent::bt_peer_connection::on_not_interested(), libtorrent::bt_peer_connection::on_piece(), libtorrent::bt_peer_connection::on_receive(), libtorrent::bt_peer_connection::on_request(), libtorrent::bt_peer_connection::on_unchoke(), received_invalid_data(), received_valid_data(), second_tick(), send_block_requests(), and libtorrent::bt_peer_connection::write_extensions().
char libtorrent::peer_connection::m_country[2] [protected] |
Definition at line 439 of file peer_connection.hpp.
Referenced by libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), and peer_connection().
int libtorrent::peer_connection::m_timeout [private] |
Reimplemented in libtorrent::bt_peer_connection.
Definition at line 446 of file peer_connection.hpp.
Referenced by has_timed_out(), and keep_alive().
boost::posix_time::ptime libtorrent::peer_connection::m_last_piece [private] |
Definition at line 450 of file peer_connection.hpp.
Referenced by incoming_piece_fragment(), second_tick(), and send_block_requests().
int libtorrent::peer_connection::m_packet_size [private] |
Definition at line 452 of file peer_connection.hpp.
Referenced by cut_receive_buffer(), on_receive_data(), reset_recv_buffer(), and setup_receive().
int libtorrent::peer_connection::m_recv_pos [private] |
Definition at line 453 of file peer_connection.hpp.
Referenced by cut_receive_buffer(), on_receive_data(), reset_recv_buffer(), and setup_receive().
std::vector<char> libtorrent::peer_connection::m_recv_buffer [private] |
Definition at line 454 of file peer_connection.hpp.
Referenced by cut_receive_buffer(), on_receive_data(), reset_recv_buffer(), and setup_receive().
std::vector<char> libtorrent::peer_connection::m_send_buffer[2] [private] |
Definition at line 465 of file peer_connection.hpp.
Referenced by allocate_send_buffer(), can_write(), check_invariant(), on_send_data(), send_buffer(), and setup_send().
int libtorrent::peer_connection::m_current_send_buffer [private] |
Definition at line 469 of file peer_connection.hpp.
Referenced by allocate_send_buffer(), can_write(), check_invariant(), on_send_data(), send_buffer(), and setup_send().
int libtorrent::peer_connection::m_write_pos [private] |
Definition at line 474 of file peer_connection.hpp.
Referenced by check_invariant(), on_send_data(), and setup_send().
boost::posix_time::ptime libtorrent::peer_connection::m_last_receive [private] |
Definition at line 477 of file peer_connection.hpp.
Referenced by has_timed_out(), on_connection_complete(), and on_receive_data().
boost::posix_time::ptime libtorrent::peer_connection::m_last_sent [private] |
boost::shared_ptr<stream_socket> libtorrent::peer_connection::m_socket [private] |
Definition at line 480 of file peer_connection.hpp.
Referenced by libtorrent::catch(), connect(), disconnect(), on_connection_complete(), peer_connection(), setup_receive(), and setup_send().
Definition at line 484 of file peer_connection.hpp.
Referenced by add_request(), check_invariant(), connect(), incoming_dht_port(), incoming_piece(), incoming_request(), on_connection_complete(), and peer_connection().
boost::weak_ptr<torrent> libtorrent::peer_connection::m_torrent [private] |
Definition at line 494 of file peer_connection.hpp.
Referenced by add_request(), announce_piece(), attach_to_torrent(), cancel_request(), check_invariant(), connect(), disconnect(), fill_send_buffer(), has_piece(), incoming_bitfield(), incoming_choke(), incoming_have(), incoming_interested(), incoming_not_interested(), incoming_piece(), incoming_request(), incoming_unchoke(), init(), second_tick(), send_block_requests(), setup_receive(), setup_send(), share_diff(), verify_piece(), and ~peer_connection().
bool libtorrent::peer_connection::m_active [private] |
Definition at line 498 of file peer_connection.hpp.
Definition at line 501 of file peer_connection.hpp.
Referenced by connect(), incoming_piece(), incoming_request(), and peer_connection().
Definition at line 505 of file peer_connection.hpp.
Referenced by has_timed_out(), incoming_interested(), incoming_not_interested(), and incoming_request().
Definition at line 509 of file peer_connection.hpp.
Referenced by incoming_choke(), and incoming_unchoke().
Definition at line 512 of file peer_connection.hpp.
Referenced by has_timed_out(), send_interested(), and send_not_interested().
bool libtorrent::peer_connection::m_choked [private] |
Definition at line 515 of file peer_connection.hpp.
Referenced by fill_send_buffer(), incoming_request(), send_choke(), and send_unchoke().
bool libtorrent::peer_connection::m_failed [private] |
Definition at line 521 of file peer_connection.hpp.
std::vector<bool> libtorrent::peer_connection::m_have_piece [private] |
Definition at line 524 of file peer_connection.hpp.
Referenced by attach_to_torrent(), fill_send_buffer(), get_bitfield(), has_piece(), incoming_bitfield(), incoming_have(), init(), and is_seed().
int libtorrent::peer_connection::m_num_pieces [private] |
Definition at line 530 of file peer_connection.hpp.
Referenced by attach_to_torrent(), incoming_bitfield(), incoming_have(), init(), and is_seed().
std::deque<peer_request> libtorrent::peer_connection::m_requests [private] |
Reimplemented in libtorrent::web_peer_connection.
Definition at line 534 of file peer_connection.hpp.
Referenced by fill_send_buffer(), incoming_cancel(), incoming_not_interested(), incoming_request(), send_choke(), and upload_queue().
std::deque<piece_block> libtorrent::peer_connection::m_request_queue [private] |
Definition at line 538 of file peer_connection.hpp.
Referenced by add_request(), cancel_request(), disconnect(), incoming_choke(), request_queue(), second_tick(), and send_block_requests().
std::deque<piece_block> libtorrent::peer_connection::m_download_queue [private] |
Definition at line 542 of file peer_connection.hpp.
Referenced by cancel_request(), disconnect(), download_queue(), incoming_choke(), incoming_piece(), second_tick(), and send_block_requests().
int libtorrent::peer_connection::m_desired_queue_size [private] |
Definition at line 546 of file peer_connection.hpp.
Referenced by incoming_piece(), second_tick(), and send_block_requests().
Definition at line 554 of file peer_connection.hpp.
Referenced by add_free_upload(), second_tick(), share_diff(), and total_free_upload().
int libtorrent::peer_connection::m_trust_points [private] |
Definition at line 562 of file peer_connection.hpp.
Referenced by received_invalid_data(), received_valid_data(), and trust_points().
Definition at line 569 of file peer_connection.hpp.
Referenced by incoming_piece(), and second_tick().
int libtorrent::peer_connection::m_num_invalid_requests [private] |
Definition at line 578 of file peer_connection.hpp.
Referenced by fill_send_buffer(), incoming_request(), and send_choke().
Definition at line 582 of file peer_connection.hpp.
Referenced by attach_to_torrent(), disconnect(), on_connection_complete(), on_receive_data(), on_send_data(), and ~peer_connection().
boost::posix_time::ptime libtorrent::peer_connection::m_became_uninterested [private] |
Definition at line 586 of file peer_connection.hpp.
Referenced by has_timed_out(), and incoming_not_interested().
boost::posix_time::ptime libtorrent::peer_connection::m_became_uninteresting [private] |
Definition at line 590 of file peer_connection.hpp.
Referenced by has_timed_out(), and send_not_interested().
Definition at line 600 of file peer_connection.hpp.
Referenced by can_read(), can_write(), connect(), has_timed_out(), keep_alive(), on_connection_complete(), on_send_data(), setup_receive(), and setup_send().
bool libtorrent::peer_connection::m_queued [private] |
bool libtorrent::peer_connection::m_writing [private] |
Definition at line 609 of file peer_connection.hpp.
Referenced by assign_bandwidth(), on_send_data(), and setup_send().
bool libtorrent::peer_connection::m_reading [private] |
Definition at line 610 of file peer_connection.hpp.
Referenced by assign_bandwidth(), on_receive_data(), and setup_receive().
Definition at line 617 of file peer_connection.hpp.
Definition at line 625 of file peer_connection.hpp.
Referenced by second_tick(), send_block_requests(), and verify_piece().
boost::detail::atomic_count libtorrent::peer_connection::m_refs [mutable, private] |
Definition at line 634 of file peer_connection.hpp.
Referenced by libtorrent::intrusive_ptr_add_ref(), and libtorrent::intrusive_ptr_release().
int libtorrent::peer_connection::m_upload_limit [private] |
Definition at line 636 of file peer_connection.hpp.
Referenced by second_tick(), and set_upload_limit().
int libtorrent::peer_connection::m_download_limit [private] |
Reimplemented in libtorrent::bt_peer_connection.
Definition at line 641 of file peer_connection.hpp.
Referenced by check_invariant().
1.5.6