regenerate html

This commit is contained in:
Arvid Norberg 2013-08-12 18:32:41 +00:00
parent fd438be25d
commit fdeab204a4
5 changed files with 103 additions and 154 deletions

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
<title>libtorrent manual</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
@ -95,7 +95,7 @@ current state supports and includes the following features:</p>
without having to modify libtorrent</li>
<li>supports trackerless torrents (using the Mainline kademlia DHT protocol) with
some <a class="reference external" href="dht_extensions.html">DHT extensions</a>. <a class="reference external" href="http://bittorrent.org/beps/bep_0005.html">BEP 5</a>.</li>
<li>supports the bittorrent <a class="reference external" href="extension_protocol.html">extension protocol</a>. See <a class="reference external" href="manual.html#extensions">extensions</a>. <a class="reference external" href="http://bittorrent.org/beps/bep_0010.html">BEP 10</a>.</li>
<li>supports the bittorrent <a class="reference external" href="extension_protocol.html">extension protocol</a>. See <a class="reference external" href="manual-ref.html#extensions">extensions</a>. <a class="reference external" href="http://bittorrent.org/beps/bep_0010.html">BEP 10</a>.</li>
<li>supports the uTorrent metadata transfer protocol <a class="reference external" href="http://bittorrent.org/beps/bep_0009.html">BEP 9</a> (i.e. magnet links).</li>
<li>supports the uTorrent peer exchange protocol (PEX).</li>
<li>supports local peer discovery (multicasts for peers on the same local network)</li>
@ -103,7 +103,7 @@ some <a class="reference external" href="dht_extensions.html">DHT extensions</a>
uTorrent interpretation).</li>
<li>tracker scrapes</li>
<li>supports lt_trackers extension, to exchange trackers between peers</li>
<li><a class="reference external" href="manual.html#http-seeding">HTTP seeding</a>, as specified in <a class="reference external" href="http://bittorrent.org/beps/bep_0017.html">BEP 17</a> and <a class="reference external" href="http://bittorrent.org/beps/bep_0019.html">BEP 19</a>.</li>
<li><a class="reference external" href="manual-ref.html#http-seeding">HTTP seeding</a>, as specified in <a class="reference external" href="http://bittorrent.org/beps/bep_0017.html">BEP 17</a> and <a class="reference external" href="http://bittorrent.org/beps/bep_0019.html">BEP 19</a>.</li>
<li>supports the udp-tracker protocol. (<a class="reference external" href="http://bittorrent.org/beps/bep_0015.html">BEP 15</a>).</li>
<li>supports the <tt class="docutils literal">no_peer_id=1</tt> extension that will ease the load off trackers.</li>
<li>supports the <tt class="docutils literal">compact=1</tt> tracker parameter.</li>
@ -121,7 +121,7 @@ ratio rather than downloading the torrent.</li>
<h2>disk management</h2>
<ul class="simple">
<li>uses a separate disk I/O thread to not have the disk ever block on network or
client interaction. (see <a class="reference external" href="manual.html#threads">threads</a>).</li>
client interaction. (see <a class="reference external" href="manualref.html#threads">threads</a>).</li>
<li>supports files &gt; 2 gigabytes.</li>
<li>fast resume support, a way to get rid of the costly piece check at the
start of a resumed torrent. Saves the storage state, piece_picker state

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
<title></title>
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
@ -48,8 +48,8 @@
<li><a class="reference external" href="contributing.html">contributing</a></li>
<li><a class="reference external" href="building.html">building libtorrent</a></li>
<li><a class="reference external" href="examples.html">examples</a></li>
<li><a class="reference external" href="manual.html">api documentation</a></li>
<li><a class="reference external" href="make_torrent.html">create torrents</a></li>
<li><a class="reference external" href="manual-ref.html">library overview</a></li>
<li><a class="reference external" href="reference.html">reference documentation</a></li>
<li><a class="reference external" href="running_tests.html">running tests</a></li>
<li><a class="reference external" href="tuning.html">tuning</a></li>
<li><a class="reference external" href="client_test.png">screenshot</a></li>

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
<title></title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
@ -377,7 +377,7 @@ is enabled or not, without instantiating the alert. The <tt class="docutils lite
the run-time equivalence.</p>
<p>The <tt class="docutils literal">what()</tt> virtual function may simply be a string literal of the class name of
your alert.</p>
<p>For more information, see the alert section in the <a class="reference external" href="manual.html">main manual</a>.</p>
<p>For more information, see the <a class="reference external" href="reference-Alerts.html">alert section</a>.</p>
</div>
</div>
<div id="footer">

View File

@ -3,7 +3,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.10: http://docutils.sourceforge.net/" />
<title>libtorrent python binding</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
@ -120,7 +120,7 @@ bin/darwin-4.0/release/dht-support-on/link-static/logging-none/threading-multi/l
<div class="section" id="using-libtorrent-in-python">
<h1>using libtorrent in python</h1>
<p>The python interface is nearly identical to the C++ interface. Please refer to
the <a class="reference external" href="manual.html">main library reference</a>. The main differences are:</p>
the <a class="reference external" href="reference.html">library reference</a>. The main differences are:</p>
<dl class="docutils">
<dt>asio::tcp::endpoint</dt>
<dd>The endpoint type is represented as a tuple of a string (as the address) and an int for

View File

@ -24,8 +24,8 @@
<span style="color: #f77">4 important</span>
<span style="color: #3c3">11 relevant</span>
<span style="color: #77f">16 feasible</span>
<span style="color: #999">36 notes</span>
<table width="100%" border="1" style="border-collapse: collapse;"><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(0)">../src/torrent.cpp:5801</a></td><td>support SSL over uTP</td></tr><tr id="0" style="display: none;" colspan="3"><td colspan="3"><h2>support SSL over uTP</h2><h4>../src/torrent.cpp:5801</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // we'll instantiate a TCP connection
<span style="color: #999">35 notes</span>
<table width="100%" border="1" style="border-collapse: collapse;"><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(0)">../src/torrent.cpp:5798</a></td><td>support SSL over uTP</td></tr><tr id="0" style="display: none;" colspan="3"><td colspan="3"><h2>support SSL over uTP</h2><h4>../src/torrent.cpp:5798</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // we'll instantiate a TCP connection
utp_socket_manager* sm = 0;
if (m_ses.m_settings.enable_outgoing_utp
@ -76,7 +76,7 @@
}
m_ses.setup_socket_buffers(*s);
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(1)">../src/torrent.cpp:6151</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="1" 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:6151</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(1)">../src/torrent.cpp:6148</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="1" 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:6148</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
}
TORRENT_ASSERT(m_connections.find(p) == m_connections.end());
m_connections.insert(p);
@ -282,7 +282,7 @@ in the torrent. That should be taken into account here.</h2><h4>../src/piece_pic
// ignored as long as possible. All blocks found in downloading
// pieces are regarded as backup blocks
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(5)">../src/session_impl.cpp:5177</a></td><td>if we still can't find the torrent, we should probably look for it by url here</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>if we still can't find the torrent, we should probably look for it by url here</h2><h4>../src/session_impl.cpp:5177</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(5)">../src/session_impl.cpp:5180</a></td><td>if we still can't find the torrent, we should probably look for it by url here</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>if we still can't find the torrent, we should probably look for it by url here</h2><h4>../src/session_impl.cpp:5180</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
}
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
else
@ -333,7 +333,7 @@ in the torrent. That should be taken into account here.</h2><h4>../src/piece_pic
torrent_ptr-&gt;start();
#ifndef TORRENT_DISABLE_EXTENSIONS
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(6)">../src/torrent.cpp:5919</a></td><td>pass in ec along with the alert</td></tr><tr id="6" style="display: none;" colspan="3"><td colspan="3"><h2>pass in ec along with the alert</h2><h4>../src/torrent.cpp:5919</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(6)">../src/torrent.cpp:5916</a></td><td>pass in ec along with the alert</td></tr><tr id="6" style="display: none;" colspan="3"><td colspan="3"><h2>pass in ec along with the alert</h2><h4>../src/torrent.cpp:5916</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
if (info_hash != m_torrent_file-&gt;info_hash())
{
if (alerts().should_post&lt;metadata_failed_alert&gt;())
@ -384,7 +384,7 @@ in the torrent. That should be taken into account here.</h2><h4>../src/piece_pic
{
std::set&lt;peer_connection*&gt;::iterator p = i++;
(*p)-&gt;disconnect_if_redundant();
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(7)">../src/torrent.cpp:8288</a></td><td>will pick_pieces ever return an empty set?</td></tr><tr id="7" style="display: none;" colspan="3"><td colspan="3"><h2>will pick_pieces ever return an empty set?</h2><h4>../src/torrent.cpp:8288</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (added_request)
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(7)">../src/torrent.cpp:8306</a></td><td>will pick_pieces ever return an empty set?</td></tr><tr id="7" style="display: none;" colspan="3"><td colspan="3"><h2>will pick_pieces ever return an empty set?</h2><h4>../src/torrent.cpp:8306</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (added_request)
{
peers_with_requests.insert(peers_with_requests.begin(), &amp;c);
if (i-&gt;first_requested == min_time()) i-&gt;first_requested = now;
@ -685,7 +685,7 @@ private:
void mapping_expired(error_code const&amp; e, int i);
void close_impl(mutex::scoped_lock&amp; l);
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(13)">../include/libtorrent/torrent_info.hpp:654</a></td><td>these strings (m_comment, m_created_by, m_ssl_root_cert) could be lazy_entry* to save memory</td></tr><tr id="13" style="display: none;" colspan="3"><td colspan="3"><h2>these strings (m_comment, m_created_by, m_ssl_root_cert) could be lazy_entry* to save memory</h2><h4>../include/libtorrent/torrent_info.hpp:654</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::vector&lt;announce_entry&gt; m_urls;
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(13)">../include/libtorrent/torrent_info.hpp:659</a></td><td>these strings (m_comment, m_created_by, m_ssl_root_cert) could be lazy_entry* to save memory</td></tr><tr id="13" style="display: none;" colspan="3"><td colspan="3"><h2>these strings (m_comment, m_created_by, m_ssl_root_cert) could be lazy_entry* to save memory</h2><h4>../include/libtorrent/torrent_info.hpp:659</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::vector&lt;announce_entry&gt; m_urls;
std::vector&lt;web_seed_entry&gt; m_web_seeds;
nodes_t m_nodes;
@ -736,8 +736,7 @@ private:
// this is used when creating a torrent. If there's
// only one file there are cases where it's impossible
// to know if it should be written as a multifile torrent
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(14)">../include/libtorrent/upnp.hpp:102</a></td><td>make this a shared_ptr instead</td></tr><tr id="14" style="display: none;" colspan="3"><td colspan="3"><h2>make this a shared_ptr instead</h2><h4>../include/libtorrent/upnp.hpp:102</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
virtual const char* name() const;
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(14)">../include/libtorrent/upnp.hpp:122</a></td><td>make this a shared_ptr instead</td></tr><tr id="14" style="display: none;" colspan="3"><td colspan="3"><h2>make this a shared_ptr instead</h2><h4>../include/libtorrent/upnp.hpp:122</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> virtual const char* name() const;
virtual std::string message(int ev) const;
virtual boost::system::error_condition default_error_condition(int ev) const
{ return boost::system::error_condition(ev, *this); }
@ -756,9 +755,9 @@ private:
typedef boost::function&lt;void(int, address, int, error_code const&amp;)&gt; portmap_callback_t;
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:
class TORRENT_EXTRA_EXPORT upnp : public intrusive_ptr_base&lt;upnp&gt;
<div style="background: #ffff00" width="100%">{
</div>public:
upnp(io_service&amp; ios, connection_queue&amp; cc
, address const&amp; listen_interface, std::string const&amp; user_agent
, portmap_callback_t const&amp; cb, log_callback_t const&amp; lcb
@ -768,24 +767,25 @@ public:
void* drain_state();
enum protocol_type { none = 0, udp = 1, tcp = 2 };
// Attempts to add a port mapping for the specified protocol. Valid protocols are
// ``upnp::tcp`` and ``upnp::udp`` for the UPnP class and ``natpmp::tcp`` and
// ``natpmp::udp`` for the NAT-PMP class.
//
// ``external_port`` is the port on the external address that will be mapped. This
// is a hint, you are not guaranteed that this port will be available, and it may
// end up being something else. In the portmap_alert_ notification, the actual
// external port is reported.
//
// ``local_port`` is the port in the local machine that the mapping should forward
// to.
//
// The return value is an index that identifies this port mapping. This is used
// to refer to mappings that fails or succeeds in the portmap_error_alert_ and
// portmap_alert_ respectively. If The mapping fails immediately, the return value
// 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);
void delete_mapping(int mapping_index);
bool get_mapping(int mapping_index, int&amp; local_port, int&amp; external_port, int&amp; protocol) const;
void discover_device();
void close();
std::string router_model()
{
mutex::scoped_lock l(m_mutex);
return m_model;
}
private:
void discover_device_impl(mutex::scoped_lock&amp; l);
static address_v4 upnp_multicast_address;
static udp::endpoint upnp_multicast_endpoint;
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(15)">../src/http_seed_connection.cpp:120</a></td><td>in chunked encoding mode, this assert won't hold. the chunk headers should be subtracted from the receive_buffer_size</td></tr><tr id="15" style="display: none;" colspan="3"><td colspan="3"><h2>in chunked encoding mode, this assert won't hold.
the chunk headers should be subtracted from the receive_buffer_size</h2><h4>../src/http_seed_connection.cpp:120</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> boost::optional&lt;piece_block_progress&gt;
@ -839,8 +839,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(16)">../src/peer_connection.cpp:2549</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="16" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
all completed disk operations</h2><h4>../src/peer_connection.cpp:2549</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(16)">../src/peer_connection.cpp:2568</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="16" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
all completed disk operations</h2><h4>../src/peer_connection.cpp:2568</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
if (is_disconnecting()) return;
@ -891,8 +891,8 @@ all completed disk operations</h2><h4>../src/peer_connection.cpp:2549</h4><pre s
return;
}
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(17)">../src/session_impl.cpp:5537</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="17" 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:5537</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(17)">../src/session_impl.cpp:5551</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="17" 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:5551</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_network_thread());
@ -943,7 +943,7 @@ this understanding of our external address, instead of the empty address</h2><h4
{
// INVARIANT_CHECK;
TORRENT_ASSERT(is_network_thread());
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(18)">../src/session_impl.cpp:5747</a></td><td>report errors as alerts</td></tr><tr id="18" style="display: none;" colspan="3"><td colspan="3"><h2>report errors as alerts</h2><h4>../src/session_impl.cpp:5747</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(18)">../src/session_impl.cpp:5761</a></td><td>report errors as alerts</td></tr><tr id="18" style="display: none;" colspan="3"><td colspan="3"><h2>report errors as alerts</h2><h4>../src/session_impl.cpp:5761</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
void session_impl::add_dht_router(std::pair&lt;std::string, int&gt; const&amp; node)
{
@ -994,9 +994,9 @@ this understanding of our external address, instead of the empty address</h2><h4
, local_port, external_port);
return;
}
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(19)">../src/session_impl.cpp:6216</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="19" 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(19)">../src/session_impl.cpp:6230</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="19" 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:6216</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::set_external_address(address const&amp; ip
is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src/session_impl.cpp:6230</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::set_external_address(address const&amp; ip
, int source_type, address const&amp; source)
{
#if defined TORRENT_VERBOSE_LOGGING
@ -1102,8 +1102,8 @@ up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1168</h4
int size = m_torrent_file-&gt;piece_size(r.piece);
if (rp-&gt;fail)
{
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(21)">../src/torrent.cpp:5422</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="21" 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:5422</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> ? (1 &lt;&lt; k) : 0;
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(21)">../src/torrent.cpp:5419</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="21" 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:5419</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> ? (1 &lt;&lt; k) : 0;
bitmask.append(1, v);
TORRENT_ASSERT(bits == 8 || j == num_bitmask_bytes - 1);
}
@ -1154,8 +1154,8 @@ it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:5422</h4
// write have bitmask
// the pieces string has one byte per piece. Each
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(22)">../src/torrent.cpp:6077</a></td><td>ideally, we would disconnect the oldest connection i.e. the one that has waited the longest to connect.</td></tr><tr id="22" style="display: none;" colspan="3"><td colspan="3"><h2>ideally, we would disconnect the oldest connection
i.e. the one that has waited the longest to connect.</h2><h4>../src/torrent.cpp:6077</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_ses.is_aborted())
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(22)">../src/torrent.cpp:6074</a></td><td>ideally, we would disconnect the oldest connection i.e. the one that has waited the longest to connect.</td></tr><tr id="22" style="display: none;" colspan="3"><td colspan="3"><h2>ideally, we would disconnect the oldest connection
i.e. the one that has waited the longest to connect.</h2><h4>../src/torrent.cpp:6074</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_ses.is_aborted())
{
p-&gt;disconnect(errors::session_closing);
return false;
@ -1206,9 +1206,9 @@ i.e. the one that has waited the longest to connect.</h2><h4>../src/torrent.cpp:
{
boost::shared_ptr&lt;peer_plugin&gt; pp((*i)-&gt;new_connection(p));
if (pp) p-&gt;add_extension(pp);
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(23)">../src/torrent.cpp:6318</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="23" 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(23)">../src/torrent.cpp:6315</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="23" 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:6318</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(is_finished());
for all peers though</h2><h4>../src/torrent.cpp:6315</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(is_finished());
TORRENT_ASSERT(m_state != torrent_status::finished &amp;&amp; m_state != torrent_status::seeding);
set_state(torrent_status::finished);
@ -1359,7 +1359,7 @@ filenames should be preserved!</h2><h4>../src/torrent_info.cpp:385</h4><pre styl
// This is a memory optimization! Instead of having
// each entry keep a string for its filename, make it
// simply point into the info-section buffer
internal_file_entry const&amp; fe = *target.rbegin();
int last_index = target.num_files() - 1;
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(26)">../src/torrent_info.cpp:416</a></td><td>once the filename renaming is removed from here this check can be removed as well</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>once the filename renaming is removed from here
this check can be removed as well</h2><h4>../src/torrent_info.cpp:416</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (!extract_single_file(*list.list_at(i), e, root_dir
, &amp;file_hash, &amp;fee, &amp;mtime))
@ -1380,13 +1380,13 @@ this check can be removed as well</h2><h4>../src/torrent_info.cpp:416</h4><pre s
// This is a memory optimization! Instead of having
// each entry keep a string for its filename, make it
// simply point into the info-section buffer
internal_file_entry const&amp; fe = *target.rbegin();
<div style="background: #ffff00" width="100%"> if (fee &amp;&amp; fe.filename() == fee-&gt;string_value())
int last_index = target.num_files() - 1;
<div style="background: #ffff00" width="100%"> if (fee &amp;&amp; target.file_name(last_index) == fee-&gt;string_value())
</div> {
// this string pointer does not necessarily point into
// the m_info_section buffer.
char const* str_ptr = fee-&gt;string_ptr() + info_ptr_diff;
const_cast&lt;internal_file_entry&amp;&gt;(fe).set_name(str_ptr, fee-&gt;string_length());
target.rename_file_borrow(last_index, str_ptr, fee-&gt;string_length());
}
}
return true;
@ -2001,9 +2001,9 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
if (m_storage[m_last &amp; mask]) break;
++m_last;
m_last &amp;= 0xffff;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(39)">../src/peer_connection.cpp:2712</a></td><td>this might need something more so that once we have the metadata we can construct a full bitfield</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>this might need something more
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(39)">../src/peer_connection.cpp:2731</a></td><td>this might need something more so that once we have the metadata we can construct a full bitfield</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>this might need something more
so that once we have the metadata
we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2712</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2731</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
#ifdef TORRENT_VERBOSE_LOGGING
peer_log("*** THIS IS A SEED [ p: %p ]", m_peer_info);
#endif
@ -2054,7 +2054,7 @@ we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2712</h4><pr
boost::shared_ptr&lt;torrent&gt; t = m_torrent.lock();
TORRENT_ASSERT(t);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(40)">../src/peer_connection.cpp:2843</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="40" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:2843</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this piece index later
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(40)">../src/peer_connection.cpp:2862</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="40" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:2862</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this piece index later
m_allowed_fast.push_back(index);
// if the peer has the piece and we want
@ -2105,7 +2105,7 @@ we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2712</h4><pr
TORRENT_ASSERT(t-&gt;has_picker());
TORRENT_ASSERT(t-&gt;picker().is_requested(block));
#endif
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(41)">../src/peer_connection.cpp:3959</a></td><td>we should probably just send a HAVE_ALL here</td></tr><tr id="41" style="display: none;" colspan="3"><td colspan="3"><h2>we should probably just send a HAVE_ALL here</h2><h4>../src/peer_connection.cpp:3959</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::fill(m_recv_buffer.begin() + m_recv_pos, m_recv_buffer.end(), 0);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(41)">../src/peer_connection.cpp:3985</a></td><td>we should probably just send a HAVE_ALL here</td></tr><tr id="41" style="display: none;" colspan="3"><td colspan="3"><h2>we should probably just send a HAVE_ALL here</h2><h4>../src/peer_connection.cpp:3985</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::fill(m_recv_buffer.begin() + m_recv_pos, m_recv_buffer.end(), 0);
#endif
m_packet_size = packet_size;
@ -2156,8 +2156,8 @@ we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2712</h4><pr
}
void peer_connection::update_desired_queue_size()
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(42)">../src/peer_connection.cpp:4543</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="42" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
all completed disk operations</h2><h4>../src/peer_connection.cpp:4543</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this means we're in seed mode and we haven't yet
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(42)">../src/peer_connection.cpp:4572</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="42" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
all completed disk operations</h2><h4>../src/peer_connection.cpp:4572</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this means we're in seed mode and we haven't yet
// verified this piece (r.piece)
t-&gt;filesystem().async_read_and_hash(r, boost::bind(&amp;peer_connection::on_disk_read_complete
, self(), _1, _2, r), cache.second);
@ -2311,7 +2311,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
{
return size_type(prev_amount_upload) &lt;&lt; 10;
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(45)">../src/session_impl.cpp:1902</a></td><td>recalculate all connect candidates for all torrents</td></tr><tr id="45" style="display: none;" colspan="3"><td colspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>../src/session_impl.cpp:1902</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_upload_rate.close();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(45)">../src/session_impl.cpp:1905</a></td><td>recalculate all connect candidates for all torrents</td></tr><tr id="45" style="display: none;" colspan="3"><td colspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>../src/session_impl.cpp:1905</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_upload_rate.close();
// #error closing the udp socket here means that
// the uTP connections cannot be closed gracefully
@ -2362,7 +2362,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
void session_impl::set_settings(session_settings const&amp; s)
{
INVARIANT_CHECK;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(46)">../src/session_impl.cpp:3262</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="46" 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:3262</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(46)">../src/session_impl.cpp:3265</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="46" 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:3265</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // --------------------------------------------------------------
if (!m_paused) m_auto_manage_time_scaler--;
if (m_auto_manage_time_scaler &lt; 0)
{
@ -2413,7 +2413,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
TORRENT_ASSERT(!t.is_aborted());
if (t.statistics().upload_rate() * 11 / 10 &gt; t.upload_limit())
++congested_torrents;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(47)">../src/session_impl.cpp:4322</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="47" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4322</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> else if (!t-&gt;is_paused())
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(47)">../src/session_impl.cpp:4325</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="47" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4325</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> else if (!t-&gt;is_paused())
{
TORRENT_ASSERT(t-&gt;m_resume_data_loaded || !t-&gt;valid_metadata());
--hard_limit;
@ -2464,9 +2464,9 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
void session_impl::recalculate_optimistic_unchoke_slots()
{
TORRENT_ASSERT(is_network_thread());
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(48)">../src/session_impl.cpp:4478</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="48" 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(48)">../src/session_impl.cpp:4481</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="48" 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:4478</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
connections</h2><h4>../src/session_impl.cpp:4481</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
if (m_boost_connections &gt; max_connections)
{
m_boost_connections -= max_connections;
@ -2517,7 +2517,7 @@ connections</h2><h4>../src/session_impl.cpp:4478</h4><pre style="background: #f6
int num_attempts = 1;
if (!t.is_finished())
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(49)">../src/session_impl.cpp:4512</a></td><td>make this bias configurable</td></tr><tr id="49" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>../src/session_impl.cpp:4512</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(50)">../src/session_impl.cpp:4513</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>also take average_peers into account, to create a bias for downloading torrents with < average peers</h2><h4>../src/session_impl.cpp:4513</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> average_peers = num_downloads_peers / num_downloads;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(49)">../src/session_impl.cpp:4515</a></td><td>make this bias configurable</td></tr><tr id="49" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>../src/session_impl.cpp:4515</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(50)">../src/session_impl.cpp:4516</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>also take average_peers into account, to create a bias for downloading torrents with < average peers</h2><h4>../src/session_impl.cpp:4516</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> average_peers = num_downloads_peers / num_downloads;
if (m_next_connect_torrent == m_torrents.end())
m_next_connect_torrent = m_torrents.begin();
@ -2568,7 +2568,7 @@ connections</h2><h4>../src/session_impl.cpp:4478</h4><pre style="background: #f6
if (max_connections == 0) return;
if (num_connections() &gt;= m_settings.connections_limit) return;
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(51)">../src/session_impl.cpp:4657</a></td><td>make configurable</td></tr><tr id="51" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4657</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(51)">../src/session_impl.cpp:4660</a></td><td>make configurable</td></tr><tr id="51" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4660</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)
@ -2601,7 +2601,7 @@ connections</h2><h4>../src/session_impl.cpp:4478</h4><pre style="background: #f6
++m_allowed_upload_slots;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(52)">../src/session_impl.cpp:4671</a></td><td>make configurable</td></tr><tr id="52" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4671</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(52)">../src/session_impl.cpp:4674</a></td><td>make configurable</td></tr><tr id="52" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4674</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;
@ -2652,7 +2652,7 @@ connections</h2><h4>../src/session_impl.cpp:4478</h4><pre style="background: #f6
// if our current upload rate is less than 90% of our
// limit AND most torrents are not "congested", i.e.
// they are not holding back because of a per-torrent
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(53)">../src/storage.cpp:326</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="53" style="display: none;" colspan="3"><td colspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>../src/storage.cpp:326</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_storage-&gt;disk_pool()) block_size = m_storage-&gt;disk_pool()-&gt;block_size();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(53)">../src/storage.cpp:324</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="53" style="display: none;" colspan="3"><td colspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>../src/storage.cpp:324</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_storage-&gt;disk_pool()) block_size = m_storage-&gt;disk_pool()-&gt;block_size();
int size = slot_size;
int num_blocks = (size + block_size - 1) / block_size;
@ -2703,7 +2703,7 @@ connections</h2><h4>../src/session_impl.cpp:4478</h4><pre style="background: #f6
{
buf.iov_len = (std::min)(block_size, size);
// deliberately pass in 0 as flags, to disable random_access
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(54)">../src/storage.cpp:360</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>../src/storage.cpp:360</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(54)">../src/storage.cpp:358</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>../src/storage.cpp:358</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
ph.h.update((char const*)bufs[i].iov_base, bufs[i].iov_len);
small_piece_size -= bufs[i].iov_len;
}
@ -2754,20 +2754,20 @@ connections</h2><h4>../src/session_impl.cpp:4478</h4><pre style="background: #f6
, m_file_priority(file_prio)
, m_pool(fp)
, m_page_size(page_size())
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(55)">../src/storage.cpp:638</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</td></tr><tr id="55" 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(55)">../src/storage.cpp:629</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</td></tr><tr id="55" 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</h2><h4>../src/storage.cpp:638</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (file_iter = files().begin();;)
maybe use the same format as .torrent files and reuse some code from torrent_info</h2><h4>../src/storage.cpp:629</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (;;)
{
if (file_offset &lt; file_iter-&gt;size)
if (file_offset &lt; m_files.file_size(file_index))
break;
file_offset -= file_iter-&gt;size;
++file_iter;
TORRENT_ASSERT(file_iter != files().end());
file_offset -= m_files.file_size(file_index);
++file_index;
TORRENT_ASSERT(file_index != files().num_files());
}
error_code ec;
boost::intrusive_ptr&lt;file&gt; file_handle = open_file(file_iter, file::read_only, ec);
boost::intrusive_ptr&lt;file&gt; file_handle = open_file(file_index, file::read_only, ec);
if (!file_handle || ec) return slot;
size_type data_start = file_handle-&gt;sparse_end(file_offset);
@ -2807,14 +2807,14 @@ maybe use the same format as .torrent files and reuse some code from torrent_inf
for (int i = 0; i &lt; file_sizes_ent-&gt;list_size(); ++i)
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(56)">../src/storage.cpp:1252</a></td><td>what if file_base is used to merge several virtual files into a single physical file? We should probably disable this if file_base is used. This is not a widely used feature though</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>what if file_base is used to merge several virtual files
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(56)">../src/storage.cpp:1238</a></td><td>what if file_base is used to merge several virtual files into a single physical file? We should probably disable this if file_base is used. This is not a widely used feature though</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>what if file_base is used to merge several virtual files
into a single physical file? We should probably disable this
if file_base is used. This is not a widely used feature though</h2><h4>../src/storage.cpp:1252</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> int bytes_transferred = 0;
if file_base is used. This is not a widely used feature though</h2><h4>../src/storage.cpp:1238</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> int bytes_transferred = 0;
// if the file is opened in no_buffer mode, and the
// read is unaligned, we need to fall back on a slow
// special read that reads aligned buffers and copies
// it into the one supplied
size_type adjusted_offset = files().file_base(*file_iter) + file_offset;
size_type adjusted_offset = files().file_base(file_index) + file_offset;
if ((file_handle-&gt;open_mode() &amp; file::no_buffer)
&amp;&amp; ((adjusted_offset &amp; (file_handle-&gt;pos_alignment()-1)) != 0
|| (uintptr_t(tmp_bufs-&gt;iov_base) &amp; (file_handle-&gt;buf_alignment()-1)) != 0))
@ -2822,14 +2822,14 @@ if file_base is used. This is not a widely used feature though</h2><h4>../src/st
bytes_transferred = (int)(this-&gt;*op.unaligned_op)(file_handle, adjusted_offset
, tmp_bufs, num_tmp_bufs, ec);
if ((op.mode &amp; file::rw_mask) == file::read_write
&amp;&amp; adjusted_offset + bytes_transferred &gt;= file_iter-&gt;size
&amp;&amp; adjusted_offset + bytes_transferred &gt;= files().file_size(file_index)
&amp;&amp; (file_handle-&gt;pos_alignment() &gt; 0 || file_handle-&gt;size_alignment() &gt; 0))
{
// we were writing, and we just wrote the last block of the file
// we likely wrote a bit too much, since we're restricted to
// a specific alignment for writes. Make sure to truncate the size
<div style="background: #ffff00" width="100%"> file_handle-&gt;set_size(file_iter-&gt;size, ec);
<div style="background: #ffff00" width="100%"> file_handle-&gt;set_size(files().file_size(file_index), ec);
</div> }
}
else
@ -2842,7 +2842,7 @@ if file_base is used. This is not a widely used feature though</h2><h4>../src/st
if (ec)
{
set_error(files().file_path(*file_iter, m_save_path), ec);
set_error(files().file_path(file_index, m_save_path), ec);
return -1;
}
@ -2916,12 +2916,12 @@ need to be verified to make sure its DN matches the info-hash</h2><h4>../src/tor
{
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
match = true;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(58)">../src/torrent.cpp:5155</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="58" 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(58)">../src/torrent.cpp:5152</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="58" 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:5155</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_seed_mode) m_verified.resize(m_torrent_file-&gt;num_pieces(), false);
which are kept in sync</h2><h4>../src/torrent.cpp:5152</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_seed_mode) m_verified.resize(m_torrent_file-&gt;num_pieces(), false);
super_seeding(rd.dict_find_int_value("super_seeding", 0));
m_last_scrape = rd.dict_find_int_value("last_scrape", 0);
@ -2972,12 +2972,12 @@ which are kept in sync</h2><h4>../src/torrent.cpp:5155</h4><pre style="backgroun
{
char const* p = piece_priority-&gt;string_ptr();
for (int i = 0; i &lt; piece_priority-&gt;string_length(); ++i)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(59)">../src/torrent.cpp:5291</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="59" 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(59)">../src/torrent.cpp:5288</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="59" 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:5291</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:5288</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
}
}
@ -3028,9 +3028,9 @@ no one uses merkle torrents</h2><h4>../src/torrent.cpp:5291</h4><pre style="back
ret["num_complete"] = m_complete;
ret["num_incomplete"] = m_incomplete;
ret["num_downloaded"] = m_downloaded;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(60)">../src/torrent.cpp:5479</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="60" 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(60)">../src/torrent.cpp:5476</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="60" 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:5479</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> entry::string_type&amp; pieces = ret["pieces"].string();
using file_base</h2><h4>../src/torrent.cpp:5476</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> entry::string_type&amp; pieces = ret["pieces"].string();
pieces.resize(m_torrent_file-&gt;num_pieces());
if (is_seed())
{
@ -3054,10 +3054,10 @@ using file_base</h2><h4>../src/torrent.cpp:5479</h4><pre style="background: #f6f
</div> &amp;&amp; m_torrent_file-&gt;files().num_files() == m_torrent_file-&gt;orig_files().num_files())
{
entry::list_type&amp; fl = ret["mapped_files"].list();
for (torrent_info::file_iterator i = m_torrent_file-&gt;begin_files()
, end(m_torrent_file-&gt;end_files()); i != end; ++i)
file_storage const&amp; fs = m_torrent_file-&gt;files();
for (int i = 0; i &lt; fs.num_files(); ++i)
{
fl.push_back(m_torrent_file-&gt;files().file_path(*i));
fl.push_back(fs.file_path(i));
}
}
@ -3081,10 +3081,10 @@ using file_base</h2><h4>../src/torrent.cpp:5479</h4><pre style="background: #f6f
error_code ec;
policy::peer const* p = *i;
address addr = p-&gt;address();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(61)">../src/torrent.cpp:7971</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="61" 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(61)">../src/torrent.cpp:7985</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="61" 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:7971</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:7985</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
rarest_pieces.clear();
rarest_rarity = pp.peer_count;
@ -3118,6 +3118,10 @@ it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:7
{
TORRENT_ASSERT(m_ses.is_network_thread());
if (!ready_for_connections()) return;
if (m_abort) return;
TORRENT_ASSERT(m_storage);
// rotate the cached pieces
// add blocks_per_piece / 2 in order to round to closest whole piece
@ -3131,10 +3135,6 @@ it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:7
{
m_picker-&gt;get_availability(avail_vec);
}
else
{
// we don't keep track of availability, do it the expensive way
// do a linear search from the first piece
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(62)">../src/udp_tracker_connection.cpp:552</a></td><td>it would be more efficient to not use a string here. however, the problem is that some trackers will respond with actual strings. For example i2p trackers</td></tr><tr id="62" style="display: none;" colspan="3"><td colspan="3"><h2>it would be more efficient to not use a string here.
however, the problem is that some trackers will respond
with actual strings. For example i2p trackers</h2><h4>../src/udp_tracker_connection.cpp:552</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
@ -3239,58 +3239,7 @@ with actual strings. For example i2p trackers</h2><h4>../src/udp_tracker_connect
#include &lt;stdarg.h&gt;
// internal
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(64)">../include/libtorrent/file_storage.hpp:107</a></td><td>does this really need to be exported?</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>does this really need to be exported?</h2><h4>../include/libtorrent/file_storage.hpp:107</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// true if the file was marked as hidden (on windows).
bool hidden_attribute:1;
// true if the file was marked as executable (posix)
bool executable_attribute:1;
// true if the file was a symlink. If this is the case
// the ``symlink_index`` refers to a string which specifies the original location
// where the data for this file was found.
bool symlink_attribute:1;
// the path which this is a symlink to, or empty if this is
// not a symlink. This field is only used if the ``symlink_attribute`` is set.
std::string symlink_path;
};
// internal
struct TORRENT_EXPORT internal_file_entry
{
<div style="background: #ffff00" width="100%"> friend class file_storage;
</div>#ifdef TORRENT_DEBUG
// for torrent_info::invariant_check
friend class torrent_info;
#endif
internal_file_entry()
: name(0)
, offset(0)
, symlink_index(-1)
, size(0)
, name_len(0)
, pad_file(false)
, hidden_attribute(false)
, executable_attribute(false)
, symlink_attribute(false)
, path_index(-1)
{}
internal_file_entry(file_entry const&amp; e)
: name(0)
, offset(e.offset)
, symlink_index(-1)
, size(e.size)
, name_len(0)
, pad_file(e.pad_file)
, hidden_attribute(e.hidden_attribute)
, executable_attribute(e.executable_attribute)
, symlink_attribute(e.symlink_attribute)
, path_index(-1)
{
set_name(e.path.c_str());
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(65)">../include/libtorrent/proxy_base.hpp:152</a></td><td>it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);</td></tr><tr id="65" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to remember the bind port and bind once we know where the proxy is
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(64)">../include/libtorrent/proxy_base.hpp:152</a></td><td>it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to remember the bind port and bind once we know where the proxy is
m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:152</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
return m_sock.set_option(opt, ec);
}
@ -3342,7 +3291,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:152</h4>
m_sock.close(ec);
m_resolver.cancel();
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(66)">../include/libtorrent/torrent_info.hpp:118</a></td><td>include the number of peers received from this tracker, at last announce</td></tr><tr id="66" style="display: none;" colspan="3"><td colspan="3"><h2>include the number of peers received from this tracker, at last announce</h2><h4>../include/libtorrent/torrent_info.hpp:118</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(65)">../include/libtorrent/torrent_info.hpp:118</a></td><td>include the number of peers received from this tracker, at last announce</td></tr><tr id="65" style="display: none;" colspan="3"><td colspan="3"><h2>include the number of peers received from this tracker, at last announce</h2><h4>../include/libtorrent/torrent_info.hpp:118</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// if this tracker failed the last time it was contacted
// this error code specifies what error occurred
error_code last_error;