regenerated html

This commit is contained in:
Arvid Norberg 2014-01-20 10:11:07 +00:00
parent 9ab349f1d0
commit c7ed370096
4 changed files with 280 additions and 427 deletions

View File

@ -55,78 +55,79 @@
<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of contents</p>
<ul class="simple">
<li><a class="reference internal" href="#alert" id="id225">alert</a></li>
<li><a class="reference internal" href="#torrent-alert" id="id226">torrent_alert</a></li>
<li><a class="reference internal" href="#peer-alert" id="id227">peer_alert</a></li>
<li><a class="reference internal" href="#tracker-alert" id="id228">tracker_alert</a></li>
<li><a class="reference internal" href="#torrent-added-alert" id="id229">torrent_added_alert</a></li>
<li><a class="reference internal" href="#torrent-removed-alert" id="id230">torrent_removed_alert</a></li>
<li><a class="reference internal" href="#read-piece-alert" id="id231">read_piece_alert</a></li>
<li><a class="reference internal" href="#file-completed-alert" id="id232">file_completed_alert</a></li>
<li><a class="reference internal" href="#file-renamed-alert" id="id233">file_renamed_alert</a></li>
<li><a class="reference internal" href="#file-rename-failed-alert" id="id234">file_rename_failed_alert</a></li>
<li><a class="reference internal" href="#performance-alert" id="id235">performance_alert</a></li>
<li><a class="reference internal" href="#state-changed-alert" id="id236">state_changed_alert</a></li>
<li><a class="reference internal" href="#tracker-error-alert" id="id237">tracker_error_alert</a></li>
<li><a class="reference internal" href="#tracker-warning-alert" id="id238">tracker_warning_alert</a></li>
<li><a class="reference internal" href="#scrape-reply-alert" id="id239">scrape_reply_alert</a></li>
<li><a class="reference internal" href="#scrape-failed-alert" id="id240">scrape_failed_alert</a></li>
<li><a class="reference internal" href="#tracker-reply-alert" id="id241">tracker_reply_alert</a></li>
<li><a class="reference internal" href="#dht-reply-alert" id="id242">dht_reply_alert</a></li>
<li><a class="reference internal" href="#tracker-announce-alert" id="id243">tracker_announce_alert</a></li>
<li><a class="reference internal" href="#hash-failed-alert" id="id244">hash_failed_alert</a></li>
<li><a class="reference internal" href="#peer-ban-alert" id="id245">peer_ban_alert</a></li>
<li><a class="reference internal" href="#peer-unsnubbed-alert" id="id246">peer_unsnubbed_alert</a></li>
<li><a class="reference internal" href="#peer-snubbed-alert" id="id247">peer_snubbed_alert</a></li>
<li><a class="reference internal" href="#peer-error-alert" id="id248">peer_error_alert</a></li>
<li><a class="reference internal" href="#peer-connect-alert" id="id249">peer_connect_alert</a></li>
<li><a class="reference internal" href="#peer-disconnected-alert" id="id250">peer_disconnected_alert</a></li>
<li><a class="reference internal" href="#invalid-request-alert" id="id251">invalid_request_alert</a></li>
<li><a class="reference internal" href="#torrent-finished-alert" id="id252">torrent_finished_alert</a></li>
<li><a class="reference internal" href="#piece-finished-alert" id="id253">piece_finished_alert</a></li>
<li><a class="reference internal" href="#request-dropped-alert" id="id254">request_dropped_alert</a></li>
<li><a class="reference internal" href="#block-timeout-alert" id="id255">block_timeout_alert</a></li>
<li><a class="reference internal" href="#block-finished-alert" id="id256">block_finished_alert</a></li>
<li><a class="reference internal" href="#block-downloading-alert" id="id257">block_downloading_alert</a></li>
<li><a class="reference internal" href="#unwanted-block-alert" id="id258">unwanted_block_alert</a></li>
<li><a class="reference internal" href="#storage-moved-alert" id="id259">storage_moved_alert</a></li>
<li><a class="reference internal" href="#storage-moved-failed-alert" id="id260">storage_moved_failed_alert</a></li>
<li><a class="reference internal" href="#torrent-deleted-alert" id="id261">torrent_deleted_alert</a></li>
<li><a class="reference internal" href="#torrent-delete-failed-alert" id="id262">torrent_delete_failed_alert</a></li>
<li><a class="reference internal" href="#save-resume-data-alert" id="id263">save_resume_data_alert</a></li>
<li><a class="reference internal" href="#save-resume-data-failed-alert" id="id264">save_resume_data_failed_alert</a></li>
<li><a class="reference internal" href="#torrent-paused-alert" id="id265">torrent_paused_alert</a></li>
<li><a class="reference internal" href="#torrent-resumed-alert" id="id266">torrent_resumed_alert</a></li>
<li><a class="reference internal" href="#torrent-checked-alert" id="id267">torrent_checked_alert</a></li>
<li><a class="reference internal" href="#url-seed-alert" id="id268">url_seed_alert</a></li>
<li><a class="reference internal" href="#file-error-alert" id="id269">file_error_alert</a></li>
<li><a class="reference internal" href="#metadata-failed-alert" id="id270">metadata_failed_alert</a></li>
<li><a class="reference internal" href="#metadata-received-alert" id="id271">metadata_received_alert</a></li>
<li><a class="reference internal" href="#udp-error-alert" id="id272">udp_error_alert</a></li>
<li><a class="reference internal" href="#external-ip-alert" id="id273">external_ip_alert</a></li>
<li><a class="reference internal" href="#listen-failed-alert" id="id274">listen_failed_alert</a></li>
<li><a class="reference internal" href="#listen-succeeded-alert" id="id275">listen_succeeded_alert</a></li>
<li><a class="reference internal" href="#portmap-error-alert" id="id276">portmap_error_alert</a></li>
<li><a class="reference internal" href="#portmap-alert" id="id277">portmap_alert</a></li>
<li><a class="reference internal" href="#portmap-log-alert" id="id278">portmap_log_alert</a></li>
<li><a class="reference internal" href="#fastresume-rejected-alert" id="id279">fastresume_rejected_alert</a></li>
<li><a class="reference internal" href="#peer-blocked-alert" id="id280">peer_blocked_alert</a></li>
<li><a class="reference internal" href="#dht-announce-alert" id="id281">dht_announce_alert</a></li>
<li><a class="reference internal" href="#dht-get-peers-alert" id="id282">dht_get_peers_alert</a></li>
<li><a class="reference internal" href="#stats-alert" id="id283">stats_alert</a></li>
<li><a class="reference internal" href="#cache-flushed-alert" id="id284">cache_flushed_alert</a></li>
<li><a class="reference internal" href="#anonymous-mode-alert" id="id285">anonymous_mode_alert</a></li>
<li><a class="reference internal" href="#lsd-peer-alert" id="id286">lsd_peer_alert</a></li>
<li><a class="reference internal" href="#trackerid-alert" id="id287">trackerid_alert</a></li>
<li><a class="reference internal" href="#dht-bootstrap-alert" id="id288">dht_bootstrap_alert</a></li>
<li><a class="reference internal" href="#rss-alert" id="id289">rss_alert</a></li>
<li><a class="reference internal" href="#torrent-error-alert" id="id290">torrent_error_alert</a></li>
<li><a class="reference internal" href="#torrent-need-cert-alert" id="id291">torrent_need_cert_alert</a></li>
<li><a class="reference internal" href="#incoming-connection-alert" id="id292">incoming_connection_alert</a></li>
<li><a class="reference internal" href="#add-torrent-alert" id="id293">add_torrent_alert</a></li>
<li><a class="reference internal" href="#state-update-alert" id="id294">state_update_alert</a></li>
<li><a class="reference internal" href="#torrent-update-alert" id="id295">torrent_update_alert</a></li>
<li><a class="reference internal" href="#rss-item-alert" id="id296">rss_item_alert</a></li>
<li><a class="reference internal" href="#alert" id="id228">alert</a></li>
<li><a class="reference internal" href="#torrent-alert" id="id229">torrent_alert</a></li>
<li><a class="reference internal" href="#peer-alert" id="id230">peer_alert</a></li>
<li><a class="reference internal" href="#tracker-alert" id="id231">tracker_alert</a></li>
<li><a class="reference internal" href="#torrent-added-alert" id="id232">torrent_added_alert</a></li>
<li><a class="reference internal" href="#torrent-removed-alert" id="id233">torrent_removed_alert</a></li>
<li><a class="reference internal" href="#read-piece-alert" id="id234">read_piece_alert</a></li>
<li><a class="reference internal" href="#file-completed-alert" id="id235">file_completed_alert</a></li>
<li><a class="reference internal" href="#file-renamed-alert" id="id236">file_renamed_alert</a></li>
<li><a class="reference internal" href="#file-rename-failed-alert" id="id237">file_rename_failed_alert</a></li>
<li><a class="reference internal" href="#performance-alert" id="id238">performance_alert</a></li>
<li><a class="reference internal" href="#state-changed-alert" id="id239">state_changed_alert</a></li>
<li><a class="reference internal" href="#tracker-error-alert" id="id240">tracker_error_alert</a></li>
<li><a class="reference internal" href="#tracker-warning-alert" id="id241">tracker_warning_alert</a></li>
<li><a class="reference internal" href="#scrape-reply-alert" id="id242">scrape_reply_alert</a></li>
<li><a class="reference internal" href="#scrape-failed-alert" id="id243">scrape_failed_alert</a></li>
<li><a class="reference internal" href="#tracker-reply-alert" id="id244">tracker_reply_alert</a></li>
<li><a class="reference internal" href="#dht-reply-alert" id="id245">dht_reply_alert</a></li>
<li><a class="reference internal" href="#tracker-announce-alert" id="id246">tracker_announce_alert</a></li>
<li><a class="reference internal" href="#hash-failed-alert" id="id247">hash_failed_alert</a></li>
<li><a class="reference internal" href="#peer-ban-alert" id="id248">peer_ban_alert</a></li>
<li><a class="reference internal" href="#peer-unsnubbed-alert" id="id249">peer_unsnubbed_alert</a></li>
<li><a class="reference internal" href="#peer-snubbed-alert" id="id250">peer_snubbed_alert</a></li>
<li><a class="reference internal" href="#peer-error-alert" id="id251">peer_error_alert</a></li>
<li><a class="reference internal" href="#peer-connect-alert" id="id252">peer_connect_alert</a></li>
<li><a class="reference internal" href="#peer-disconnected-alert" id="id253">peer_disconnected_alert</a></li>
<li><a class="reference internal" href="#invalid-request-alert" id="id254">invalid_request_alert</a></li>
<li><a class="reference internal" href="#torrent-finished-alert" id="id255">torrent_finished_alert</a></li>
<li><a class="reference internal" href="#piece-finished-alert" id="id256">piece_finished_alert</a></li>
<li><a class="reference internal" href="#request-dropped-alert" id="id257">request_dropped_alert</a></li>
<li><a class="reference internal" href="#block-timeout-alert" id="id258">block_timeout_alert</a></li>
<li><a class="reference internal" href="#block-finished-alert" id="id259">block_finished_alert</a></li>
<li><a class="reference internal" href="#block-downloading-alert" id="id260">block_downloading_alert</a></li>
<li><a class="reference internal" href="#unwanted-block-alert" id="id261">unwanted_block_alert</a></li>
<li><a class="reference internal" href="#storage-moved-alert" id="id262">storage_moved_alert</a></li>
<li><a class="reference internal" href="#storage-moved-failed-alert" id="id263">storage_moved_failed_alert</a></li>
<li><a class="reference internal" href="#torrent-deleted-alert" id="id264">torrent_deleted_alert</a></li>
<li><a class="reference internal" href="#torrent-delete-failed-alert" id="id265">torrent_delete_failed_alert</a></li>
<li><a class="reference internal" href="#save-resume-data-alert" id="id266">save_resume_data_alert</a></li>
<li><a class="reference internal" href="#save-resume-data-failed-alert" id="id267">save_resume_data_failed_alert</a></li>
<li><a class="reference internal" href="#torrent-paused-alert" id="id268">torrent_paused_alert</a></li>
<li><a class="reference internal" href="#torrent-resumed-alert" id="id269">torrent_resumed_alert</a></li>
<li><a class="reference internal" href="#torrent-checked-alert" id="id270">torrent_checked_alert</a></li>
<li><a class="reference internal" href="#url-seed-alert" id="id271">url_seed_alert</a></li>
<li><a class="reference internal" href="#file-error-alert" id="id272">file_error_alert</a></li>
<li><a class="reference internal" href="#metadata-failed-alert" id="id273">metadata_failed_alert</a></li>
<li><a class="reference internal" href="#metadata-received-alert" id="id274">metadata_received_alert</a></li>
<li><a class="reference internal" href="#udp-error-alert" id="id275">udp_error_alert</a></li>
<li><a class="reference internal" href="#external-ip-alert" id="id276">external_ip_alert</a></li>
<li><a class="reference internal" href="#listen-failed-alert" id="id277">listen_failed_alert</a></li>
<li><a class="reference internal" href="#listen-succeeded-alert" id="id278">listen_succeeded_alert</a></li>
<li><a class="reference internal" href="#portmap-error-alert" id="id279">portmap_error_alert</a></li>
<li><a class="reference internal" href="#portmap-alert" id="id280">portmap_alert</a></li>
<li><a class="reference internal" href="#portmap-log-alert" id="id281">portmap_log_alert</a></li>
<li><a class="reference internal" href="#fastresume-rejected-alert" id="id282">fastresume_rejected_alert</a></li>
<li><a class="reference internal" href="#peer-blocked-alert" id="id283">peer_blocked_alert</a></li>
<li><a class="reference internal" href="#dht-announce-alert" id="id284">dht_announce_alert</a></li>
<li><a class="reference internal" href="#dht-get-peers-alert" id="id285">dht_get_peers_alert</a></li>
<li><a class="reference internal" href="#stats-alert" id="id286">stats_alert</a></li>
<li><a class="reference internal" href="#cache-flushed-alert" id="id287">cache_flushed_alert</a></li>
<li><a class="reference internal" href="#anonymous-mode-alert" id="id288">anonymous_mode_alert</a></li>
<li><a class="reference internal" href="#lsd-peer-alert" id="id289">lsd_peer_alert</a></li>
<li><a class="reference internal" href="#trackerid-alert" id="id290">trackerid_alert</a></li>
<li><a class="reference internal" href="#dht-bootstrap-alert" id="id291">dht_bootstrap_alert</a></li>
<li><a class="reference internal" href="#rss-alert" id="id292">rss_alert</a></li>
<li><a class="reference internal" href="#torrent-error-alert" id="id293">torrent_error_alert</a></li>
<li><a class="reference internal" href="#torrent-need-cert-alert" id="id294">torrent_need_cert_alert</a></li>
<li><a class="reference internal" href="#incoming-connection-alert" id="id295">incoming_connection_alert</a></li>
<li><a class="reference internal" href="#add-torrent-alert" id="id296">add_torrent_alert</a></li>
<li><a class="reference internal" href="#state-update-alert" id="id297">state_update_alert</a></li>
<li><a class="reference internal" href="#torrent-update-alert" id="id298">torrent_update_alert</a></li>
<li><a class="reference internal" href="#rss-item-alert" id="id299">rss_item_alert</a></li>
<li><a class="reference internal" href="#dht-error-alert" id="id300">dht_error_alert</a></li>
</ul>
</div>
<p>The <a class="reference external" href="reference-Session.html#pop_alert()">pop_alert()</a> function on <a class="reference external" href="reference-Session.html#session">session</a> is the interface for retrieving
@ -2237,6 +2238,63 @@ struct rss_item_alert : alert
feed_item item;
};
</pre>
<a name="dht_error_alert"></a></div>
<div class="section" id="dht-error-alert">
<h1>dht_error_alert</h1>
<p>Declared in &quot;<a class="reference external" href="../include/libtorrent/alert_types.hpp">libtorrent/alert_types.hpp</a>&quot;</p>
<p>posted when something fails in the DHT. This is not necessarily a fatal
error, but it could prevent proper operation</p>
<pre class="literal-block">
struct dht_error_alert: alert
{
virtual std::string <strong>message</strong> () const;
enum op_t
{
unknown,
hostname_lookup,
};
| alert::dht_notification;
error_code error;
op_t operation;
};
</pre>
<a name="op_t"></a><div class="section" id="id226">
<h2>enum op_t</h2>
<p>Declared in &quot;<a class="reference external" href="../include/libtorrent/alert_types.hpp">libtorrent/alert_types.hpp</a>&quot;</p>
<table border="1" class="docutils">
<colgroup>
<col width="46%" />
<col width="19%" />
<col width="35%" />
</colgroup>
<thead valign="bottom">
<tr><th class="head">name</th>
<th class="head">value</th>
<th class="head">description</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>unknown</td>
<td>0</td>
<td>&nbsp;</td>
</tr>
<tr><td>hostname_lookup</td>
<td>1</td>
<td>&nbsp;</td>
</tr>
</tbody>
</table>
<a name="error"></a><dl class="docutils">
<dt>error</dt>
<dd>the error code</dd>
</dl>
<a name="operation"></a><dl class="docutils">
<dt>operation</dt>
<dd>the operation that failed</dd>
</dl>
</div>
</div>
</div>
<div id="footer">

View File

@ -219,6 +219,7 @@
<div class="line"><a class="reference external" href="reference-Alerts.html#state_update_alert">state_update_alert</a></div>
<div class="line"><a class="reference external" href="reference-Alerts.html#torrent_update_alert">torrent_update_alert</a></div>
<div class="line"><a class="reference external" href="reference-Alerts.html#rss_item_alert">rss_item_alert</a></div>
<div class="line"><a class="reference external" href="reference-Alerts.html#dht_error_alert">dht_error_alert</a></div>
</div>
</div>
<div class="section" id="storage">

View File

@ -21,10 +21,10 @@
</head><body>
<h1>libtorrent todo-list</h1>
<span style="color: #f77">3 important</span>
<span style="color: #3c3">4 relevant</span>
<span style="color: #77f">15 feasible</span>
<span style="color: #999">40 notes</span>
<span style="color: #f77">2 important</span>
<span style="color: #3c3">2 relevant</span>
<span style="color: #77f">13 feasible</span>
<span style="color: #999">41 notes</span>
<table width="100%" border="1" style="border-collapse: collapse;"><tr style="background: #fdd"><td>relevance&nbsp;4</td><td><a href="javascript:expand(0)">../src/session_impl.cpp:663</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="0" 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
@ -72,11 +72,11 @@ do as well with NATs)</h2><h4>../src/session_impl.cpp:663</h4><pre style="backgr
, m_abort(false)
, m_paused(false)
, m_incoming_connection(false)
#if (defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS) &amp;&amp; defined BOOST_HAS_PTHREADS
#if TORRENT_USE_ASSERTS &amp;&amp; defined BOOST_HAS_PTHREADS
, m_network_thread(0)
#endif
{
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
#if TORRENT_USE_ASSERTS
m_posting_torrent_updates = false;
#endif
@ -131,7 +131,7 @@ namespace libtorrent
case integer16: *((boost::uint16_t*)dest) = boost::uint16_t(val); break;
case integer: *((int*)dest) = int(val); break;
case size_integer: *((size_type*)dest) = size_type(val); break;
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(2)">../src/torrent.cpp:6068</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="2" 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:6068</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(2)">../src/torrent.cpp:6090</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="2" 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:6090</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
}
TORRENT_ASSERT(m_connections.find(p) == m_connections.end());
m_connections.insert(p);
@ -235,162 +235,7 @@ when it doesn't have any of the file do the following</h2><h4>../src/web_peer_co
{
// we should not try this server again.
t-&gt;remove_web_seed(this);
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(4)">../src/kademlia/node.cpp:327</a></td><td>if uTP is enabled, we should say "implied_port": 1</td></tr><tr id="4" style="display: none;" colspan="3"><td colspan="3"><h2>if uTP is enabled, we should say "implied_port": 1</h2><h4>../src/kademlia/node.cpp:327</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , end(v.end()); i != end; ++i)
{
#ifdef TORRENT_DHT_VERBOSE_LOGGING
TORRENT_LOG(node) &lt;&lt; " announce-distance: " &lt;&lt; (160 - distance_exp(ih, i-&gt;first.id));
#endif
void* ptr = node.m_rpc.allocate_observer();
if (ptr == 0) return;
observer_ptr o(new (ptr) announce_observer(algo, i-&gt;first.ep(), i-&gt;first.id));
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
o-&gt;m_in_constructor = false;
#endif
entry e;
e["y"] = "q";
e["q"] = "announce_peer";
entry&amp; a = e["a"];
a["info_hash"] = ih.to_string();
a["port"] = listen_port;
a["token"] = i-&gt;second;
a["seed"] = int(seed);
<div style="background: #ffff00" width="100%"> node.m_rpc.invoke(e, i-&gt;first.ep(), o);
</div> }
}
}
void node_impl::add_router_node(udp::endpoint router)
{
#ifdef TORRENT_DHT_VERBOSE_LOGGING
TORRENT_LOG(node) &lt;&lt; "adding router node: " &lt;&lt; router;
#endif
m_table.add_router_node(router);
}
void node_impl::add_node(udp::endpoint node)
{
// ping the node, and if we get a reply, it
// will be added to the routing table
void* ptr = m_rpc.allocate_observer();
if (ptr == 0) return;
// create a dummy traversal_algorithm
// this is unfortunately necessary for the observer
// to free itself from the pool when it's being released
boost::intrusive_ptr&lt;traversal_algorithm&gt; algo(
new traversal_algorithm(*this, (node_id::min)()));
observer_ptr o(new (ptr) null_observer(algo, node, node_id(0)));
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
o-&gt;m_in_constructor = false;
#endif
entry e;
e["y"] = "q";
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(5)">../src/torrent.cpp:8258</a></td><td>will pick_pieces ever return an empty set?</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>will pick_pieces ever return an empty set?</h2><h4>../src/torrent.cpp:8258</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;
if (!c.can_request_time_critical())
{
peers.erase(p);
}
else
{
// resort p, since it will have a higher download_queue_time now
while (p != peers.end()-1 &amp;&amp; (*p)-&gt;download_queue_time() &gt; (*(p+1))-&gt;download_queue_time())
{
std::iter_swap(p, p+1);
++p;
}
}
}
<div style="background: #ffff00" width="100%"> } while (!interesting_blocks.empty());
</div>
peers.insert(peers.begin(), ignore_peers.begin(), ignore_peers.end());
ignore_peers.clear();
}
// commit all the time critical requests
for (std::set&lt;peer_connection*&gt;::iterator i = peers_with_requests.begin()
, end(peers_with_requests.end()); i != end; ++i)
{
(*i)-&gt;send_block_requests();
}
}
std::set&lt;std::string&gt; torrent::web_seeds(web_seed_entry::type_t type) const
{
TORRENT_ASSERT(m_ses.is_network_thread());
std::set&lt;std::string&gt; ret;
for (std::list&lt;web_seed_entry&gt;::const_iterator i = m_web_seeds.begin()
, end(m_web_seeds.end()); i != end; ++i)
{
if (i-&gt;peer_info.banned) continue;
if (i-&gt;type != type) continue;
ret.insert(i-&gt;url);
}
return ret;
}
void torrent::remove_web_seed(std::string const&amp; url, web_seed_entry::type_t type)
{
std::list&lt;web_seed_entry&gt;::iterator i = std::find_if(m_web_seeds.begin(), m_web_seeds.end()
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(6)">../src/utp_stream.cpp:1874</a></td><td>we might want to do something else here as well, to resend the packet immediately without it being an MTU probe</td></tr><tr id="6" style="display: none;" colspan="3"><td colspan="3"><h2>we might want to do something else here
as well, to resend the packet immediately without
it being an MTU probe</h2><h4>../src/utp_stream.cpp:1874</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">// if ((rand() % 100) &gt; 0)
#endif
m_sm-&gt;send_packet(udp::endpoint(m_remote_address, m_port)
, (char const*)h, p-&gt;size, ec
, p-&gt;mtu_probe ? utp_socket_manager::dont_fragment : 0);
++m_out_packets;
m_sm-&gt;inc_stats_counter(utp_socket_manager::packets_out);
if (ec == error::message_size)
{
#if TORRENT_UTP_LOG
UTP_LOGV("%8p: error sending packet: %s\n", this, ec.message().c_str());
#endif
// if we fail even though this is not a probe, we're screwed
// since we'd have to repacketize
TORRENT_ASSERT(p-&gt;mtu_probe);
m_mtu_ceiling = p-&gt;size - 1;
if (m_mtu_floor &gt; m_mtu_ceiling) m_mtu_floor = m_mtu_ceiling;
update_mtu_limits();
<div style="background: #ffff00" width="100%"> p-&gt;mtu_probe = false;
</div> if (m_mtu_seq == m_ack_nr)
m_mtu_seq = 0;
ec.clear();
#if TORRENT_UTP_LOG
UTP_LOGV("%8p: re-sending\n", this);
#endif
m_sm-&gt;send_packet(udp::endpoint(m_remote_address, m_port)
, (char const*)h, p-&gt;size, ec, 0);
}
if (ec == error::would_block || ec == error::try_again)
{
#if TORRENT_UTP_LOG
UTP_LOGV("%8p: socket stalled\n", this);
#endif
if (!m_stalled)
{
m_stalled = true;
m_sm-&gt;subscribe_writable(this);
}
}
else if (ec)
{
TORRENT_ASSERT(stack_alloced != bool(payload_size));
if (payload_size) free(p);
m_error = ec;
m_state = UTP_STATE_ERROR_WAIT;
test_socket_state();
return false;
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(7)">../src/web_peer_connection.cpp:546</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="7" 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:546</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;remove_web_seed(this);
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(4)">../src/web_peer_connection.cpp:546</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="4" 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:546</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;remove_web_seed(this);
disconnect(errors::missing_location, 2);
#ifdef TORRENT_DEBUG
TORRENT_ASSERT(m_statistics.last_payload_downloaded()
@ -441,7 +286,7 @@ it being an MTU probe</h2><h4>../src/utp_stream.cpp:1874</h4><pre style="backgro
return;
}
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(8)">../src/kademlia/node.cpp:68</a></td><td>make this configurable in dht_settings</td></tr><tr id="8" style="display: none;" colspan="3"><td colspan="3"><h2>make this configurable in dht_settings</h2><h4>../src/kademlia/node.cpp:68</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include "libtorrent/kademlia/rpc_manager.hpp"
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(5)">../src/kademlia/node.cpp:68</a></td><td>make this configurable in dht_settings</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>make this configurable in dht_settings</h2><h4>../src/kademlia/node.cpp:68</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include "libtorrent/kademlia/rpc_manager.hpp"
#include "libtorrent/kademlia/routing_table.hpp"
#include "libtorrent/kademlia/node.hpp"
#include "libtorrent/kademlia/dht_observer.hpp"
@ -492,7 +337,7 @@ void purge_peers(std::set&lt;peer_entry&gt;&amp; peers)
void nop() {}
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(9)">../src/http_seed_connection.cpp:117</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="9" style="display: none;" colspan="3"><td colspan="3"><h2>in chunked encoding mode, this assert won't hold.
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(6)">../src/http_seed_connection.cpp:117</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="6" 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:117</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> boost::optional&lt;piece_block_progress&gt;
http_seed_connection::downloading_piece_progress() const
{
@ -544,7 +389,7 @@ 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(10)">../src/peer_connection.cpp:2570</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="10" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(7)">../src/peer_connection.cpp:2570</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="7" 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:2570</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
if (is_disconnecting()) return;
@ -596,8 +441,8 @@ all completed disk operations</h2><h4>../src/peer_connection.cpp:2570</h4><pre s
return;
}
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(11)">../src/session_impl.cpp:5553</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="11" 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:5553</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(8)">../src/session_impl.cpp:5543</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="8" 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:5543</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());
@ -648,60 +493,9 @@ 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(12)">../src/session_impl.cpp:5763</a></td><td>report errors as alerts</td></tr><tr id="12" style="display: none;" colspan="3"><td colspan="3"><h2>report errors as alerts</h2><h4>../src/session_impl.cpp:5763</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)
{
#if defined TORRENT_ASIO_DEBUGGING
add_outstanding_async("session_impl::on_dht_router_name_lookup");
#endif
char port[7];
snprintf(port, sizeof(port), "%d", node.second);
tcp::resolver::query q(node.first, port);
m_host_resolver.async_resolve(q,
boost::bind(&amp;session_impl::on_dht_router_name_lookup, this, _1, _2));
}
void session_impl::on_dht_router_name_lookup(error_code const&amp; e
, tcp::resolver::iterator host)
{
#if defined TORRENT_ASIO_DEBUGGING
complete_async("session_impl::on_dht_router_name_lookup");
#endif
<div style="background: #ffff00" width="100%"> if (e) return;
</div> while (host != tcp::resolver::iterator())
{
// router nodes should be added before the DHT is started (and bootstrapped)
udp::endpoint ep(host-&gt;endpoint().address(), host-&gt;endpoint().port());
if (m_dht) m_dht-&gt;add_router_node(ep);
m_dht_router_nodes.push_back(ep);
++host;
}
}
#endif
void session_impl::maybe_update_udp_mapping(int nat, int local_port, int external_port)
{
int local, external, protocol;
if (nat == 0 &amp;&amp; m_natpmp.get())
{
if (m_udp_mapping[nat] != -1)
{
if (m_natpmp-&gt;get_mapping(m_udp_mapping[nat], local, external, protocol))
{
// we already have a mapping. If it's the same, don't do anything
if (local == local_port &amp;&amp; external == external_port &amp;&amp; protocol == natpmp::udp)
return;
}
m_natpmp-&gt;delete_mapping(m_udp_mapping[nat]);
}
m_udp_mapping[nat] = m_natpmp-&gt;add_mapping(natpmp::udp
, local_port, external_port);
return;
}
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(13)">../src/session_impl.cpp:6234</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="13" 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(9)">../src/session_impl.cpp:6247</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="9" 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:6234</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:6247</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
@ -752,11 +546,11 @@ is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src
#ifdef TORRENT_DISK_STATS
TORRENT_ASSERT(m_buffer_allocations &gt;= 0);
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(14)">../src/torrent.cpp:1043</a></td><td>make this depend on the error and on the filesystem the files are being downloaded to. If the error is no_space_left_on_device and the filesystem doesn't support sparse files, only zero the priorities of the pieces that are at the tails of all files, leaving everything up to the highest written piece in each file</td></tr><tr id="14" style="display: none;" colspan="3"><td colspan="3"><h2>make this depend on the error and on the filesystem the
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(10)">../src/torrent.cpp:1044</a></td><td>make this depend on the error and on the filesystem the files are being downloaded to. If the error is no_space_left_on_device and the filesystem doesn't support sparse files, only zero the priorities of the pieces that are at the tails of all files, leaving everything up to the highest written piece in each file</td></tr><tr id="10" style="display: none;" colspan="3"><td colspan="3"><h2>make this depend on the error and on the filesystem the
files are being downloaded to. If the error is no_space_left_on_device
and the filesystem doesn't support sparse files, only zero the priorities
of the pieces that are at the tails of all files, leaving everything
up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1043</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (c) c-&gt;disconnect(errors::no_memory);
up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1044</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (c) c-&gt;disconnect(errors::no_memory);
return;
}
@ -807,8 +601,8 @@ up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1043</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(15)">../src/torrent.cpp:5330</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="15" 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:5330</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(11)">../src/torrent.cpp:5352</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="11" 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:5352</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);
}
@ -859,9 +653,9 @@ it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:5330</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(16)">../src/torrent.cpp:6236</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="16" 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(12)">../src/torrent.cpp:6258</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="12" 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:6236</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(m_state != torrent_status::finished &amp;&amp; m_state != torrent_status::seeding);
for all peers though</h2><h4>../src/torrent.cpp:6258</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(m_state != torrent_status::finished &amp;&amp; m_state != torrent_status::seeding);
set_state(torrent_status::finished);
set_queue_position(-1);
@ -912,7 +706,7 @@ for all peers though</h2><h4>../src/torrent.cpp:6236</h4><pre style="background:
// under a different limit with the auto-manager. Make sure we
// update auto-manage torrents in that case
if (m_auto_managed)
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(17)">../src/torrent_info.cpp:181</a></td><td>we might save constructing a std::string if this would take a char const* instead</td></tr><tr id="17" style="display: none;" colspan="3"><td colspan="3"><h2>we might save constructing a std::string if this would take a char const* instead</h2><h4>../src/torrent_info.cpp:181</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(13)">../src/torrent_info.cpp:181</a></td><td>we might save constructing a std::string if this would take a char const* instead</td></tr><tr id="13" style="display: none;" colspan="3"><td colspan="3"><h2>we might save constructing a std::string if this would take a char const* instead</h2><h4>../src/torrent_info.cpp:181</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
tmp_path += i[0];
tmp_path += i[1];
tmp_path += i[2];
@ -963,7 +757,7 @@ for all peers though</h2><h4>../src/torrent.cpp:6236</h4><pre style="background:
path_element.resize(max_path_len);
}
else
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(18)">../src/torrent_info.cpp:401</a></td><td>this logic should be a separate step done once the torrent is loaded, and the original filenames should be preserved!</td></tr><tr id="18" style="display: none;" colspan="3"><td colspan="3"><h2>this logic should be a separate step
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(14)">../src/torrent_info.cpp:401</a></td><td>this logic should be a separate step done once the torrent is loaded, and the original filenames should be preserved!</td></tr><tr id="14" style="display: none;" colspan="3"><td colspan="3"><h2>this logic should be a separate step
done once the torrent is loaded, and the original
filenames should be preserved!</h2><h4>../src/torrent_info.cpp:401</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
while (*s1 != 0 || *s2 != 0)
@ -1016,7 +810,7 @@ filenames should be preserved!</h2><h4>../src/torrent_info.cpp:401</h4><pre styl
// This is a memory optimization! Instead of having
// each entry keep a string for its filename, make it
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(19)">../src/torrent_info.cpp:437</a></td><td>once the filename renaming is removed from here this check can be removed as well</td></tr><tr id="19" style="display: none;" colspan="3"><td colspan="3"><h2>once the filename renaming is removed from here
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(15)">../src/torrent_info.cpp:437</a></td><td>once the filename renaming is removed from here this check can be removed as well</td></tr><tr id="15" 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:437</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // increase the counter
int cnt = 0;
if (!files.insert(e.path).second)
@ -1068,7 +862,7 @@ this check can be removed as well</h2><h4>../src/torrent_info.cpp:437</h4><pre s
{
TORRENT_ASSERT(leafs &gt; 0);
return (leafs &lt;&lt; 1) - 1;
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(20)">../src/kademlia/node.cpp:793</a></td><td>find_node should write directly to the response entry</td></tr><tr id="20" style="display: none;" colspan="3"><td colspan="3"><h2>find_node should write directly to the response entry</h2><h4>../src/kademlia/node.cpp:793</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/kademlia/node.cpp:797</a></td><td>find_node should write directly to the response entry</td></tr><tr id="16" style="display: none;" colspan="3"><td colspan="3"><h2>find_node should write directly to the response entry</h2><h4>../src/kademlia/node.cpp:797</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
TORRENT_LOG(node) &lt;&lt; " values: " &lt;&lt; reply["values"].list().size();
}
#endif
@ -1119,7 +913,7 @@ this check can be removed as well</h2><h4>../src/torrent_info.cpp:437</h4><pre s
// listen port and instead use the source port of the packet?
if (msg_keys[5] &amp;&amp; msg_keys[5]-&gt;int_value() != 0)
port = m.addr.port();
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(21)">../include/libtorrent/ip_voter.hpp:100</a></td><td>instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.</td></tr><tr id="21" style="display: none;" colspan="3"><td colspan="3"><h2>instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.</h2><h4>../include/libtorrent/ip_voter.hpp:100</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> bloom_filter&lt;32&gt; m_external_address_voters;
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(17)">../include/libtorrent/ip_voter.hpp:100</a></td><td>instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.</td></tr><tr id="17" style="display: none;" colspan="3"><td colspan="3"><h2>instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.</h2><h4>../include/libtorrent/ip_voter.hpp:100</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> bloom_filter&lt;32&gt; m_external_address_voters;
std::vector&lt;external_ip_t&gt; m_external_addresses;
address m_external_address;
};
@ -1146,58 +940,7 @@ this check can be removed as well</h2><h4>../src/torrent_info.cpp:437</h4><pre s
#endif
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(22)">../include/libtorrent/utp_stream.hpp:378</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="22" 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:378</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;
using asio::buffer_size;
add_read_buffer(buffer_cast&lt;void*&gt;(*i), buffer_size(*i));
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
buf_size += buffer_size(*i);
#endif
}
std::size_t ret = read_some(true);
TORRENT_ASSERT(ret &lt;= buf_size);
TORRENT_ASSERT(ret &gt; 0);
return ret;
}
template &lt;class Const_Buffers&gt;
std::size_t write_some(Const_Buffers const&amp; buffers, error_code&amp; ec)
{
TORRENT_ASSERT(false &amp;&amp; "not implemented!");
<div style="background: #ffff00" width="100%"> return 0;
</div> }
#ifndef BOOST_NO_EXCEPTIONS
template &lt;class Mutable_Buffers&gt;
std::size_t read_some(Mutable_Buffers const&amp; buffers)
{
error_code ec;
std::size_t ret = read_some(buffers, ec);
if (ec)
boost::throw_exception(boost::system::system_error(ec));
return ret;
}
template &lt;class Const_Buffers&gt;
std::size_t write_some(Const_Buffers const&amp; buffers)
{
error_code ec;
std::size_t ret = write_some(buffers, ec);
if (ec)
boost::throw_exception(boost::system::system_error(ec));
return ret;
}
#endif
template &lt;class Handler&gt;
void async_write_some(boost::asio::null_buffers const&amp; buffers, Handler const&amp; handler)
{
TORRENT_ASSERT(false);
}
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(23)">../include/libtorrent/web_peer_connection.hpp:126</a></td><td>if we make this be a disk_buffer_holder instead we would save a copy sometimes use allocate_disk_receive_buffer and release_disk_receive_buffer</td></tr><tr id="23" style="display: none;" colspan="3"><td colspan="3"><h2>if we make this be a disk_buffer_holder instead
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(18)">../include/libtorrent/web_peer_connection.hpp:126</a></td><td>if we make this be a disk_buffer_holder instead we would save a copy sometimes use allocate_disk_receive_buffer and release_disk_receive_buffer</td></tr><tr id="18" style="display: none;" colspan="3"><td colspan="3"><h2>if we make this be a disk_buffer_holder instead
we would save a copy sometimes
use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../include/libtorrent/web_peer_connection.hpp:126</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
bool maybe_harvest_block();
@ -1250,7 +993,7 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../incl
};
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(24)">../src/bt_peer_connection.cpp:625</a></td><td>this could be optimized using knuth morris pratt</td></tr><tr id="24" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>../src/bt_peer_connection.cpp:625</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(19)">../src/bt_peer_connection.cpp:625</a></td><td>this could be optimized using knuth morris pratt</td></tr><tr id="19" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>../src/bt_peer_connection.cpp:625</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
disconnect(errors::no_memory);
return;
}
@ -1301,12 +1044,12 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../incl
// }
// no complete sync
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(25)">../src/bt_peer_connection.cpp:2089</a></td><td>if we're finished, send upload_only message</td></tr><tr id="25" style="display: none;" colspan="3"><td colspan="3"><h2>if we're finished, send upload_only message</h2><h4>../src/bt_peer_connection.cpp:2089</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(20)">../src/bt_peer_connection.cpp:2089</a></td><td>if we're finished, send upload_only message</td></tr><tr id="20" style="display: none;" colspan="3"><td colspan="3"><h2>if we're finished, send upload_only message</h2><h4>../src/bt_peer_connection.cpp:2089</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());
#endif
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
#if TORRENT_USE_ASSERTS
m_sent_bitfield = true;
#endif
@ -1352,7 +1095,7 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../incl
std::back_insert_iterator&lt;std::string&gt; out(remote_address);
detail::write_address(remote().address(), out);
handshake["yourip"] = remote_address;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(26)">../src/bt_peer_connection.cpp:3329</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>move the erasing into the loop above
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(21)">../src/bt_peer_connection.cpp:3329</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><tr id="21" style="display: none;" colspan="3"><td colspan="3"><h2>move the erasing into the loop above
remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.cpp:3329</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (std::vector&lt;range&gt;::iterator i = m_payloads.begin();
i != m_payloads.end(); ++i)
{
@ -1404,7 +1147,7 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
TORRENT_ASSERT(m_sent_handshake);
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(27)">../src/file.cpp:1370</a></td><td>is there any way to pre-fetch data from a file on windows?</td></tr><tr id="27" style="display: none;" colspan="3"><td colspan="3"><h2>is there any way to pre-fetch data from a file on windows?</h2><h4>../src/file.cpp:1370</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(22)">../src/file.cpp:1381</a></td><td>is there any way to pre-fetch data from a file on windows?</td></tr><tr id="22" style="display: none;" colspan="3"><td colspan="3"><h2>is there any way to pre-fetch data from a file on windows?</h2><h4>../src/file.cpp:1381</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
void file::init_file()
{
if (m_page_size != 0) return;
@ -1455,7 +1198,7 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
#ifdef TORRENT_DEBUG
if (m_open_mode &amp; no_buffer)
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(28)">../src/http_tracker_connection.cpp:99</a></td><td>support authentication (i.e. user name and password) in the URL</td></tr><tr id="28" 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:99</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , aux::session_impl const&amp; ses
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(23)">../src/http_tracker_connection.cpp:99</a></td><td>support authentication (i.e. user name and password) in the URL</td></tr><tr id="23" 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:99</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , aux::session_impl const&amp; ses
, proxy_settings const&amp; ps
, std::string const&amp; auth
#if TORRENT_USE_I2P
@ -1506,21 +1249,21 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
if (arguments_start != std::string::npos)
url += "&amp;";
else
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(29)">../src/i2p_stream.cpp:204</a></td><td>move this to proxy_base and use it in all proxies</td></tr><tr id="29" style="display: none;" colspan="3"><td colspan="3"><h2>move this to proxy_base and use it in all proxies</h2><h4>../src/i2p_stream.cpp:204</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(24)">../src/i2p_stream.cpp:204</a></td><td>move this to proxy_base and use it in all proxies</td></tr><tr id="24" style="display: none;" colspan="3"><td colspan="3"><h2>move this to proxy_base and use it in all proxies</h2><h4>../src/i2p_stream.cpp:204</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
i2p_stream::i2p_stream(io_service&amp; io_service)
: proxy_base(io_service)
, m_id(0)
, m_command(cmd_create_session)
, m_state(0)
{
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
#if TORRENT_USE_ASSERTS
m_magic = 0x1337;
#endif
}
i2p_stream::~i2p_stream()
{
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
#if TORRENT_USE_ASSERTS
TORRENT_ASSERT(m_magic == 0x1337);
m_magic = 0;
#endif
@ -1557,7 +1300,7 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
void i2p_stream::connected(error_code const&amp; e, boost::shared_ptr&lt;handler_type&gt; h)
{
TORRENT_ASSERT(m_magic == 0x1337);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(30)">../src/packet_buffer.cpp:176</a></td><td>use compare_less_wrap for this comparison as well</td></tr><tr id="30" style="display: none;" colspan="3"><td colspan="3"><h2>use compare_less_wrap for this comparison as well</h2><h4>../src/packet_buffer.cpp:176</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> while (new_size &lt; size)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(25)">../src/packet_buffer.cpp:176</a></td><td>use compare_less_wrap for this comparison as well</td></tr><tr id="25" style="display: none;" colspan="3"><td colspan="3"><h2>use compare_less_wrap for this comparison as well</h2><h4>../src/packet_buffer.cpp:176</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> while (new_size &lt; size)
new_size &lt;&lt;= 1;
void** new_storage = (void**)malloc(sizeof(void*) * new_size);
@ -1608,7 +1351,7 @@ 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(31)">../src/peer_connection.cpp:2733</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="31" 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(26)">../src/peer_connection.cpp:2733</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="26" 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:2733</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
#ifdef TORRENT_VERBOSE_LOGGING
@ -1661,7 +1404,7 @@ we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2733</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(32)">../src/peer_connection.cpp:2864</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="32" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:2864</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(27)">../src/peer_connection.cpp:2864</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="27" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:2864</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
@ -1706,13 +1449,13 @@ we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2733</h4><pr
std::vector&lt;pending_block&gt;::iterator rit = std::find_if(m_request_queue.begin()
, m_request_queue.end(), has_block(block));
if (rit == m_request_queue.end()) return;
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
#if TORRENT_USE_ASSERTS
boost::shared_ptr&lt;torrent&gt; t = m_torrent.lock();
TORRENT_ASSERT(t);
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(33)">../src/peer_connection.cpp:4584</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="33" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(28)">../src/peer_connection.cpp:4584</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="28" 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:4584</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
@ -1764,7 +1507,7 @@ all completed disk operations</h2><h4>../src/peer_connection.cpp:4584</h4><pre s
#endif
write_reject_request(r);
if (t-&gt;seed_mode()) t-&gt;leave_seed_mode(false);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(34)">../src/policy.cpp:857</a></td><td>only allow _one_ connection to use this override at a time</td></tr><tr id="34" style="display: none;" colspan="3"><td colspan="3"><h2>only allow _one_ connection to use this
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(29)">../src/policy.cpp:857</a></td><td>only allow _one_ connection to use this override at a time</td></tr><tr id="29" style="display: none;" colspan="3"><td colspan="3"><h2>only allow _one_ connection to use this
override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> " external: " &lt;&lt; external.external_address(m_peers[candidate]-&gt;address()) &lt;&lt;
" t: " &lt;&lt; (session_time - m_peers[candidate]-&gt;last_connected) &lt;&lt;
" ]\n";
@ -1816,7 +1559,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
{
iter = std::lower_bound(
m_peers.begin(), m_peers.end()
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(35)">../src/policy.cpp:1902</a></td><td>how do we deal with our external address changing? Pass in a force-update maybe? and keep a version number in policy</td></tr><tr id="35" style="display: none;" colspan="3"><td colspan="3"><h2>how do we deal with our external address changing? Pass in a force-update maybe? and keep a version number in policy</h2><h4>../src/policy.cpp:1902</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(30)">../src/policy.cpp:1902</a></td><td>how do we deal with our external address changing? Pass in a force-update maybe? and keep a version number in policy</td></tr><tr id="30" style="display: none;" colspan="3"><td colspan="3"><h2>how do we deal with our external address changing? Pass in a force-update maybe? and keep a version number in policy</h2><h4>../src/policy.cpp:1902</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
, on_parole(false)
, banned(false)
#ifndef TORRENT_DISABLE_DHT
@ -1826,7 +1569,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
, confirmed_supports_utp(false)
, supports_holepunch(false)
, web_seed(false)
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
#if TORRENT_USE_ASSERTS
, in_use(false)
#endif
{
@ -1867,7 +1610,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(36)">../src/session_impl.cpp:1764</a></td><td>recalculate all connect candidates for all torrents</td></tr><tr id="36" style="display: none;" colspan="3"><td colspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>../src/session_impl.cpp:1764</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // #error closing the udp socket here means that
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(31)">../src/session_impl.cpp:1764</a></td><td>recalculate all connect candidates for all torrents</td></tr><tr id="31" style="display: none;" colspan="3"><td colspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>../src/session_impl.cpp:1764</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // #error closing the udp socket here means that
// the uTP connections cannot be closed gracefully
m_udp_socket.close();
m_external_udp_port = 0;
@ -1918,7 +1661,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
template &lt;class Socket&gt;
void static set_socket_buffer_size(Socket&amp; s, session_settings const&amp; sett, error_code&amp; ec)
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(37)">../src/session_impl.cpp:3227</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="37" 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:3227</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(32)">../src/session_impl.cpp:3227</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="32" 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:3227</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)
{
@ -1969,20 +1712,20 @@ 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(38)">../src/session_impl.cpp:4317</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="38" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4317</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(33)">../src/session_impl.cpp:4307</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="33" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4307</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (t-&gt;is_auto_managed() &amp;&amp; !t-&gt;has_error())
{
TORRENT_ASSERT(t-&gt;m_resume_data_loaded || !t-&gt;valid_metadata());
// this torrent is auto managed, add it to
// the list (depending on if it's a seed or not)
if (t-&gt;is_finished())
seeds.push_back(t);
else
downloaders.push_back(t);
}
else if (!t-&gt;is_paused())
{
TORRENT_ASSERT(t-&gt;m_resume_data_loaded || !t-&gt;valid_metadata());
--hard_limit;
if (is_active(t, settings()))
{
// this is not an auto managed torrent,
// if it's running and active, decrease the
// counters.
if (t-&gt;is_finished())
--num_seeds;
else
--num_downloaders;
}
}
}
@ -2020,9 +1763,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(39)">../src/session_impl.cpp:4473</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="39" 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(34)">../src/session_impl.cpp:4463</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="34" 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:4473</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
connections</h2><h4>../src/session_impl.cpp:4463</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
if (m_boost_connections &gt; max_connections)
{
m_boost_connections -= max_connections;
@ -2073,7 +1816,7 @@ connections</h2><h4>../src/session_impl.cpp:4473</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(40)">../src/session_impl.cpp:4507</a></td><td>make this bias configurable</td></tr><tr id="40" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>../src/session_impl.cpp:4507</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(41)">../src/session_impl.cpp:4508</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="41" 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:4508</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(35)">../src/session_impl.cpp:4497</a></td><td>make this bias configurable</td></tr><tr id="35" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>../src/session_impl.cpp:4497</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(36)">../src/session_impl.cpp:4498</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="36" 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:4498</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();
@ -2124,7 +1867,7 @@ connections</h2><h4>../src/session_impl.cpp:4473</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(42)">../src/session_impl.cpp:4652</a></td><td>make configurable</td></tr><tr id="42" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4652</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(37)">../src/session_impl.cpp:4642</a></td><td>make configurable</td></tr><tr id="37" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4642</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)
@ -2157,7 +1900,7 @@ connections</h2><h4>../src/session_impl.cpp:4473</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(43)">../src/session_impl.cpp:4666</a></td><td>make configurable</td></tr><tr id="43" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4666</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(38)">../src/session_impl.cpp:4656</a></td><td>make configurable</td></tr><tr id="38" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4656</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;
@ -2208,7 +1951,7 @@ connections</h2><h4>../src/session_impl.cpp:4473</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(44)">../src/storage.cpp:324</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="44" 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();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(39)">../src/storage.cpp:324</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="39" 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;
@ -2259,7 +2002,7 @@ connections</h2><h4>../src/session_impl.cpp:4473</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(45)">../src/storage.cpp:358</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="45" 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;"> {
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(40)">../src/storage.cpp:358</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="40" 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;
}
@ -2310,7 +2053,7 @@ connections</h2><h4>../src/session_impl.cpp:4473</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(46)">../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="46" 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(41)">../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="41" 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:629</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (;;)
{
@ -2363,9 +2106,9 @@ 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(47)">../src/storage.cpp:1246</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="47" 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(42)">../src/storage.cpp:1263</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="42" 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:1246</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:1263</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
@ -2377,7 +2120,7 @@ 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
if ((op.mode &amp; file::rw_mask) != file::read_only
&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))
{
@ -2416,12 +2159,12 @@ if file_base is used. This is not a widely used feature though</h2><h4>../src/st
// makes unaligned requests (and the disk cache is disabled or fully utilized
// for write cache).
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(48)">../src/torrent.cpp:1245</a></td><td>is verify_peer_cert called once per certificate in the chain, and this function just tells us which depth we're at right now? If so, the comment makes sense. any certificate that isn't the leaf (i.e. the one presented by the peer) should be accepted automatically, given preverified is true. The leaf certificate need to be verified to make sure its DN matches the info-hash</td></tr><tr id="48" style="display: none;" colspan="3"><td colspan="3"><h2>is verify_peer_cert called once per certificate in the chain, and
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(43)">../src/torrent.cpp:1246</a></td><td>is verify_peer_cert called once per certificate in the chain, and this function just tells us which depth we're at right now? If so, the comment makes sense. any certificate that isn't the leaf (i.e. the one presented by the peer) should be accepted automatically, given preverified is true. The leaf certificate need to be verified to make sure its DN matches the info-hash</td></tr><tr id="43" style="display: none;" colspan="3"><td colspan="3"><h2>is verify_peer_cert called once per certificate in the chain, and
this function just tells us which depth we're at right now? If so, the comment
makes sense.
any certificate that isn't the leaf (i.e. the one presented by the peer)
should be accepted automatically, given preverified is true. The leaf certificate
need to be verified to make sure its DN matches the info-hash</h2><h4>../src/torrent.cpp:1245</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (pp) p-&gt;add_extension(pp);
need to be verified to make sure its DN matches the info-hash</h2><h4>../src/torrent.cpp:1246</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (pp) p-&gt;add_extension(pp);
}
// if files are checked for this torrent, call the extension
@ -2472,12 +2215,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(49)">../src/torrent.cpp:5063</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="49" 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(44)">../src/torrent.cpp:5085</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="44" 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:5063</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:5085</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);
@ -2528,12 +2271,12 @@ which are kept in sync</h2><h4>../src/torrent.cpp:5063</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(50)">../src/torrent.cpp:5199</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="50" 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(45)">../src/torrent.cpp:5221</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="45" 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:5199</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:5221</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
}
}
@ -2558,7 +2301,7 @@ no one uses merkle torrents</h2><h4>../src/torrent.cpp:5199</h4><pre style="back
}
}
boost::intrusive_ptr&lt;torrent_info&gt; torrent::get_torrent_copy()
boost::intrusive_ptr&lt;torrent_info const&gt; torrent::get_torrent_copy()
{
if (!m_torrent_file-&gt;is_valid()) return boost::intrusive_ptr&lt;torrent_info&gt;();
@ -2584,9 +2327,9 @@ no one uses merkle torrents</h2><h4>../src/torrent.cpp:5199</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(51)">../src/torrent.cpp:5387</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="51" 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(46)">../src/torrent.cpp:5409</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="46" 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:5387</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:5409</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())
{
@ -2637,10 +2380,10 @@ using file_base</h2><h4>../src/torrent.cpp:5387</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(52)">../src/torrent.cpp:7937</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="52" 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(47)">../src/torrent.cpp:7962</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="47" 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:7937</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:7962</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
rarest_pieces.clear();
rarest_rarity = pp.peer_count;
@ -2691,7 +2434,7 @@ it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:7
{
m_picker-&gt;get_availability(avail_vec);
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(53)">../src/udp_tracker_connection.cpp:550</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="53" style="display: none;" colspan="3"><td colspan="3"><h2>it would be more efficient to not use a string here.
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(48)">../src/udp_tracker_connection.cpp:550</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="48" 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:550</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
@ -2744,11 +2487,11 @@ with actual strings. For example i2p trackers</h2><h4>../src/udp_tracker_connect
{
restart_read_timeout();
int action = detail::read_int32(buf);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(54)">../src/utp_stream.cpp:1581</a></td><td>this loop may not be very efficient</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1581</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(p-&gt;header_size &gt;= sizeof(utp_header) + sack_size + 2);
memmove(ptr, ptr + sack_size + 2, p-&gt;size - p-&gt;header_size);
p-&gt;header_size -= sack_size + 2;
p-&gt;size -= sack_size + 2;
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(49)">../src/utp_stream.cpp:1604</a></td><td>this loop may not be very efficient</td></tr><tr id="49" style="display: none;" colspan="3"><td colspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1604</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
private:
char* m_buf;
};
// sends a packet, pulls data from the write buffer (if there's any)
// if ack is true, we need to send a packet regardless of if there's
@ -2795,7 +2538,7 @@ bool utp_socket_impl::send_pkt(int flags)
if (sack &gt; 32) sack = 32;
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(55)">../src/kademlia/routing_table.cpp:293</a></td><td>instad of refreshing a bucket by using find_nodes, ping each node periodically</td></tr><tr id="55" style="display: none;" colspan="3"><td colspan="3"><h2>instad of refreshing a bucket by using find_nodes,
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(50)">../src/kademlia/routing_table.cpp:293</a></td><td>instad of refreshing a bucket by using find_nodes, ping each node periodically</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>instad of refreshing a bucket by using find_nodes,
ping each node periodically</h2><h4>../src/kademlia/routing_table.cpp:293</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> os &lt;&lt; "]\n";
}
}
@ -2847,7 +2590,7 @@ bool compare_bucket_refresh(routing_table_node const&amp; lhs, routing_table_nod
node_id mask = generate_prefix_mask(num_bits);
// target = (target &amp; ~mask) | (root &amp; mask)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(56)">../include/libtorrent/config.hpp:326</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>Make this count Unicode characters instead of bytes on windows</h2><h4>../include/libtorrent/config.hpp:326</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)">../include/libtorrent/config.hpp:326</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="51" style="display: none;" colspan="3"><td colspan="3"><h2>Make this count Unicode characters instead of bytes on windows</h2><h4>../include/libtorrent/config.hpp:326</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// ==== eCS(OS/2) ===
#elif defined __OS2__
#define TORRENT_OS2
@ -2898,7 +2641,7 @@ bool compare_bucket_refresh(routing_table_node const&amp; lhs, routing_table_nod
#include &lt;stdarg.h&gt;
// internal
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(57)">../include/libtorrent/peer_connection.hpp:729</a></td><td>make this private</td></tr><tr id="57" style="display: none;" colspan="3"><td colspan="3"><h2>make this private</h2><h4>../include/libtorrent/peer_connection.hpp:729</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void set_soft_packet_size(int size) { m_soft_packet_size = size; }
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(52)">../include/libtorrent/peer_connection.hpp:729</a></td><td>make this private</td></tr><tr id="52" style="display: none;" colspan="3"><td colspan="3"><h2>make this private</h2><h4>../include/libtorrent/peer_connection.hpp:729</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void set_soft_packet_size(int size) { m_soft_packet_size = size; }
// if allow_encrypted is false, and the torrent 'ih' turns out
// to be an encrypted torrent (AES-256 encrypted) the peer will
@ -2949,7 +2692,7 @@ bool compare_bucket_refresh(routing_table_node const&amp; lhs, routing_table_nod
// we have choked the upload to the peer
bool m_choked:1;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(58)">../include/libtorrent/peer_connection.hpp:810</a></td><td>make these private as well</td></tr><tr id="58" style="display: none;" colspan="3"><td colspan="3"><h2>make these private as well</h2><h4>../include/libtorrent/peer_connection.hpp:810</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(53)">../include/libtorrent/peer_connection.hpp:810</a></td><td>make these private as well</td></tr><tr id="53" style="display: none;" colspan="3"><td colspan="3"><h2>make these private as well</h2><h4>../include/libtorrent/peer_connection.hpp:810</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// when this is set, the peer_connection socket is
// corked, similar to the linux TCP feature TCP_CORK.
// we won't send anything to the actual socket, just
@ -3000,7 +2743,7 @@ bool compare_bucket_refresh(routing_table_node const&amp; lhs, routing_table_nod
sliding_average&lt;20&gt; m_send_rate;
private:
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(59)">../include/libtorrent/proxy_base.hpp:166</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="59" 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(54)">../include/libtorrent/proxy_base.hpp:166</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="54" 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:166</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
return m_sock.get_option(opt, ec);
}
@ -3052,7 +2795,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</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(60)">../include/libtorrent/stat.hpp:113</a></td><td>this is 4 bytes of padding!</td></tr><tr id="60" style="display: none;" colspan="3"><td colspan="3"><h2>this is 4 bytes of padding!</h2><h4>../include/libtorrent/stat.hpp:113</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(55)">../include/libtorrent/stat.hpp:113</a></td><td>this is 4 bytes of padding!</td></tr><tr id="55" style="display: none;" colspan="3"><td colspan="3"><h2>this is 4 bytes of padding!</h2><h4>../include/libtorrent/stat.hpp:113</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
int counter() const { return m_counter; }
void clear()
@ -3103,10 +2846,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
#endif
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(61)">../include/libtorrent/torrent.hpp:1349</a></td><td>there's space for another 2 bits here</td></tr><tr id="61" style="display: none;" colspan="3"><td colspan="3"><h2>there's space for another 2 bits here</h2><h4>../include/libtorrent/torrent.hpp:1349</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // session_impl's m_state_update list, this bit is set
// to never add the same torrent twice
bool m_in_state_updates:1;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(56)">../include/libtorrent/torrent.hpp:1351</a></td><td>there's space for another bit here</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>there's space for another bit here</h2><h4>../include/libtorrent/torrent.hpp:1351</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// these represent whether or not this torrent is counted
// in the total counters of active seeds and downloads
// in the session.
@ -3123,6 +2863,9 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
// more blocks to disk!
bool m_deleted:1;
// set to true while moving the storage
bool m_moving_storage:1;
<div style="background: #ffff00" width="100%">
</div>// ----
@ -3154,7 +2897,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
// if this is true, libtorrent may pause and resume
// this torrent depending on queuing rules. Torrents
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(62)">../include/libtorrent/torrent_info.hpp:123</a></td><td>include the number of peers received from this tracker, at last announce</td></tr><tr id="62" 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:123</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(57)">../include/libtorrent/torrent_info.hpp:123</a></td><td>include the number of peers received from this tracker, at last announce</td></tr><tr id="57" 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:123</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;
@ -3205,7 +2948,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
// 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(63)">../include/libtorrent/upnp.hpp:121</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="63" 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:121</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(58)">../include/libtorrent/upnp.hpp:121</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="58" 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:121</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
virtual const char* name() const BOOST_SYSTEM_NOEXCEPT;
virtual std::string message(int ev) const BOOST_SYSTEM_NOEXCEPT;
virtual boost::system::error_condition default_error_condition(int ev) const BOOST_SYSTEM_NOEXCEPT
@ -3256,4 +2999,55 @@ 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(59)">../include/libtorrent/utp_stream.hpp:378</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="59" 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:378</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;
using asio::buffer_size;
add_read_buffer(buffer_cast&lt;void*&gt;(*i), buffer_size(*i));
#if TORRENT_USE_ASSERTS
buf_size += buffer_size(*i);
#endif
}
std::size_t ret = read_some(true);
TORRENT_ASSERT(ret &lt;= buf_size);
TORRENT_ASSERT(ret &gt; 0);
return ret;
}
template &lt;class Const_Buffers&gt;
std::size_t write_some(Const_Buffers const&amp; buffers, error_code&amp; ec)
{
TORRENT_ASSERT(false &amp;&amp; "not implemented!");
<div style="background: #ffff00" width="100%"> return 0;
</div> }
#ifndef BOOST_NO_EXCEPTIONS
template &lt;class Mutable_Buffers&gt;
std::size_t read_some(Mutable_Buffers const&amp; buffers)
{
error_code ec;
std::size_t ret = read_some(buffers, ec);
if (ec)
boost::throw_exception(boost::system::system_error(ec));
return ret;
}
template &lt;class Const_Buffers&gt;
std::size_t write_some(Const_Buffers const&amp; buffers)
{
error_code ec;
std::size_t ret = write_some(buffers, ec);
if (ec)
boost::throw_exception(boost::system::system_error(ec));
return ret;
}
#endif
template &lt;class Handler&gt;
void async_write_some(boost::asio::null_buffers const&amp; buffers, Handler const&amp; handler)
{
TORRENT_ASSERT(false);
}
</pre></td></tr></table></body></html>

View File

@ -375,7 +375,7 @@ public:
std::size_t write_some(Const_Buffers const& buffers, error_code& ec)
{
TORRENT_ASSERT(false && "not implemented!");
// TODO: 1 implement blocking write. Low priority since it's not used (yet)
// TODO: implement blocking write. Low priority since it's not used (yet)
return 0;
}