regenerate documentation

This commit is contained in:
Arvid Norberg 2014-10-04 20:00:13 +00:00
parent d296960efa
commit 285ba7df0a
4 changed files with 163 additions and 205 deletions

View File

@ -315,18 +315,6 @@ directory, but won't abort the process.</li>
</ul>
</td>
</tr>
<tr><td><tt class="docutils literal">geoip</tt></td>
<td><ul class="first last simple">
<li><tt class="docutils literal">off</tt> - geo ip lookups disabled</li>
<li><tt class="docutils literal">static</tt> - <a class="reference external" href="http://www.maxmind.com/app/api">MaxMind</a> geo ip lookup code linked
in statically. Note that this code is under
LGPL license.</li>
<li><tt class="docutils literal">shared</tt> - The <a class="reference external" href="http://www.maxmind.com/app/api">MaxMind</a> geo ip lookup library
is expected to be installed on the system and
it will be used.</li>
</ul>
</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">upnp-logging</span></tt></td>
<td><ul class="first last simple">
<li><tt class="docutils literal">off</tt> - default. Does not log UPnP traffic.</li>
@ -668,11 +656,6 @@ structs and class layouts and sizes.</td>
events, such as tracker announces and incoming
connections (as well as blocked connections).</td>
</tr>
<tr><td><tt class="docutils literal">TORRENT_DISABLE_GEO_IP</tt></td>
<td>This is defined by default by the Jamfile. It
disables the GeoIP features, and avoids linking
against LGPL:ed code.</td>
</tr>
<tr><td><tt class="docutils literal">TORRENT_VERBOSE_LOGGING</tt></td>
<td>If you define this macro, every peer connection
will log its traffic to a log file as well as

View File

@ -695,9 +695,6 @@ class session: public boost::noncopyable
void <strong>add_extension</strong> (boost::function&lt;boost::shared_ptr&lt;torrent_plugin&gt;(
torrent*, void*)&gt; ext);
void <strong>add_extension</strong> (boost::shared_ptr&lt;plugin&gt; ext);
void <strong>load_country_db</strong> (char const* file);
void <strong>load_asnum_db</strong> (char const* file);
int <strong>as_for_ip</strong> (address const&amp; addr);
ip_filter <strong>get_ip_filter</strong> () const;
void <strong>set_ip_filter</strong> (ip_filter const&amp; f);
void <strong>set_port_filter</strong> (port_filter const&amp; f);
@ -1169,23 +1166,6 @@ eliminate most problems on poisoned torrents.</dd>
#include &lt;libtorrent/extensions/smart_ban.hpp&gt;
ses.add_extension(&amp;libtorrent::create_smart_ban_plugin);
</pre>
<a name="load_asnum_db()"></a>
<a name="load_country_db()"></a>
<a name="as_for_ip()"></a></div>
<div class="section" id="load-asnum-db-load-country-db-as-for-ip">
<h2>load_asnum_db() load_country_db() as_for_ip()</h2>
<pre class="literal-block">
void <strong>load_country_db</strong> (char const* file);
void <strong>load_asnum_db</strong> (char const* file);
int <strong>as_for_ip</strong> (address const&amp; addr);
</pre>
<p>These functions are not available if <tt class="docutils literal">TORRENT_DISABLE_GEO_IP</tt> is
defined. They expects a path to the <a class="reference external" href="http://www.maxmind.com/app/asnum">MaxMind ASN database</a> and
<a class="reference external" href="http://www.maxmind.com/app/geolitecountry">MaxMind GeoIP database</a> respectively. This will be used to look up
which AS and country peers belong to.</p>
<p><tt class="docutils literal">as_for_ip</tt> returns the AS number for the IP address specified. If
the IP is not in the database or the ASN database is not loaded, 0 is
returned.</p>
<a name="get_ip_filter()"></a>
<a name="set_ip_filter()"></a></div>
<div class="section" id="get-ip-filter-set-ip-filter">

View File

@ -809,7 +809,7 @@ mode.
+----------------+------+---------+
| name | type | default |
+================+======+=========+
| anonymous_mode | bool | true |
| anonymous_mode | bool | false |
+----------------+------+---------+
``anonymous_mode`` defaults to false. When set to true, the client tries
@ -1276,6 +1276,23 @@ any). This is only supported by SOCKS5 and HTTP.
if true, peer connections are made (and accepted) over the
configured proxy, if any.
.. _auto_sequential:
.. raw:: html
<a name="auto_sequential"></a>
+-----------------+------+---------+
| name | type | default |
+=================+======+=========+
| auto_sequential | bool | true |
+-----------------+------+---------+
if this setting is true, torrents with a very high availability
of pieces (and seeds) are downloaded sequentially. This is more
efficient for the disk I/O. With many seeds, the download order
is unlikely to matter anyway
.. _tracker_completion_timeout:
.. raw:: html
@ -2633,28 +2650,6 @@ that requires more DHT traffic, this should be raised.
The number of unchoke slots may be ignored depending on what
``choking_algorithm`` is set to.
.. _half_open_limit:
.. raw:: html
<a name="half_open_limit"></a>
+-----------------+------+---------+
| name | type | default |
+=================+======+=========+
| half_open_limit | int | 0 |
+-----------------+------+---------+
``half_open_limit`` sets the maximum number of half-open connections
libtorrent will have when connecting to peers. A half-open connection is one
where connect() has been called, but the connection still hasn't been established
(nor failed). Windows XP Service Pack 2 sets a default, system wide, limit of
the number of half-open connections to 10. So, this limit can be used to work
nicer together with other network applications on that system. The default is
to have no limit, and passing -1 as the limit, means to have no limit. When
limiting the number of simultaneous connection attempts, peers will be put in
a queue waiting for their turn to get connected.
.. _connections_limit:
.. raw:: html

View File

@ -26,63 +26,63 @@
<span style="color: #3c3">22 relevant</span>
<span style="color: #77f">9 feasible</span>
<span style="color: #999">133 notes</span>
<table width="100%" border="1" style="border-collapse: collapse;"><tr style="background: #f44"><td>relevance&nbsp;4</td><td><a href="javascript:expand(0)">../src/http_tracker_connection.cpp:479</a></td><td>this is a bug. if the info-hash contains a 0, this will fail!</td></tr><tr id="0" style="display: none;" colspan="3"><td colspan="3"><h2>this is a bug. if the info-hash contains a 0, this will
fail!</h2><h4>../src/http_tracker_connection.cpp:479</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (failure)
{
resp.failure_reason = failure-&gt;string_value();
ec.assign(errors::tracker_failure, get_libtorrent_category());
return resp;
<table width="100%" border="1" style="border-collapse: collapse;"><tr style="background: #f44"><td>relevance&nbsp;4</td><td><a href="javascript:expand(0)">../src/peer_connection.cpp:4841</a></td><td>use a deadline_timer for timeouts. Don't rely on second_tick()! Hook this up to connect timeout as well</td></tr><tr id="0" style="display: none;" colspan="3"><td colspan="3"><h2>use a deadline_timer for timeouts. Don't rely on second_tick()!
Hook this up to connect timeout as well</h2><h4>../src/peer_connection.cpp:4841</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (is_i2p(*m_socket))
connect_timeout += 20;
#endif
if (d &gt; seconds(connect_timeout)
&amp;&amp; can_disconnect(error_code(errors::timed_out, get_libtorrent_category())))
{
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_ERROR_LOGGING
peer_log("*** CONNECT FAILED [ waited %d seconds ] ***", int(total_seconds(d)));
#endif
connect_failed(errors::timed_out);
return;
}
}
lazy_entry const* warning = e.dict_find_string("warning message");
if (warning)
resp.warning_message = warning-&gt;string_value();
// if we can't read, it means we're blocked on the rate-limiter
// or the disk, not the peer itself. In this case, don't blame
// the peer and disconnect it
bool may_timeout = (m_channel_state[download_channel] &amp; peer_info::bw_network) != 0;
if (scrape_request)
<div style="background: #ffff00" width="100%"> if (may_timeout &amp;&amp; d &gt; seconds(timeout()) &amp;&amp; !m_connecting &amp;&amp; m_reading_bytes == 0
</div> &amp;&amp; can_disconnect(error_code(errors::timed_out_inactivity, get_libtorrent_category())))
{
lazy_entry const* files = e.dict_find_dict("files");
if (files == 0)
{
ec.assign(errors::invalid_files_entry, get_libtorrent_category());
return resp;
}
<div style="background: #ffff00" width="100%"> lazy_entry const* scrape_data = files-&gt;dict_find_dict(
</div> scrape_ih.to_string().c_str());
if (scrape_data == 0)
{
ec.assign(errors::invalid_hash_entry, get_libtorrent_category());
return resp;
}
resp.complete = int(scrape_data-&gt;dict_find_int_value("complete", -1));
resp.incomplete = int(scrape_data-&gt;dict_find_int_value("incomplete", -1));
resp.downloaded = int(scrape_data-&gt;dict_find_int_value("downloaded", -1));
resp.downloaders = int(scrape_data-&gt;dict_find_int_value("downloaders", -1));
return resp;
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_ERROR_LOGGING
peer_log("*** LAST ACTIVITY [ %d seconds ago ] ***", int(total_seconds(d)));
#endif
disconnect(errors::timed_out_inactivity, op_bittorrent);
return;
}
// look for optional scrape info
resp.complete = int(e.dict_find_int_value("complete", -1));
resp.incomplete = int(e.dict_find_int_value("incomplete", -1));
resp.downloaded = int(e.dict_find_int_value("downloaded", -1));
lazy_entry const* peers_ent = e.dict_find("peers");
if (peers_ent &amp;&amp; peers_ent-&gt;type() == lazy_entry::string_t)
// do not stall waiting for a handshake
if (may_timeout
&amp;&amp; !m_connecting
&amp;&amp; in_handshake()
&amp;&amp; d &gt; seconds(m_settings.get_int(settings_pack::handshake_timeout)))
{
char const* peers = peers_ent-&gt;string_ptr();
int len = peers_ent-&gt;string_length();
resp.peers4.reserve(len / 6);
for (int i = 0; i &lt; len; i += 6)
{
if (len - i &lt; 6) break;
</pre></td></tr><tr style="background: #f44"><td>relevance&nbsp;4</td><td><a href="javascript:expand(1)">../src/session_impl.cpp:479</a></td><td>in order to support SSL over uTP, the utp_socket manager either needs to be able to receive packets on multiple ports, or we need to peek into the first few bytes the payload stream of a socket to determine whether or not it's an SSL connection. (The former is simpler but won't do as well with NATs)</td></tr><tr id="1" style="display: none;" colspan="3"><td colspan="3"><h2>in order to support SSL over uTP, the utp_socket manager either
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_ERROR_LOGGING
peer_log("*** NO HANDSHAKE [ waited %d seconds ] ***", int(total_seconds(d)));
#endif
disconnect(errors::timed_out_no_handshake, op_bittorrent);
return;
}
// disconnect peers that we unchoked, but
// they didn't send a request within 60 seconds.
// but only if we're a seed
d = now - (std::max)(m_last_unchoke, m_last_incoming_request);
if (may_timeout
&amp;&amp; !m_connecting
&amp;&amp; m_requests.empty()
&amp;&amp; m_reading_bytes == 0
</pre></td></tr><tr style="background: #f44"><td>relevance&nbsp;4</td><td><a href="javascript:expand(1)">../src/session_impl.cpp:482</a></td><td>in order to support SSL over uTP, the utp_socket manager either needs to be able to receive packets on multiple ports, or we need to peek into the first few bytes the payload stream of a socket to determine whether or not it's an SSL connection. (The former is simpler but won't do as well with NATs)</td></tr><tr id="1" style="display: none;" colspan="3"><td colspan="3"><h2>in order to support SSL over uTP, the utp_socket manager either
needs to be able to receive packets on multiple ports, or we need to
peek into the first few bytes the payload stream of a socket to determine
whether or not it's an SSL connection. (The former is simpler but won't
do as well with NATs)</h2><h4>../src/session_impl.cpp:479</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , m_optimistic_unchoke_time_scaler(0)
do as well with NATs)</h2><h4>../src/session_impl.cpp:482</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , m_optimistic_unchoke_time_scaler(0)
, m_disconnect_time_scaler(90)
, m_auto_scrape_time_scaler(180)
, m_next_explicit_cache_torrent(0)
@ -101,7 +101,7 @@ do as well with NATs)</h2><h4>../src/session_impl.cpp:479</h4><pre style="backgr
, m_dht_interval_update_torrents(0)
#endif
, m_external_udp_port(0)
, m_udp_socket(m_io_service, m_half_open)
, m_udp_socket(m_io_service)
<div style="background: #ffff00" width="100%"> , m_utp_socket_manager(m_settings, m_udp_socket, m_stats_counters
</div> , boost::bind(&amp;session_impl::incoming_connection, this, _1))
, m_boost_connections(0)
@ -133,7 +133,7 @@ do as well with NATs)</h2><h4>../src/session_impl.cpp:479</h4><pre style="backgr
#ifdef TORRENT_REQUEST_LOGGING
char log_filename[200];
</pre></td></tr><tr style="background: #f44"><td>relevance&nbsp;4</td><td><a href="javascript:expand(2)">../src/torrent.cpp:9647</a></td><td>this logic doesn't work for seeding torrents that are not ticked</td></tr><tr id="2" style="display: none;" colspan="3"><td colspan="3"><h2>this logic doesn't work for seeding torrents that are not ticked</h2><h4>../src/torrent.cpp:9647</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><tr style="background: #f44"><td>relevance&nbsp;4</td><td><a href="javascript:expand(2)">../src/torrent.cpp:9624</a></td><td>this logic doesn't work for seeding torrents that are not ticked</td></tr><tr id="2" style="display: none;" colspan="3"><td colspan="3"><h2>this logic doesn't work for seeding torrents that are not ticked</h2><h4>../src/torrent.cpp:9624</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
i = m_connections.begin() + idx;
--idx;
}
@ -380,8 +380,8 @@ bool get_item_cb(dht::item&amp; i)
m_threads.resize(m_num_threads);
}
}
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(7)">../src/peer_connection.cpp:1796</a></td><td>we should probably use ses.m_allowed_upload_slots here instead to work with auto-unchoke logic</td></tr><tr id="7" style="display: none;" colspan="3"><td colspan="3"><h2>we should probably use ses.m_allowed_upload_slots here instead
to work with auto-unchoke logic</h2><h4>../src/peer_connection.cpp:1796</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(7)">../src/peer_connection.cpp:1850</a></td><td>we should probably use ses.m_allowed_upload_slots here instead to work with auto-unchoke logic</td></tr><tr id="7" style="display: none;" colspan="3"><td colspan="3"><h2>we should probably use ses.m_allowed_upload_slots here instead
to work with auto-unchoke logic</h2><h4>../src/peer_connection.cpp:1850</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
write_unchoke();
return;
}
@ -432,11 +432,11 @@ to work with auto-unchoke logic</h2><h4>../src/peer_connection.cpp:1796</h4><pre
// -----------------------------
// ------ NOT INTERESTED -------
// -----------------------------
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(8)">../src/peer_connection.cpp:3133</a></td><td>since we throw away the queue entry once we issue the disk job, this may happen. Instead, we should keep the queue entry around, mark it as having been requested from disk and once the disk job comes back, discard it if it has been cancelled. Maybe even be able to cancel disk jobs?</td></tr><tr id="8" style="display: none;" colspan="3"><td colspan="3"><h2>since we throw away the queue entry once we issue
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(8)">../src/peer_connection.cpp:3187</a></td><td>since we throw away the queue entry once we issue the disk job, this may happen. Instead, we should keep the queue entry around, mark it as having been requested from disk and once the disk job comes back, discard it if it has been cancelled. Maybe even be able to cancel disk jobs?</td></tr><tr id="8" style="display: none;" colspan="3"><td colspan="3"><h2>since we throw away the queue entry once we issue
the disk job, this may happen. Instead, we should keep the
queue entry around, mark it as having been requested from
disk and once the disk job comes back, discard it if it has
been cancelled. Maybe even be able to cancel disk jobs?</h2><h4>../src/peer_connection.cpp:3133</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
been cancelled. Maybe even be able to cancel disk jobs?</h2><h4>../src/peer_connection.cpp:3187</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
std::vector&lt;peer_request&gt;::iterator i
= std::find(m_requests.begin(), m_requests.end(), r);
@ -487,9 +487,9 @@ been cancelled. Maybe even be able to cancel disk jobs?</h2><h4>../src/peer_conn
void peer_connection::incoming_have_all()
{
TORRENT_ASSERT(is_single_thread());
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(9)">../src/peer_connection.cpp:4867</a></td><td>instead of using settings_pack::request_timeout, use m_rtt.mean() + m_rtt.avg_deviation() * 2 or something like that. the configuration option could hopefully be removed</td></tr><tr id="9" style="display: none;" colspan="3"><td colspan="3"><h2>instead of using settings_pack::request_timeout, use
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(9)">../src/peer_connection.cpp:4917</a></td><td>instead of using settings_pack::request_timeout, use m_rtt.mean() + m_rtt.avg_deviation() * 2 or something like that. the configuration option could hopefully be removed</td></tr><tr id="9" style="display: none;" colspan="3"><td colspan="3"><h2>instead of using settings_pack::request_timeout, use
m_rtt.mean() + m_rtt.avg_deviation() * 2 or something like that.
the configuration option could hopefully be removed</h2><h4>../src/peer_connection.cpp:4867</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // don't bother disconnect peers we haven't been interested
the configuration option could hopefully be removed</h2><h4>../src/peer_connection.cpp:4917</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // don't bother disconnect peers we haven't been interested
// in (and that hasn't been interested in us) for a while
// unless we have used up all our connection slots
if (may_timeout
@ -646,9 +646,9 @@ namespace libtorrent
}
h(ec, ce.addresses);
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(12)">../src/session_impl.cpp:5535</a></td><td>it would be really nice to update these counters as they are incremented. This depends on the session being ticked, which has a fairly coarse grained resolution</td></tr><tr id="12" style="display: none;" colspan="3"><td colspan="3"><h2>it would be really nice to update these counters
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(12)">../src/session_impl.cpp:5439</a></td><td>it would be really nice to update these counters as they are incremented. This depends on the session being ticked, which has a fairly coarse grained resolution</td></tr><tr id="12" style="display: none;" colspan="3"><td colspan="3"><h2>it would be really nice to update these counters
as they are incremented. This depends on the session
being ticked, which has a fairly coarse grained resolution</h2><h4>../src/session_impl.cpp:5535</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;status(&amp;alert-&gt;status.back(), ~torrent_handle::query_accurate_download_counters);
being ticked, which has a fairly coarse grained resolution</h2><h4>../src/session_impl.cpp:5439</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;status(&amp;alert-&gt;status.back(), ~torrent_handle::query_accurate_download_counters);
t-&gt;clear_in_state_update();
}
state_updates.clear();
@ -699,8 +699,8 @@ being ticked, which has a fairly coarse grained resolution</h2><h4>../src/sessio
for (int i = 0; i &lt; counters::num_counters; ++i)
values[i] = m_stats_counters[i];
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(13)">../src/session_impl.cpp:7002</a></td><td>If socket jobs could be higher level, to include RC4 encryption and decryption, we would offload the main thread even more</td></tr><tr id="13" style="display: none;" colspan="3"><td colspan="3"><h2>If socket jobs could be higher level, to include RC4 encryption and decryption,
we would offload the main thread even more</h2><h4>../src/session_impl.cpp:7002</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(13)">../src/session_impl.cpp:6892</a></td><td>If socket jobs could be higher level, to include RC4 encryption and decryption, we would offload the main thread even more</td></tr><tr id="13" style="display: none;" colspan="3"><td colspan="3"><h2>If socket jobs could be higher level, to include RC4 encryption and decryption,
we would offload the main thread even more</h2><h4>../src/session_impl.cpp:6892</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
int num_threads = m_settings.get_int(settings_pack::network_threads);
int num_pools = num_threads &gt; 0 ? num_threads : 1;
while (num_pools &gt; m_net_thread_pool.size())
@ -802,7 +802,7 @@ we would offload the main thread even more</h2><h4>../src/session_impl.cpp:7002<
alerts().post_alert(file_error_alert(j-&gt;error.ec
, resolve_filename(j-&gt;error.file), j-&gt;error.operation_str(), get_handle()));
if (c) c-&gt;disconnect(errors::no_memory, peer_connection_interface::op_file);
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(15)">../src/torrent.cpp:7686</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="15" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it</h2><h4>../src/torrent.cpp:7686</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#if defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(15)">../src/torrent.cpp:7662</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="15" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it</h2><h4>../src/torrent.cpp:7662</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#if defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
debug_log("incoming peer (%d)", int(m_connections.size()));
#endif
@ -1324,7 +1324,7 @@ should not include internal state.</h2><h4>../include/libtorrent/torrent_info.hp
// issue a single write operation instead of using a vector
// operation
int buf_size = 0;
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(26)">../src/session_impl.cpp:2422</a></td><td>use bind_to_device in udp_socket</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>use bind_to_device in udp_socket</h2><h4>../src/session_impl.cpp:2422</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_listen_sockets.empty() &amp;&amp; ec)
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(26)">../src/session_impl.cpp:2337</a></td><td>use bind_to_device in udp_socket</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>use bind_to_device in udp_socket</h2><h4>../src/session_impl.cpp:2337</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_listen_sockets.empty() &amp;&amp; ec)
{
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
char msg[200];
@ -1375,8 +1375,8 @@ should not include internal state.</h2><h4>../include/libtorrent/torrent_info.hp
}
if (m_settings.get_int(settings_pack::peer_tos) != 0) {
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(27)">../src/session_impl.cpp:4435</a></td><td>make a list for torrents that want to be announced on the DHT so we don't have to loop over all torrents, just to find the ones that want to announce</td></tr><tr id="27" style="display: none;" colspan="3"><td colspan="3"><h2>make a list for torrents that want to be announced on the DHT so we
don't have to loop over all torrents, just to find the ones that want to announce</h2><h4>../src/session_impl.cpp:4435</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (!m_dht_torrents.empty())
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(27)">../src/session_impl.cpp:4347</a></td><td>make a list for torrents that want to be announced on the DHT so we don't have to loop over all torrents, just to find the ones that want to announce</td></tr><tr id="27" style="display: none;" colspan="3"><td colspan="3"><h2>make a list for torrents that want to be announced on the DHT so we
don't have to loop over all torrents, just to find the ones that want to announce</h2><h4>../src/session_impl.cpp:4347</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (!m_dht_torrents.empty())
{
boost::shared_ptr&lt;torrent&gt; t;
do
@ -1478,8 +1478,8 @@ don't have to loop over all torrents, just to find the ones that want to announc
TORRENT_ASSERT(piece &gt;= 0);
TORRENT_ASSERT(m_verified.get_bit(piece) == false);
++m_num_verified;
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(29)">../src/torrent.cpp:4693</a></td><td>abort lookups this torrent has made via the session host resolver interface</td></tr><tr id="29" style="display: none;" colspan="3"><td colspan="3"><h2>abort lookups this torrent has made via the
session host resolver interface</h2><h4>../src/torrent.cpp:4693</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // files belonging to the torrents
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(29)">../src/torrent.cpp:4692</a></td><td>abort lookups this torrent has made via the session host resolver interface</td></tr><tr id="29" style="display: none;" colspan="3"><td colspan="3"><h2>abort lookups this torrent has made via the
session host resolver interface</h2><h4>../src/torrent.cpp:4692</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // files belonging to the torrents
disconnect_all(errors::torrent_aborted, peer_connection_interface::op_bittorrent);
// post a message to the main thread to destruct
@ -1552,7 +1552,6 @@ namespace libtorrent
<div style="background: #ffff00" width="100%"> udp_tracker_connection::udp_tracker_connection(
</div> io_service&amp; ios
, connection_queue&amp; cc
, tracker_manager&amp; man
, tracker_request const&amp; req
, boost::weak_ptr&lt;request_callback&gt; c
@ -1581,6 +1580,7 @@ namespace libtorrent
if (port == -1) port = protocol == "http" ? 80 : 443;
if (ec)
{
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(31)">../src/web_peer_connection.cpp:655</a></td><td>create a mapping of file-index to redirection URLs. Use that to form URLs instead. Support to reconnect to a new server without destructing this peer_connection</td></tr><tr id="31" style="display: none;" colspan="3"><td colspan="3"><h2>create a mapping of file-index to redirection URLs. Use that to form
URLs instead. Support to reconnect to a new server without destructing this
peer_connection</h2><h4>../src/web_peer_connection.cpp:655</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> == dl_target);
@ -1634,7 +1634,7 @@ peer_connection</h2><h4>../src/web_peer_connection.cpp:655</h4><pre style="backg
#endif
t-&gt;add_web_seed(location, web_seed_entry::url_seed, m_external_auth, m_extra_headers);
t-&gt;remove_web_seed(this, errors::redirecting, op_bittorrent, 2);
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(32)">../src/kademlia/dos_blocker.cpp:68</a></td><td>make these limits configurable</td></tr><tr id="32" style="display: none;" colspan="3"><td colspan="3"><h2>make these limits configurable</h2><h4>../src/kademlia/dos_blocker.cpp:68</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> bool dos_blocker::incoming(address addr, ptime now)
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(32)">../src/kademlia/dos_blocker.cpp:75</a></td><td>make these limits configurable</td></tr><tr id="32" style="display: none;" colspan="3"><td colspan="3"><h2>make these limits configurable</h2><h4>../src/kademlia/dos_blocker.cpp:75</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> bool dos_blocker::incoming(address addr, ptime now)
{
node_ban_entry* match = 0;
node_ban_entry* min = m_ban_nodes;
@ -2072,8 +2072,8 @@ specifically to turn some std::string and std::vector into pointers</h2><h4>../i
#ifndef BOOST_NO_EXCEPTIONS
torrent_info(lazy_entry const&amp; torrent_file, int flags = 0);
torrent_info(char const* buffer, int size, int flags = 0);
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(43)">../include/libtorrent/aux_/session_interface.hpp:108</a></td><td>the IP voting mechanism should be factored out to its own class, not part of the session</td></tr><tr id="43" style="display: none;" colspan="3"><td colspan="3"><h2>the IP voting mechanism should be factored out
to its own class, not part of the session</h2><h4>../include/libtorrent/aux_/session_interface.hpp:108</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> class port_filter;
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(43)">../include/libtorrent/aux_/session_interface.hpp:107</a></td><td>the IP voting mechanism should be factored out to its own class, not part of the session</td></tr><tr id="43" style="display: none;" colspan="3"><td colspan="3"><h2>the IP voting mechanism should be factored out
to its own class, not part of the session</h2><h4>../include/libtorrent/aux_/session_interface.hpp:107</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> class port_filter;
struct settings_pack;
struct torrent_peer_allocator_interface;
struct counters;
@ -2176,8 +2176,8 @@ the chunk headers should be subtracted from the receive_buffer_size</h2><h4>../s
std::string request;
request.reserve(400);
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(45)">../src/session_impl.cpp:6353</a></td><td>report the proper address of the router as the source IP of this understanding of our external address, instead of the empty address</td></tr><tr id="45" style="display: none;" colspan="3"><td colspan="3"><h2>report the proper address of the router as the source IP of
this understanding of our external address, instead of the empty address</h2><h4>../src/session_impl.cpp:6353</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const&amp; ip, int port
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(45)">../src/session_impl.cpp:6257</a></td><td>report the proper address of the router as the source IP of this understanding of our external address, instead of the empty address</td></tr><tr id="45" style="display: none;" colspan="3"><td colspan="3"><h2>report the proper address of the router as the source IP of
this understanding of our external address, instead of the empty address</h2><h4>../src/session_impl.cpp:6257</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const&amp; ip, int port
, error_code const&amp; ec, int map_transport)
{
TORRENT_ASSERT(is_single_thread());
@ -2228,9 +2228,9 @@ this understanding of our external address, instead of the empty address</h2><h4
{
// INVARIANT_CHECK;
TORRENT_ASSERT(is_single_thread());
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(46)">../src/session_impl.cpp:7514</a></td><td>we only need to do this if our global IPv4 address has changed since the DHT (currently) only supports IPv4. Since restarting the DHT is kind of expensive, it would be nice to not do it unnecessarily</td></tr><tr id="46" style="display: none;" colspan="3"><td colspan="3"><h2>we only need to do this if our global IPv4 address has changed
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(46)">../src/session_impl.cpp:7396</a></td><td>we only need to do this if our global IPv4 address has changed since the DHT (currently) only supports IPv4. Since restarting the DHT is kind of expensive, it would be nice to not do it unnecessarily</td></tr><tr id="46" style="display: none;" colspan="3"><td colspan="3"><h2>we only need to do this if our global IPv4 address has changed
since the DHT (currently) only supports IPv4. Since restarting the DHT
is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src/session_impl.cpp:7514</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src/session_impl.cpp:7396</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
if (!m_external_ip.cast_vote(ip, source_type, source)) return;
@ -2336,8 +2336,8 @@ up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1143</h4
p-&gt;send_block_requests();
}
}
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(48)">../src/torrent.cpp:6845</a></td><td>save the send_stats state instead of throwing them away it may pose an issue when downgrading though</td></tr><tr id="48" style="display: none;" colspan="3"><td colspan="3"><h2>save the send_stats state instead of throwing them away
it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:6845</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (int k = 0; k &lt; bits; ++k)
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(48)">../src/torrent.cpp:6839</a></td><td>save the send_stats state instead of throwing them away it may pose an issue when downgrading though</td></tr><tr id="48" style="display: none;" colspan="3"><td colspan="3"><h2>save the send_stats state instead of throwing them away
it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:6839</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (int k = 0; k &lt; bits; ++k)
v |= (i-&gt;info[j*8+k].state == piece_picker::block_info::state_finished)
? (1 &lt;&lt; k) : 0;
bitmask.append(1, v);
@ -2388,9 +2388,9 @@ it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:6845</h4
// write have bitmask
// the pieces string has one byte per piece. Each
// byte is a bitmask representing different properties
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(49)">../src/torrent.cpp:7934</a></td><td>should disconnect all peers that have the pieces we have not just seeds. It would be pretty expensive to check all pieces for all peers though</td></tr><tr id="49" style="display: none;" colspan="3"><td colspan="3"><h2>should disconnect all peers that have the pieces we have
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(49)">../src/torrent.cpp:7910</a></td><td>should disconnect all peers that have the pieces we have not just seeds. It would be pretty expensive to check all pieces for all peers though</td></tr><tr id="49" style="display: none;" colspan="3"><td colspan="3"><h2>should disconnect all peers that have the pieces we have
not just seeds. It would be pretty expensive to check all pieces
for all peers though</h2><h4>../src/torrent.cpp:7934</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> set_state(torrent_status::finished);
for all peers though</h2><h4>../src/torrent.cpp:7910</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> set_state(torrent_status::finished);
set_queue_position(-1);
m_became_finished = m_ses.session_time();
@ -2441,7 +2441,7 @@ for all peers though</h2><h4>../src/torrent.cpp:7934</h4><pre style="background:
, boost::bind(&amp;torrent::on_cache_flushed, shared_from_this(), _1));
// this torrent just completed downloads, which means it will fall
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(50)">../src/kademlia/node.cpp:835</a></td><td>find_node should write directly to the response entry</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>find_node should write directly to the response entry</h2><h4>../src/kademlia/node.cpp:835</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_LOG(node) &lt;&lt; " values: " &lt;&lt; reply["values"].list().size();
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(50)">../src/kademlia/node.cpp:813</a></td><td>find_node should write directly to the response entry</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>find_node should write directly to the response entry</h2><h4>../src/kademlia/node.cpp:813</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_LOG(node) &lt;&lt; " values: " &lt;&lt; reply["values"].list().size();
}
#endif
}
@ -3001,7 +3001,9 @@ int test_main()
lt::session* s = new lt::session(fingerprint("LT", 0, 1, 0, 0), std::make_pair(48875, 49800), "0.0.0.0", 0, alert_mask);
settings_pack pack;
#ifndef TORRENT_NO_DEPRECATE
pack.set_int(settings_pack::half_open_limit, 1);
#endif
pack.set_bool(settings_pack::announce_to_all_trackers, true);
pack.set_bool(settings_pack::announce_to_all_tiers, true);
s-&gt;apply_settings(pack);
@ -3017,9 +3019,7 @@ int test_main()
snprintf(tracker_url, sizeof(tracker_url), "http://127.0.0.1:%d/announce", http_port);
t-&gt;add_tracker(tracker_url, 0);
snprintf(tracker_url, sizeof(tracker_url), "udp://127.0.0.1:%d/announce", udp_port);
t-&gt;add_tracker(tracker_url, 1);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(96)">../test/test_upnp.cpp:101</a></td><td>store the log and verify that some key messages are there</td></tr><tr id="96" style="display: none;" colspan="3"><td colspan="3"><h2>store the log and verify that some key messages are there</h2><h4>../test/test_upnp.cpp:101</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> "USN:uuid:000f-66d6-7296000099dc::upnp:rootdevice\r\n"
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(96)">../test/test_upnp.cpp:100</a></td><td>store the log and verify that some key messages are there</td></tr><tr id="96" style="display: none;" colspan="3"><td colspan="3"><h2>store the log and verify that some key messages are there</h2><h4>../test/test_upnp.cpp:100</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> "USN:uuid:000f-66d6-7296000099dc::upnp:rootdevice\r\n"
"Location: http://127.0.0.1:%d/upnp.xml\r\n"
"Server: Custom/1.0 UPnP/1.0 Proc/Ver\r\n"
"EXT:\r\n"
@ -3277,7 +3277,7 @@ bool block_cache::maybe_free_piece(cached_piece_entry* pe)
boost::shared_ptr&lt;piece_manager&gt; s = pe-&gt;storage;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(101)">../src/bt_peer_connection.cpp:646</a></td><td>this could be optimized using knuth morris pratt</td></tr><tr id="101" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>../src/bt_peer_connection.cpp:646</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(101)">../src/bt_peer_connection.cpp:645</a></td><td>this could be optimized using knuth morris pratt</td></tr><tr id="101" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>../src/bt_peer_connection.cpp:645</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
disconnect(errors::no_memory, op_encryption);
return;
}
@ -3328,7 +3328,7 @@ bool block_cache::maybe_free_piece(cached_piece_entry* pe)
// }
// no complete sync
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(102)">../src/bt_peer_connection.cpp:2210</a></td><td>if we're finished, send upload_only message</td></tr><tr id="102" style="display: none;" colspan="3"><td colspan="3"><h2>if we're finished, send upload_only message</h2><h4>../src/bt_peer_connection.cpp:2210</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (msg[5 + k / 8] &amp; (0x80 &gt;&gt; (k % 8))) bitfield_string[k] = '1';
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(102)">../src/bt_peer_connection.cpp:2209</a></td><td>if we're finished, send upload_only message</td></tr><tr id="102" style="display: none;" colspan="3"><td colspan="3"><h2>if we're finished, send upload_only message</h2><h4>../src/bt_peer_connection.cpp:2209</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (msg[5 + k / 8] &amp; (0x80 &gt;&gt; (k % 8))) bitfield_string[k] = '1';
else bitfield_string[k] = '0';
}
peer_log("==&gt; BITFIELD [ %s ]", bitfield_string.c_str());
@ -3818,7 +3818,8 @@ turn through this loop</h2><h4>../src/disk_io_thread.cpp:2692</h4><pre style="ba
if (ret &lt; 0)
{
l.lock();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(112)">../src/http_tracker_connection.cpp:96</a></td><td>support authentication (i.e. user name and password) in the URL</td></tr><tr id="112" style="display: none;" colspan="3"><td colspan="3"><h2>support authentication (i.e. user name and password) in the URL</h2><h4>../src/http_tracker_connection.cpp:96</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , tracker_request const&amp; req
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(112)">../src/http_tracker_connection.cpp:94</a></td><td>support authentication (i.e. user name and password) in the URL</td></tr><tr id="112" style="display: none;" colspan="3"><td colspan="3"><h2>support authentication (i.e. user name and password) in the URL</h2><h4>../src/http_tracker_connection.cpp:94</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , tracker_manager&amp; man
, tracker_request const&amp; req
, boost::weak_ptr&lt;request_callback&gt; c
, aux::session_impl&amp; ses
, std::string const&amp; auth
@ -3829,7 +3830,6 @@ turn through this loop</h2><h4>../src/disk_io_thread.cpp:2692</h4><pre style="ba
: tracker_connection(man, req, ios, c)
, m_man(man)
, m_ses(ses)
, m_cc(cc)
, m_ios(ios)
#if TORRENT_USE_I2P
, m_i2p_conn(i2p_conn)
@ -4078,7 +4078,7 @@ and flushing it, update the slot entries as we go</h2><h4>../src/part_file.cpp:3
for (int piece = 0; piece &lt; m_max_pieces; ++piece)
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(117)">../src/peer_connection.cpp:1140</a></td><td>this should be the global download rate</td></tr><tr id="117" style="display: none;" colspan="3"><td colspan="3"><h2>this should be the global download rate</h2><h4>../src/peer_connection.cpp:1140</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(117)">../src/peer_connection.cpp:1194</a></td><td>this should be the global download rate</td></tr><tr id="117" style="display: none;" colspan="3"><td colspan="3"><h2>this should be the global download rate</h2><h4>../src/peer_connection.cpp:1194</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
int rate = 0;
// if we haven't received any data recently, the current download rate
@ -4129,7 +4129,7 @@ and flushing it, update the slot entries as we go</h2><h4>../src/part_file.cpp:3
if (m_ignore_stats) return;
boost::shared_ptr&lt;torrent&gt; t = m_torrent.lock();
if (!t) return;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(118)">../src/peer_connection.cpp:3373</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="118" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:3373</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(118)">../src/peer_connection.cpp:3427</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="118" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:3427</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// if the peer has the piece and we want
// to download it, request it
if (int(m_have_piece.size()) &gt; index
@ -4232,8 +4232,8 @@ the !downloading condition doesn't make much sense</h2><h4>../src/piece_picker.c
// the second bool is true if this is the only active peer that is requesting
// and downloading blocks from this piece. Active means having a connection.
boost::tuple&lt;bool, bool&gt; requested_from(piece_picker::downloading_piece const&amp; p
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(120)">../src/session_impl.cpp:673</a></td><td>there's no rule here to make uTP connections not have the global or local rate limits apply to it. This used to be the default.</td></tr><tr id="120" style="display: none;" colspan="3"><td colspan="3"><h2>there's no rule here to make uTP connections not have the global or
local rate limits apply to it. This used to be the default.</h2><h4>../src/session_impl.cpp:673</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_global_class = m_classes.new_peer_class("global");
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(120)">../src/session_impl.cpp:603</a></td><td>there's no rule here to make uTP connections not have the global or local rate limits apply to it. This used to be the default.</td></tr><tr id="120" style="display: none;" colspan="3"><td colspan="3"><h2>there's no rule here to make uTP connections not have the global or
local rate limits apply to it. This used to be the default.</h2><h4>../src/session_impl.cpp:603</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_global_class = m_classes.new_peer_class("global");
m_tcp_peer_class = m_classes.new_peer_class("tcp");
m_local_peer_class = m_classes.new_peer_class("local");
// local peers are always unchoked
@ -4284,9 +4284,9 @@ local rate limits apply to it. This used to be the default.</h2><h4>../src/sessi
get_thread_cpu_usage(&amp;m_network_thread_cpu_usage);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(121)">../src/session_impl.cpp:2238</a></td><td>instead of having a special case for this, just make the default listen interfaces be "0.0.0.0:6881,[::1]:6881" and use the generic path. That would even allow for not listening at all.</td></tr><tr id="121" style="display: none;" colspan="3"><td colspan="3"><h2>instead of having a special case for this, just make the
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(121)">../src/session_impl.cpp:2153</a></td><td>instead of having a special case for this, just make the default listen interfaces be "0.0.0.0:6881,[::1]:6881" and use the generic path. That would even allow for not listening at all.</td></tr><tr id="121" style="display: none;" colspan="3"><td colspan="3"><h2>instead of having a special case for this, just make the
default listen interfaces be "0.0.0.0:6881,[::1]:6881" and use
the generic path. That would even allow for not listening at all.</h2><h4>../src/session_impl.cpp:2238</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
the generic path. That would even allow for not listening at all.</h2><h4>../src/session_impl.cpp:2153</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// reset the retry counter
m_listen_port_retries = m_settings.get_int(settings_pack::max_retry_port_bind);
@ -4337,7 +4337,7 @@ retry:
if (s.sock)
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(122)">../src/session_impl.cpp:3083</a></td><td>should this function take a shared_ptr instead?</td></tr><tr id="122" style="display: none;" colspan="3"><td colspan="3"><h2>should this function take a shared_ptr instead?</h2><h4>../src/session_impl.cpp:3083</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(122)">../src/session_impl.cpp:2998</a></td><td>should this function take a shared_ptr instead?</td></tr><tr id="122" style="display: none;" colspan="3"><td colspan="3"><h2>should this function take a shared_ptr instead?</h2><h4>../src/session_impl.cpp:2998</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
#if defined TORRENT_ASIO_DEBUGGING
complete_async("session_impl::on_socks_accept");
#endif
@ -4358,13 +4358,11 @@ retry:
// currently expected to be scheduled for a connection
// with the connection queue, and should be cancelled
<div style="background: #ffff00" width="100%"> void session_impl::close_connection(peer_connection* p
</div> , error_code const&amp; ec, bool cancel_with_cq)
</div> , error_code const&amp; ec)
{
TORRENT_ASSERT(is_single_thread());
boost::shared_ptr&lt;peer_connection&gt; sp(p-&gt;self());
if (cancel_with_cq) m_half_open.cancel(p);
// someone else is holding a reference, it's important that
// it's destructed from the network thread. Make sure the
// last reference is held by the network thread.
@ -4388,7 +4386,9 @@ retry:
TORRENT_ASSERT(p-&gt;is_disconnecting());
TORRENT_ASSERT(sp.use_count() &gt; 0);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(123)">../src/session_impl.cpp:3439</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="123" style="display: none;" colspan="3"><td colspan="3"><h2>have a separate list for these connections, instead of having to loop through all of them</h2><h4>../src/session_impl.cpp:3439</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_auto_manage_time_scaler &lt; 0)
connection_map::iterator i = m_connections.find(sp);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(123)">../src/session_impl.cpp:3352</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="123" style="display: none;" colspan="3"><td colspan="3"><h2>have a separate list for these connections, instead of having to loop through all of them</h2><h4>../src/session_impl.cpp:3352</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_auto_manage_time_scaler &lt; 0)
{
INVARIANT_CHECK;
m_auto_manage_time_scaler = settings().get_int(settings_pack::auto_manage_interval);
@ -4439,7 +4439,7 @@ retry:
#ifndef TORRENT_DISABLE_DHT
if (m_dht)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(124)">../src/session_impl.cpp:3480</a></td><td>this should apply to all bandwidth channels</td></tr><tr id="124" style="display: none;" colspan="3"><td colspan="3"><h2>this should apply to all bandwidth channels</h2><h4>../src/session_impl.cpp:3480</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t.second_tick(tick_interval_ms, m_tick_residual / 1000);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(124)">../src/session_impl.cpp:3393</a></td><td>this should apply to all bandwidth channels</td></tr><tr id="124" style="display: none;" colspan="3"><td colspan="3"><h2>this should apply to all bandwidth channels</h2><h4>../src/session_impl.cpp:3393</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t.second_tick(tick_interval_ms, m_tick_residual / 1000);
// if the call to second_tick caused the torrent
// to no longer want to be ticked (i.e. it was
@ -4490,7 +4490,7 @@ retry:
&amp;&amp; m_stat.upload_ip_overhead() &gt;= up_limit
&amp;&amp; m_alerts.should_post&lt;performance_alert&gt;())
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(125)">../src/session_impl.cpp:4543</a></td><td>these vectors could be copied from m_torrent_lists, if we would maintain them. That way the first pass over all torrents could be avoided. It would be especially efficient if most torrents are not auto-managed whenever we receive a scrape response (or anything that may change the rank of a torrent) that one torrent could re-sort itself in a list that's kept sorted at all times. That way, this pass over all torrents could be avoided alltogether.</td></tr><tr id="125" style="display: none;" colspan="3"><td colspan="3"><h2>these vectors could be copied from m_torrent_lists,
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(125)">../src/session_impl.cpp:4455</a></td><td>these vectors could be copied from m_torrent_lists, if we would maintain them. That way the first pass over all torrents could be avoided. It would be especially efficient if most torrents are not auto-managed whenever we receive a scrape response (or anything that may change the rank of a torrent) that one torrent could re-sort itself in a list that's kept sorted at all times. That way, this pass over all torrents could be avoided alltogether.</td></tr><tr id="125" style="display: none;" colspan="3"><td colspan="3"><h2>these vectors could be copied from m_torrent_lists,
if we would maintain them. That way the first pass over
all torrents could be avoided. It would be especially
efficient if most torrents are not auto-managed
@ -4498,7 +4498,7 @@ whenever we receive a scrape response (or anything
that may change the rank of a torrent) that one torrent
could re-sort itself in a list that's kept sorted at all
times. That way, this pass over all torrents could be
avoided alltogether.</h2><h4>../src/session_impl.cpp:4543</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
avoided alltogether.</h2><h4>../src/session_impl.cpp:4455</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
if (t-&gt;allows_peers())
t-&gt;log_to_all_peers("AUTO MANAGER PAUSING TORRENT");
#endif
@ -4549,7 +4549,7 @@ avoided alltogether.</h2><h4>../src/session_impl.cpp:4543</h4><pre style="backgr
for (torrent_map::iterator i = m_torrents.begin()
, end(m_torrents.end()); i != end; ++i)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(126)">../src/session_impl.cpp:4618</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="126" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4618</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (t-&gt;is_finished())
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(126)">../src/session_impl.cpp:4530</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="126" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4530</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (t-&gt;is_finished())
seeds.push_back(t);
else
downloaders.push_back(t);
@ -4600,10 +4600,10 @@ avoided alltogether.</h2><h4>../src/session_impl.cpp:4543</h4><pre style="backgr
, hard_limit, num_downloaders);
auto_manage_torrents(seeds, checking_limit, dht_limit, tracker_limit, lsd_limit
, hard_limit, num_seeds);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(127)">../src/session_impl.cpp:4796</a></td><td>use a lower limit than m_settings.connections_limit to allocate the to 10% or so of connection slots for incoming connections</td></tr><tr id="127" style="display: none;" colspan="3"><td colspan="3"><h2>use a lower limit than m_settings.connections_limit
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(127)">../src/session_impl.cpp:4702</a></td><td>use a lower limit than m_settings.connections_limit to allocate the to 10% or so of connection slots for incoming connections</td></tr><tr id="127" style="display: none;" colspan="3"><td colspan="3"><h2>use a lower limit than m_settings.connections_limit
to allocate the to 10% or so of connection slots for incoming
connections</h2><h4>../src/session_impl.cpp:4796</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // if we don't have any free slots, return
if (free_slots &lt;= -m_half_open.limit()) return;
connections</h2><h4>../src/session_impl.cpp:4702</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // robin fashion, so that every torrent is equally likely to connect to a
// peer
// boost connections are connections made by torrent connection
// boost, which are done immediately on a tracker response. These
@ -4622,8 +4622,8 @@ connections</h2><h4>../src/session_impl.cpp:4796</h4><pre style="background: #f6
}
}
<div style="background: #ffff00" width="100%"> int limit = (std::min)(m_settings.get_int(settings_pack::connections_limit)
</div> - num_connections(), free_slots);
<div style="background: #ffff00" width="100%"> int limit = m_settings.get_int(settings_pack::connections_limit)
</div> - num_connections();
// this logic is here to smooth out the number of new connection
// attempts over time, to prevent connecting a large number of
@ -4653,8 +4653,8 @@ connections</h2><h4>../src/session_impl.cpp:4796</h4><pre style="background: #f6
m_next_finished_connect_torrent = 0;
torrent* t = NULL;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(128)">../src/session_impl.cpp:4959</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><tr id="128" style="display: none;" colspan="3"><td colspan="3"><h2>post a message to have this happen
immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp:4959</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // we've unchoked this peer, and it hasn't reciprocated
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(128)">../src/session_impl.cpp:4863</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><tr id="128" style="display: none;" colspan="3"><td colspan="3"><h2>post a message to have this happen
immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp:4863</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // we've unchoked this peer, and it hasn't reciprocated
// we may want to increase our estimated reciprocation rate
p-&gt;increase_est_reciprocation_rate();
}
@ -4705,7 +4705,7 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
prev = i;
}
#endif
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(129)">../src/session_impl.cpp:4993</a></td><td>make configurable</td></tr><tr id="129" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4993</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(129)">../src/session_impl.cpp:4897</a></td><td>make configurable</td></tr><tr id="129" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4897</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
#ifdef TORRENT_DEBUG
for (std::vector&lt;peer_connection*&gt;::const_iterator i = peers.begin()
, end(peers.end()), prev(peers.end()); i != end; ++i)
@ -4738,7 +4738,7 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
++m_allowed_upload_slots;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(130)">../src/session_impl.cpp:5007</a></td><td>make configurable</td></tr><tr id="130" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:5007</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> &gt;= (*i)-&gt;uploaded_in_last_round() * 1000
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(130)">../src/session_impl.cpp:4911</a></td><td>make configurable</td></tr><tr id="130" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4911</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> &gt;= (*i)-&gt;uploaded_in_last_round() * 1000
* (1 + t2-&gt;priority()) / total_milliseconds(unchoke_interval));
}
prev = i;
@ -4789,7 +4789,7 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
{
// if our current upload rate is less than 90% of our
// limit
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(131)">../src/session_impl.cpp:5086</a></td><td>this should be called for all peers!</td></tr><tr id="131" style="display: none;" colspan="3"><td colspan="3"><h2>this should be called for all peers!</h2><h4>../src/session_impl.cpp:5086</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // we don't know at what rate we can upload. If we have a
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(131)">../src/session_impl.cpp:4990</a></td><td>this should be called for all peers!</td></tr><tr id="131" style="display: none;" colspan="3"><td colspan="3"><h2>this should be called for all peers!</h2><h4>../src/session_impl.cpp:4990</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // we don't know at what rate we can upload. If we have a
// measurement of the peak, use that + 10kB/s, otherwise
// assume 20 kB/s
upload_capacity_left = (std::max)(20000, m_peak_up_rate + 10000);
@ -4840,10 +4840,10 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
--unchoke_set_size;
TORRENT_ASSERT(p-&gt;peer_info_struct());
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(132)">../src/session_impl.cpp:5501</a></td><td>it might be a nice feature here to limit the number of torrents to send in a single update. By just posting the first n torrents, they would nicely be round-robined because the torrent lists are always pushed back</td></tr><tr id="132" style="display: none;" colspan="3"><td colspan="3"><h2>it might be a nice feature here to limit the number of torrents
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(132)">../src/session_impl.cpp:5405</a></td><td>it might be a nice feature here to limit the number of torrents to send in a single update. By just posting the first n torrents, they would nicely be round-robined because the torrent lists are always pushed back</td></tr><tr id="132" style="display: none;" colspan="3"><td colspan="3"><h2>it might be a nice feature here to limit the number of torrents
to send in a single update. By just posting the first n torrents, they
would nicely be round-robined because the torrent lists are always
pushed back</h2><h4>../src/session_impl.cpp:5501</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;status(&amp;*i, flags);
pushed back</h2><h4>../src/session_impl.cpp:5405</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;status(&amp;*i, flags);
}
}
@ -5318,7 +5318,7 @@ dedicated listen port</h2><h4>../src/torrent.cpp:2708</h4><pre style="background
debug_log("DHT: no listen sockets");
if (m_torrent_file-&gt;is_valid() &amp;&amp; !m_files_checked)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(141)">../src/torrent.cpp:3483</a></td><td>add one peer per IP the hostname resolves to</td></tr><tr id="141" style="display: none;" colspan="3"><td colspan="3"><h2>add one peer per IP the hostname resolves to</h2><h4>../src/torrent.cpp:3483</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(141)">../src/torrent.cpp:3482</a></td><td>add one peer per IP the hostname resolves to</td></tr><tr id="141" style="display: none;" colspan="3"><td colspan="3"><h2>add one peer per IP the hostname resolves to</h2><h4>../src/torrent.cpp:3482</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
void torrent::on_peer_name_lookup(error_code const&amp; e
, std::vector&lt;address&gt; const&amp; host_list, int port)
@ -5369,7 +5369,7 @@ dedicated listen port</h2><h4>../src/torrent.cpp:2708</h4><pre style="background
size_type torrent::quantized_bytes_done() const
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(142)">../src/torrent.cpp:4474</a></td><td>update suggest_piece?</td></tr><tr id="142" style="display: none;" colspan="3"><td colspan="3"><h2>update suggest_piece?</h2><h4>../src/torrent.cpp:4474</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(142)">../src/torrent.cpp:4473</a></td><td>update suggest_piece?</td></tr><tr id="142" style="display: none;" colspan="3"><td colspan="3"><h2>update suggest_piece?</h2><h4>../src/torrent.cpp:4473</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
void torrent::peer_has_all(peer_connection const* peer)
{
if (has_picker())
@ -5420,8 +5420,8 @@ dedicated listen port</h2><h4>../src/torrent.cpp:2708</h4><pre style="background
// the suggest piece feature
if (!has_picker()) return;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(143)">../src/torrent.cpp:4617</a></td><td>really, we should just keep the picker around in this case to maintain the availability counters</td></tr><tr id="143" style="display: none;" colspan="3"><td colspan="3"><h2>really, we should just keep the picker around
in this case to maintain the availability counters</h2><h4>../src/torrent.cpp:4617</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.reserve(cs.pieces.size());
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(143)">../src/torrent.cpp:4616</a></td><td>really, we should just keep the picker around in this case to maintain the availability counters</td></tr><tr id="143" style="display: none;" colspan="3"><td colspan="3"><h2>really, we should just keep the picker around
in this case to maintain the availability counters</h2><h4>../src/torrent.cpp:4616</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.reserve(cs.pieces.size());
// sort in ascending order, to get most recently used first
std::sort(cs.pieces.begin(), cs.pieces.end()
@ -5472,12 +5472,12 @@ in this case to maintain the availability counters</h2><h4>../src/torrent.cpp:46
}
void torrent::abort()
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(144)">../src/torrent.cpp:6549</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info The mapped_files needs to be read both in the network thread and in the disk thread, since they both have their own mapped files structures which are kept in sync</td></tr><tr id="144" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(144)">../src/torrent.cpp:6543</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info The mapped_files needs to be read both in the network thread and in the disk thread, since they both have their own mapped files structures which are kept in sync</td></tr><tr id="144" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
renamed, but also if they have been merged into a single file for instance
maybe use the same format as .torrent files and reuse some code from torrent_info
The mapped_files needs to be read both in the network thread
and in the disk thread, since they both have their own mapped files structures
which are kept in sync</h2><h4>../src/torrent.cpp:6549</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> super_seeding(rd.dict_find_int_value("super_seeding", 0));
which are kept in sync</h2><h4>../src/torrent.cpp:6543</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> super_seeding(rd.dict_find_int_value("super_seeding", 0));
if (!m_use_resume_save_path)
{
@ -5528,12 +5528,12 @@ which are kept in sync</h2><h4>../src/torrent.cpp:6549</h4><pre style="backgroun
m_file_priority.resize(end_range + 1);
// initialize pad files to priority 0
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(145)">../src/torrent.cpp:6712</a></td><td>if this is a merkle torrent and we can't restore the tree, we need to wipe all the bits in the have array, but not necessarily we might want to do a full check to see if we have all the pieces. This is low priority since almost no one uses merkle torrents</td></tr><tr id="145" style="display: none;" colspan="3"><td colspan="3"><h2>if this is a merkle torrent and we can't
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(145)">../src/torrent.cpp:6706</a></td><td>if this is a merkle torrent and we can't restore the tree, we need to wipe all the bits in the have array, but not necessarily we might want to do a full check to see if we have all the pieces. This is low priority since almost no one uses merkle torrents</td></tr><tr id="145" style="display: none;" colspan="3"><td colspan="3"><h2>if this is a merkle torrent and we can't
restore the tree, we need to wipe all the
bits in the have array, but not necessarily
we might want to do a full check to see if we have
all the pieces. This is low priority since almost
no one uses merkle torrents</h2><h4>../src/torrent.cpp:6712</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
no one uses merkle torrents</h2><h4>../src/torrent.cpp:6706</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
}
}
@ -5584,9 +5584,9 @@ no one uses merkle torrents</h2><h4>../src/torrent.cpp:6712</h4><pre style="back
ret["active_time"] = active_time();
ret["finished_time"] = finished_time();
ret["seeding_time"] = seeding_time();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(146)">../src/torrent.cpp:6902</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance. using file_base</td></tr><tr id="146" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(146)">../src/torrent.cpp:6896</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance. using file_base</td></tr><tr id="146" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
renamed, but also if they have been merged into a single file for instance.
using file_base</h2><h4>../src/torrent.cpp:6902</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.resize(m_torrent_file-&gt;num_pieces());
using file_base</h2><h4>../src/torrent.cpp:6896</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.resize(m_torrent_file-&gt;num_pieces());
if (!has_picker())
{
std::memset(&amp;pieces[0], m_have_all, pieces.size());
@ -5637,9 +5637,9 @@ using file_base</h2><h4>../src/torrent.cpp:6902</h4><pre style="background: #f6f
, end(m_policy-&gt;end_peer()); i != end; ++i)
{
error_code ec;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(147)">../src/torrent.cpp:8888</a></td><td>add a flag to ignore stats, and only care about resume data for content. For unchanged files, don't trigger a load of the metadata just to save an empty resume data file</td></tr><tr id="147" style="display: none;" colspan="3"><td colspan="3"><h2>add a flag to ignore stats, and only care about resume data for
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(147)">../src/torrent.cpp:8864</a></td><td>add a flag to ignore stats, and only care about resume data for content. For unchanged files, don't trigger a load of the metadata just to save an empty resume data file</td></tr><tr id="147" style="display: none;" colspan="3"><td colspan="3"><h2>add a flag to ignore stats, and only care about resume data for
content. For unchanged files, don't trigger a load of the metadata
just to save an empty resume data file</h2><h4>../src/torrent.cpp:8888</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_complete != 0xffffff) seeds = m_complete;
just to save an empty resume data file</h2><h4>../src/torrent.cpp:8864</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_complete != 0xffffff) seeds = m_complete;
else seeds = m_policy ? m_policy-&gt;num_seeds() : 0;
if (m_incomplete != 0xffffff) downloaders = m_incomplete;
@ -5690,10 +5690,10 @@ just to save an empty resume data file</h2><h4>../src/torrent.cpp:8888</h4><pre
m_save_resume_flags = boost::uint8_t(flags);
state_updated();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(148)">../src/torrent.cpp:9855</a></td><td>go through the pieces we have and count the total number of downloaders we have. Only count peers that are interested in us since some peers might not send have messages for pieces we have it num_interested == 0, we need to pick a new piece</td></tr><tr id="148" style="display: none;" colspan="3"><td colspan="3"><h2>go through the pieces we have and count the total number
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(148)">../src/torrent.cpp:9832</a></td><td>go through the pieces we have and count the total number of downloaders we have. Only count peers that are interested in us since some peers might not send have messages for pieces we have it num_interested == 0, we need to pick a new piece</td></tr><tr id="148" style="display: none;" colspan="3"><td colspan="3"><h2>go through the pieces we have and count the total number
of downloaders we have. Only count peers that are interested in us
since some peers might not send have messages for pieces we have
it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:9855</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:9832</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
rarest_pieces.clear();
rarest_rarity = pp.peer_count;
@ -5744,8 +5744,8 @@ it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:9
if (num_cache_pieces &gt; m_torrent_file-&gt;num_pieces())
num_cache_pieces = m_torrent_file-&gt;num_pieces();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(149)">../src/torrent.cpp:10501</a></td><td>instead of resorting the whole list, insert the peers directly into the right place</td></tr><tr id="149" style="display: none;" colspan="3"><td colspan="3"><h2>instead of resorting the whole list, insert the peers
directly into the right place</h2><h4>../src/torrent.cpp:10501</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> printf("timed out [average-piece-time: %d ms ]\n"
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(149)">../src/torrent.cpp:10478</a></td><td>instead of resorting the whole list, insert the peers directly into the right place</td></tr><tr id="149" style="display: none;" colspan="3"><td colspan="3"><h2>instead of resorting the whole list, insert the peers
directly into the right place</h2><h4>../src/torrent.cpp:10478</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> printf("timed out [average-piece-time: %d ms ]\n"
, m_average_piece_time);
#endif
}
@ -5847,7 +5847,7 @@ directly into the right place</h2><h4>../src/torrent.cpp:10501</h4><pre style="b
{
return boost::uint64_t(prev_amount_upload) &lt;&lt; 10;
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(151)">../src/udp_socket.cpp:290</a></td><td>it would be nice to detect this on posix systems also</td></tr><tr id="151" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to detect this on posix systems also</h2><h4>../src/udp_socket.cpp:290</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> --m_v6_outstanding;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(151)">../src/udp_socket.cpp:286</a></td><td>it would be nice to detect this on posix systems also</td></tr><tr id="151" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to detect this on posix systems also</h2><h4>../src/udp_socket.cpp:286</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> --m_v6_outstanding;
}
else
#endif
@ -5898,7 +5898,7 @@ void udp_socket::call_handler(error_code const&amp; ec, udp::endpoint const&amp;
ret = (*i)-&gt;incoming_packet(ec, ep, buf, size);
} TORRENT_CATCH (std::exception&amp;) {}
if (*i == NULL) i = m_observers.erase(i);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(152)">../src/upnp.cpp:72</a></td><td>listen_interface is not used. It's meant to bind the broadcast socket</td></tr><tr id="152" style="display: none;" colspan="3"><td colspan="3"><h2>listen_interface is not used. It's meant to bind the broadcast socket</h2><h4>../src/upnp.cpp:72</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include &lt;asio/ip/multicast.hpp&gt;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(152)">../src/upnp.cpp:71</a></td><td>listen_interface is not used. It's meant to bind the broadcast socket</td></tr><tr id="152" style="display: none;" colspan="3"><td colspan="3"><h2>listen_interface is not used. It's meant to bind the broadcast socket</h2><h4>../src/upnp.cpp:71</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include &lt;asio/ip/multicast.hpp&gt;
#else
#include &lt;boost/asio/ip/host_name.hpp&gt;
#include &lt;boost/asio/ip/multicast.hpp&gt;
@ -5918,7 +5918,7 @@ namespace upnp_errors
static error_code ec;
<div style="background: #ffff00" width="100%">upnp::upnp(io_service&amp; ios, connection_queue&amp; cc
<div style="background: #ffff00" width="100%">upnp::upnp(io_service&amp; ios
</div> , address const&amp; listen_interface, std::string const&amp; user_agent
, portmap_callback_t const&amp; cb, log_callback_t const&amp; lcb
, bool ignore_nonrouters, void* state)
@ -5936,7 +5936,6 @@ static error_code ec;
, m_disabled(false)
, m_closing(false)
, m_ignore_non_routers(ignore_nonrouters)
, m_cc(cc)
, m_last_if_update(min_time())
{
TORRENT_ASSERT(cb);
@ -5949,6 +5948,7 @@ static error_code ec;
upnp_state_t* s = (upnp_state_t*)state;
m_devices.swap(s-&gt;devices);
m_mappings.swap(s-&gt;mappings);
delete s;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(153)">../src/ut_metadata.cpp:320</a></td><td>we really need to increment the refcounter on the torrent while this buffer is still in the peer's send buffer</td></tr><tr id="153" style="display: none;" colspan="3"><td colspan="3"><h2>we really need to increment the refcounter on the torrent
while this buffer is still in the peer's send buffer</h2><h4>../src/ut_metadata.cpp:320</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (!m_tp.need_loaded()) return;
metadata = m_tp.metadata().begin + offset;
@ -6463,10 +6463,10 @@ namespace libtorrent
// the pointer to the block of virtual address space
// making up the mmapped cache space
char* m_cache_pool;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(163)">../include/libtorrent/peer_connection.hpp:217</a></td><td>make this a raw pointer (to save size in the first cache line) and make the constructor take a raw pointer. torrent objects should always outlive their peers</td></tr><tr id="163" style="display: none;" colspan="3"><td colspan="3"><h2>make this a raw pointer (to save size in
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(163)">../include/libtorrent/peer_connection.hpp:216</a></td><td>make this a raw pointer (to save size in the first cache line) and make the constructor take a raw pointer. torrent objects should always outlive their peers</td></tr><tr id="163" style="display: none;" colspan="3"><td colspan="3"><h2>make this a raw pointer (to save size in
the first cache line) and make the constructor
take a raw pointer. torrent objects should always
outlive their peers</h2><h4>../include/libtorrent/peer_connection.hpp:217</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , m_snubbed(false)
outlive their peers</h2><h4>../include/libtorrent/peer_connection.hpp:216</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , m_snubbed(false)
, m_interesting(false)
, m_choked(true)
, m_corked(false)
@ -6517,8 +6517,8 @@ outlive their peers</h2><h4>../include/libtorrent/peer_connection.hpp:217</h4><p
// pick a piece to download, we could only find
// blocks that were already requested from other
// peers. In this case, we should not try to pick
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(164)">../include/libtorrent/peer_connection.hpp:1144</a></td><td>factor this out into its own class with a virtual interface torrent and session should implement this interface</td></tr><tr id="164" style="display: none;" colspan="3"><td colspan="3"><h2>factor this out into its own class with a virtual interface
torrent and session should implement this interface</h2><h4>../include/libtorrent/peer_connection.hpp:1144</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(164)">../include/libtorrent/peer_connection.hpp:1123</a></td><td>factor this out into its own class with a virtual interface torrent and session should implement this interface</td></tr><tr id="164" style="display: none;" colspan="3"><td colspan="3"><h2>factor this out into its own class with a virtual interface
torrent and session should implement this interface</h2><h4>../include/libtorrent/peer_connection.hpp:1123</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// the local endpoint for this peer, i.e. our address
// and our port. If this is set for outgoing connections
// before the connection completes, it means we want to
@ -7094,7 +7094,7 @@ namespace libtorrent
// flags for the source bitmask, each indicating where
// we heard about this tracker
enum tracker_source
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(177)">../include/libtorrent/upnp.hpp:113</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="177" style="display: none;" colspan="3"><td colspan="3"><h2>support using the windows API for UPnP operations as well</h2><h4>../include/libtorrent/upnp.hpp:113</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // specific port
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(177)">../include/libtorrent/upnp.hpp:112</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="177" style="display: none;" colspan="3"><td colspan="3"><h2>support using the windows API for UPnP operations as well</h2><h4>../include/libtorrent/upnp.hpp:112</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // specific port
external_port_must_be_wildcard = 727
};
@ -7117,7 +7117,7 @@ typedef boost::function&lt;void(char const*)&gt; log_callback_t;
<div style="background: #ffff00" width="100%">class TORRENT_EXTRA_EXPORT upnp : public intrusive_ptr_base&lt;upnp&gt;
</div>{
public:
upnp(io_service&amp; ios, connection_queue&amp; cc
upnp(io_service&amp; ios
, address const&amp; listen_interface, std::string const&amp; user_agent
, portmap_callback_t const&amp; cb, log_callback_t const&amp; lcb
, bool ignore_nonrouters, void* state = 0);
@ -7145,7 +7145,7 @@ public:
// is -1, which means failure. There will not be any error alert notification for
// mappings that fail with a -1 return value.
int add_mapping(protocol_type p, int external_port, int local_port);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(178)">../include/libtorrent/utp_stream.hpp:391</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="178" style="display: none;" colspan="3"><td colspan="3"><h2>implement blocking write. Low priority since it's not used (yet)</h2><h4>../include/libtorrent/utp_stream.hpp:391</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (typename Mutable_Buffers::const_iterator i = buffers.begin()
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(178)">../include/libtorrent/utp_stream.hpp:390</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="178" style="display: none;" colspan="3"><td colspan="3"><h2>implement blocking write. Low priority since it's not used (yet)</h2><h4>../include/libtorrent/utp_stream.hpp:390</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (typename Mutable_Buffers::const_iterator i = buffers.begin()
, end(buffers.end()); i != end; ++i)
{
using asio::buffer_cast;
@ -7248,7 +7248,7 @@ public:
item(entry const&amp; v
, std::pair&lt;char const*, int&gt; salt
, boost::uint64_t seq, char const* pk, char const* sk);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(180)">../include/libtorrent/aux_/session_impl.hpp:404</a></td><td>move the login info into the tracker_request object</td></tr><tr id="180" style="display: none;" colspan="3"><td colspan="3"><h2>move the login info into the tracker_request object</h2><h4>../include/libtorrent/aux_/session_impl.hpp:404</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(180)">../include/libtorrent/aux_/session_impl.hpp:402</a></td><td>move the login info into the tracker_request object</td></tr><tr id="180" style="display: none;" colspan="3"><td colspan="3"><h2>move the login info into the tracker_request object</h2><h4>../include/libtorrent/aux_/session_impl.hpp:402</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
void on_lsd_announce(error_code const&amp; e);
// called when a port mapping is successful, or a router returns
@ -7299,7 +7299,7 @@ public:
#ifndef TORRENT_DISABLE_EXTENSIONS
void add_extensions_to_torrent(
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(181)">../include/libtorrent/aux_/session_impl.hpp:879</a></td><td>should this be renamed m_outgoing_interfaces?</td></tr><tr id="181" style="display: none;" colspan="3"><td colspan="3"><h2>should this be renamed m_outgoing_interfaces?</h2><h4>../include/libtorrent/aux_/session_impl.hpp:879</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // listen socket. For each retry the port number
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(181)">../include/libtorrent/aux_/session_impl.hpp:864</a></td><td>should this be renamed m_outgoing_interfaces?</td></tr><tr id="181" style="display: none;" colspan="3"><td colspan="3"><h2>should this be renamed m_outgoing_interfaces?</h2><h4>../include/libtorrent/aux_/session_impl.hpp:864</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // listen socket. For each retry the port number
// is incremented by one
int m_listen_port_retries;
@ -7350,7 +7350,7 @@ public:
mutable boost::uint8_t m_interface_index;
void open_new_incoming_socks_connection();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(182)">../include/libtorrent/aux_/session_impl.hpp:928</a></td><td>replace this by a proper asio timer</td></tr><tr id="182" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:928</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> mutable boost::uint8_t m_interface_index;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(182)">../include/libtorrent/aux_/session_impl.hpp:913</a></td><td>replace this by a proper asio timer</td></tr><tr id="182" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:913</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> mutable boost::uint8_t m_interface_index;
void open_new_incoming_socks_connection();
@ -7374,7 +7374,7 @@ public:
</div>
// this is used to decide when to recalculate which
// torrents to keep queued and which to activate
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(183)">../include/libtorrent/aux_/session_impl.hpp:933</a></td><td>replace this by a proper asio timer</td></tr><tr id="183" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:933</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void setup_listener(listen_socket_t* s, std::string const&amp; device
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(183)">../include/libtorrent/aux_/session_impl.hpp:918</a></td><td>replace this by a proper asio timer</td></tr><tr id="183" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:918</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void setup_listener(listen_socket_t* s, std::string const&amp; device
, bool ipv4, int port, int&amp; retries, int flags, error_code&amp; ec);
#ifndef TORRENT_DISABLE_DHT
@ -7400,7 +7400,7 @@ public:
// is only decresed when the unchoke set
// is recomputed, and when it reaches zero,
// the optimistic unchoke is moved to another peer.
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(184)">../include/libtorrent/aux_/session_impl.hpp:940</a></td><td>replace this by a proper asio timer</td></tr><tr id="184" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:940</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(184)">../include/libtorrent/aux_/session_impl.hpp:925</a></td><td>replace this by a proper asio timer</td></tr><tr id="184" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:925</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// the number of unchoked peers as set by the auto-unchoker
// this should always be &gt;= m_max_uploads
int m_allowed_upload_slots;
@ -7451,7 +7451,7 @@ public:
int m_suggest_timer;
// statistics gathered from all torrents.
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(185)">../include/libtorrent/aux_/session_interface.hpp:198</a></td><td>it would be nice to not have this be part of session_interface</td></tr><tr id="185" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to not have this be part of session_interface</h2><h4>../include/libtorrent/aux_/session_interface.hpp:198</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> virtual boost::uint16_t listen_port() const = 0;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(185)">../include/libtorrent/aux_/session_interface.hpp:197</a></td><td>it would be nice to not have this be part of session_interface</td></tr><tr id="185" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to not have this be part of session_interface</h2><h4>../include/libtorrent/aux_/session_interface.hpp:197</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> virtual boost::uint16_t listen_port() const = 0;
virtual boost::uint16_t ssl_listen_port() const = 0;
// used to (potentially) issue socket write calls onto multiple threads