forked from premiere/premiere-libtorrent
made recent change where the TCP/IP overhead is take into account when rate limiting, optional
This commit is contained in:
parent
ce24a17308
commit
78abf8a340
|
@ -3038,6 +3038,8 @@ that will be sent to the tracker. The user-agent is a good way to identify your
|
|||
|
||||
bool prioritize_partial_pieces;
|
||||
int auto_manage_startup;
|
||||
|
||||
bool rate_limit_ip_overhead;
|
||||
};
|
||||
|
||||
``user_agent`` this is the client identification to the tracker.
|
||||
|
@ -3319,6 +3321,9 @@ active after it was started, regardless of upload and download speed. This
|
|||
is so that newly started torrents are not considered inactive until they
|
||||
have a fair chance to start downloading.
|
||||
|
||||
If ``rate_limit_ip_overhead`` is set to true, the estimated TCP/IP overhead is
|
||||
drained from the rate limiters, to avoid exceeding the limits with the total traffic
|
||||
|
||||
|
||||
pe_settings
|
||||
===========
|
||||
|
|
|
@ -143,6 +143,7 @@ namespace libtorrent
|
|||
, min_announce_interval(5 * 60)
|
||||
, prioritize_partial_pieces(false)
|
||||
, auto_manage_startup(120)
|
||||
, rate_limit_ip_overhead(true)
|
||||
{}
|
||||
|
||||
// this is the user agent that will be sent to the tracker
|
||||
|
@ -450,6 +451,11 @@ namespace libtorrent
|
|||
// inactive until they have a fair chance to
|
||||
// start downloading.
|
||||
int auto_manage_startup;
|
||||
|
||||
// if set to true, the estimated TCP/IP overhead is
|
||||
// drained from the rate limiters, to avoid exceeding
|
||||
// the limits with the total traffic
|
||||
bool rate_limit_ip_overhead;
|
||||
};
|
||||
|
||||
#ifndef TORRENT_DISABLE_DHT
|
||||
|
|
|
@ -1121,10 +1121,13 @@ namespace aux {
|
|||
}
|
||||
|
||||
// drain the IP overhead from the bandwidth limiters
|
||||
m_download_channel.drain(
|
||||
m_stat.download_ip_overhead()
|
||||
+ m_stat.download_dht()
|
||||
+ m_stat.download_tracker());
|
||||
if (m_settings.rate_limit_ip_overhead)
|
||||
{
|
||||
m_download_channel.drain(
|
||||
m_stat.download_ip_overhead()
|
||||
+ m_stat.download_dht()
|
||||
+ m_stat.download_tracker());
|
||||
}
|
||||
|
||||
if (m_stat.download_ip_overhead() >= m_download_channel.throttle()
|
||||
&& m_alerts.should_post<performance_alert>())
|
||||
|
@ -1133,10 +1136,13 @@ namespace aux {
|
|||
, performance_alert::download_limit_too_low));
|
||||
}
|
||||
|
||||
m_upload_channel.drain(
|
||||
m_stat.upload_ip_overhead()
|
||||
+ m_stat.upload_dht()
|
||||
+ m_stat.upload_tracker());
|
||||
if (m_settings.rate_limit_ip_overhead)
|
||||
{
|
||||
m_upload_channel.drain(
|
||||
m_stat.upload_ip_overhead()
|
||||
+ m_stat.upload_dht()
|
||||
+ m_stat.upload_tracker());
|
||||
}
|
||||
|
||||
if (m_stat.upload_ip_overhead() >= m_upload_channel.throttle()
|
||||
&& m_alerts.should_post<performance_alert>())
|
||||
|
|
Loading…
Reference in New Issue