#include <bandwidth_manager.hpp>
Public Member Functions | |
| bandwidth_limit () | |
| void | throttle (int limit) |
| int | throttle () const |
| void | assign (int amount) |
| void | use_quota (int amount) |
| int | quota_left () const |
| void | expire (int amount) |
| int | max_assignable () const |
Static Public Attributes | |
| static const int | inf = boost::integer_traits<int>::const_max |
Private Attributes | |
| int | m_quota_left |
| int | m_local_limit |
| int | m_current_rate |
Definition at line 88 of file bandwidth_manager.hpp.
| libtorrent::bandwidth_limit::bandwidth_limit | ( | ) | [inline] |
Definition at line 92 of file bandwidth_manager.hpp.
| void libtorrent::bandwidth_limit::throttle | ( | int | limit | ) | [inline] |
Definition at line 98 of file bandwidth_manager.hpp.
References m_local_limit.
Referenced by libtorrent::torrent::bandwidth_throttle(), libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), libtorrent::torrent::request_bandwidth_from_session(), libtorrent::peer_connection::second_tick(), libtorrent::peer_connection::set_download_limit(), libtorrent::torrent::set_download_limit(), libtorrent::peer_connection::set_upload_limit(), and libtorrent::torrent::set_upload_limit().
| int libtorrent::bandwidth_limit::throttle | ( | ) | const [inline] |
| void libtorrent::bandwidth_limit::assign | ( | int | amount | ) | [inline] |
Definition at line 108 of file bandwidth_manager.hpp.
References m_current_rate, and m_quota_left.
Referenced by libtorrent::peer_connection::assign_bandwidth(), libtorrent::bt_peer_connection::bt_peer_connection(), libtorrent::torrent::expire_bandwidth(), and libtorrent::torrent::request_bandwidth().
| void libtorrent::bandwidth_limit::use_quota | ( | int | amount | ) | [inline] |
Definition at line 115 of file bandwidth_manager.hpp.
References m_quota_left.
Referenced by libtorrent::peer_connection::on_receive_data(), and libtorrent::peer_connection::on_send_data().
| int libtorrent::bandwidth_limit::quota_left | ( | ) | const [inline] |
Definition at line 121 of file bandwidth_manager.hpp.
References m_quota_left.
Referenced by libtorrent::peer_connection::can_read(), and libtorrent::peer_connection::can_write().
| void libtorrent::bandwidth_limit::expire | ( | int | amount | ) | [inline] |
Definition at line 126 of file bandwidth_manager.hpp.
References m_current_rate.
Referenced by libtorrent::peer_connection::expire_bandwidth(), and libtorrent::torrent::expire_bandwidth().
| int libtorrent::bandwidth_limit::max_assignable | ( | ) | const [inline] |
Definition at line 132 of file bandwidth_manager.hpp.
References inf, m_current_rate, and m_local_limit.
Referenced by libtorrent::torrent::request_bandwidth_from_session().
const int libtorrent::bandwidth_limit::inf = boost::integer_traits<int>::const_max [static] |
Definition at line 90 of file bandwidth_manager.hpp.
Referenced by libtorrent::web_peer_connection::get_peer_info(), libtorrent::bt_peer_connection::get_peer_info(), max_assignable(), libtorrent::aux::session_impl::set_download_rate_limit(), and libtorrent::aux::session_impl::set_upload_rate_limit().
int libtorrent::bandwidth_limit::m_quota_left [private] |
Definition at line 149 of file bandwidth_manager.hpp.
Referenced by assign(), quota_left(), and use_quota().
int libtorrent::bandwidth_limit::m_local_limit [private] |
Definition at line 153 of file bandwidth_manager.hpp.
Referenced by max_assignable(), and throttle().
int libtorrent::bandwidth_limit::m_current_rate [private] |
Definition at line 158 of file bandwidth_manager.hpp.
Referenced by assign(), expire(), and max_assignable().
1.5.6