|
|
|
@ -24,7 +24,7 @@
|
|
|
|
|
<span style="color: #f77">4 important</span>
|
|
|
|
|
<span style="color: #3c3">5 relevant</span>
|
|
|
|
|
<span style="color: #77f">15 feasible</span>
|
|
|
|
|
<span style="color: #999">37 notes</span>
|
|
|
|
|
<span style="color: #999">36 notes</span>
|
|
|
|
|
<table width="100%" border="1" style="border-collapse: collapse;"><tr style="background: #fdd"><td>relevance 4</td><td><a href="javascript:expand(0)">../src/session_impl.cpp:667</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
|
|
|
|
@ -80,7 +80,7 @@ do as well with NATs)</h2><h4>../src/session_impl.cpp:667</h4><pre style="backgr
|
|
|
|
|
memset(m_redundant_bytes, 0, sizeof(m_redundant_bytes));
|
|
|
|
|
m_udp_socket.set_rate_limit(m_settings.dht_upload_rate_limit);
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(1)">../src/torrent.cpp:6176</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="1" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it</h2><h4>../src/torrent.cpp:6176</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
|
|
|
|
|
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(1)">../src/torrent.cpp:6182</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="1" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it</h2><h4>../src/torrent.cpp:6182</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
|
|
|
|
|
}
|
|
|
|
|
TORRENT_ASSERT(m_connections.find(p) == m_connections.end());
|
|
|
|
|
m_connections.insert(p);
|
|
|
|
@ -287,7 +287,7 @@ protected:
|
|
|
|
|
nodes_callback m_nodes_callback;
|
|
|
|
|
std::map<node_id, std::string> m_write_tokens;
|
|
|
|
|
node_id const m_target;
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(5)">../src/torrent.cpp:8358</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:8358</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (added_request)
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(5)">../src/torrent.cpp:8369</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:8369</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (added_request)
|
|
|
|
|
{
|
|
|
|
|
peers_with_requests.insert(peers_with_requests.begin(), &c);
|
|
|
|
|
if (i->first_requested == min_time()) i->first_requested = now;
|
|
|
|
@ -805,11 +805,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 >= 0);
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(15)">../src/torrent.cpp:1161</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="15" 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 1</td><td><a href="javascript:expand(15)">../src/torrent.cpp:1158</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="15" 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:1161</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (c) c->disconnect(errors::no_memory);
|
|
|
|
|
up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1158</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (c) c->disconnect(errors::no_memory);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -860,8 +860,8 @@ up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1161</h4
|
|
|
|
|
int size = m_torrent_file->piece_size(r.piece);
|
|
|
|
|
if (rp->fail)
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(16)">../src/torrent.cpp:5438</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="16" 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:5438</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> ? (1 << k) : 0;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(16)">../src/torrent.cpp:5444</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="16" 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:5444</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> ? (1 << k) : 0;
|
|
|
|
|
bitmask.append(1, v);
|
|
|
|
|
TORRENT_ASSERT(bits == 8 || j == num_bitmask_bytes - 1);
|
|
|
|
|
}
|
|
|
|
@ -912,9 +912,9 @@ it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:5438</h4
|
|
|
|
|
|
|
|
|
|
// write have bitmask
|
|
|
|
|
// the pieces string has one byte per piece. Each
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(17)">../src/torrent.cpp:6344</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="17" 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 1</td><td><a href="javascript:expand(17)">../src/torrent.cpp:6350</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="17" 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:6344</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(m_state != torrent_status::finished && m_state != torrent_status::seeding);
|
|
|
|
|
for all peers though</h2><h4>../src/torrent.cpp:6350</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(m_state != torrent_status::finished && m_state != torrent_status::seeding);
|
|
|
|
|
|
|
|
|
|
set_state(torrent_status::finished);
|
|
|
|
|
set_queue_position(-1);
|
|
|
|
@ -1300,14 +1300,14 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../incl
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(25)">../src/bt_peer_connection.cpp:662</a></td><td>this could be optimized using knuth morris pratt</td></tr><tr id="25" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>../src/bt_peer_connection.cpp:662</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_encrypted && m_rc4_encrypted)
|
|
|
|
|
{
|
|
|
|
|
fun = encrypt;
|
|
|
|
|
userdata = m_enc_handler.get();
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(25)">../src/bt_peer_connection.cpp:617</a></td><td>this could be optimized using knuth morris pratt</td></tr><tr id="25" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>../src/bt_peer_connection.cpp:617</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
disconnect(errors::no_memory);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#ifdef TORRENT_VERBOSE_LOGGING
|
|
|
|
|
peer_log(" computed RC4 keys");
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
peer_connection::send_buffer(buf, size, flags, fun, userdata);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int bt_peer_connection::get_syncoffset(char const* src, int src_size,
|
|
|
|
@ -1351,7 +1351,7 @@ 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 0</td><td><a href="javascript:expand(26)">../src/bt_peer_connection.cpp:2081</a></td><td>if we're finished, send upload_only message</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>if we're finished, send upload_only message</h2><h4>../src/bt_peer_connection.cpp:2081</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (msg[5 + k / 8] & (0x80 >> (k % 8))) bitfield_string[k] = '1';
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(26)">../src/bt_peer_connection.cpp:2083</a></td><td>if we're finished, send upload_only message</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>if we're finished, send upload_only message</h2><h4>../src/bt_peer_connection.cpp:2083</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (msg[5 + k / 8] & (0x80 >> (k % 8))) bitfield_string[k] = '1';
|
|
|
|
|
else bitfield_string[k] = '0';
|
|
|
|
|
}
|
|
|
|
|
peer_log("==> BITFIELD [ %s ]", bitfield_string.c_str());
|
|
|
|
@ -1402,8 +1402,8 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../incl
|
|
|
|
|
std::back_insert_iterator<std::string> out(remote_address);
|
|
|
|
|
detail::write_address(remote().address(), out);
|
|
|
|
|
handshake["yourip"] = remote_address;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(27)">../src/bt_peer_connection.cpp:3323</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><tr id="27" 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:3323</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (std::vector<range>::iterator i = m_payloads.begin();
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(27)">../src/bt_peer_connection.cpp:3325</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><tr id="27" 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:3325</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (std::vector<range>::iterator i = m_payloads.begin();
|
|
|
|
|
i != m_payloads.end(); ++i)
|
|
|
|
|
{
|
|
|
|
|
i->start -= bytes_transferred;
|
|
|
|
@ -1814,58 +1814,7 @@ all completed disk operations</h2><h4>../src/peer_connection.cpp:4577</h4><pre s
|
|
|
|
|
#endif
|
|
|
|
|
write_reject_request(r);
|
|
|
|
|
if (t->seed_mode()) t->leave_seed_mode(false);
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(35)">../src/peer_connection.cpp:5747</a></td><td>why does this invariant not hold?</td></tr><tr id="35" style="display: none;" colspan="3"><td colspan="3"><h2>why does this invariant not hold?</h2><h4>../src/peer_connection.cpp:5747</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
peer_count_t(): num_peers(0), num_peers_with_timeouts(0), num_peers_with_nowant(0), num_not_requested(0) {}
|
|
|
|
|
int num_peers;
|
|
|
|
|
int num_peers_with_timeouts;
|
|
|
|
|
int num_peers_with_nowant;
|
|
|
|
|
int num_not_requested;
|
|
|
|
|
// std::vector<peer_connection const*> peers;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
void peer_connection::check_invariant() const
|
|
|
|
|
{
|
|
|
|
|
TORRENT_ASSERT(m_in_use == 1337);
|
|
|
|
|
TORRENT_ASSERT(m_queued_time_critical <= int(m_request_queue.size()));
|
|
|
|
|
TORRENT_ASSERT(m_accept_fast.size() == m_accept_fast_piece_cnt.size());
|
|
|
|
|
|
|
|
|
|
TORRENT_ASSERT(bool(m_disk_recv_buffer) == (m_disk_recv_buffer_size > 0));
|
|
|
|
|
|
|
|
|
|
TORRENT_ASSERT(m_upload_limit >= 0);
|
|
|
|
|
TORRENT_ASSERT(m_download_limit >= 0);
|
|
|
|
|
|
|
|
|
|
<div style="background: #ffff00" width="100%">/*
|
|
|
|
|
</div> if (m_channel_state[upload_channel] & peer_info::bw_limit)
|
|
|
|
|
TORRENT_ASSERT(m_ses.m_upload_rate.is_queued(this));
|
|
|
|
|
if (m_channel_state[download_channel] & peer_info::bw_limit)
|
|
|
|
|
TORRENT_ASSERT(m_ses.m_download_rate.is_queued(this));
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
boost::shared_ptr<torrent> t = m_torrent.lock();
|
|
|
|
|
|
|
|
|
|
if (!m_disconnect_started && m_initialized)
|
|
|
|
|
{
|
|
|
|
|
// none of this matters if we're disconnecting anyway
|
|
|
|
|
if (t->is_finished())
|
|
|
|
|
TORRENT_ASSERT(!is_interesting());
|
|
|
|
|
if (is_seed())
|
|
|
|
|
TORRENT_ASSERT(upload_only());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (m_disconnecting)
|
|
|
|
|
{
|
|
|
|
|
TORRENT_ASSERT(m_download_queue.empty());
|
|
|
|
|
TORRENT_ASSERT(m_request_queue.empty());
|
|
|
|
|
TORRENT_ASSERT(!t);
|
|
|
|
|
TORRENT_ASSERT(m_disconnect_started);
|
|
|
|
|
}
|
|
|
|
|
else if (!m_in_constructor)
|
|
|
|
|
{
|
|
|
|
|
TORRENT_ASSERT(m_ses.has_peer((peer_connection*)this));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
TORRENT_ASSERT(m_outstanding_bytes >= 0);
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(36)">../src/policy.cpp:857</a></td><td>only allow _one_ connection to use this override at a time</td></tr><tr id="36" 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 0</td><td><a href="javascript:expand(35)">../src/policy.cpp:857</a></td><td>only allow _one_ connection to use this override at a time</td></tr><tr id="35" 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: " << external.external_address(m_peers[candidate]->address()) <<
|
|
|
|
|
" t: " << (session_time - m_peers[candidate]->last_connected) <<
|
|
|
|
|
" ]\n";
|
|
|
|
@ -1917,7 +1866,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 0</td><td><a href="javascript:expand(37)">../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="37" 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 0</td><td><a href="javascript:expand(36)">../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="36" 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
|
|
|
|
@ -1968,7 +1917,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
|
|
|
|
|
{
|
|
|
|
|
return size_type(prev_amount_upload) << 10;
|
|
|
|
|
}
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(38)">../src/session_impl.cpp:1943</a></td><td>recalculate all connect candidates for all torrents</td></tr><tr id="38" style="display: none;" colspan="3"><td colspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>../src/session_impl.cpp:1943</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_upload_rate.close();
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(37)">../src/session_impl.cpp:1943</a></td><td>recalculate all connect candidates for all torrents</td></tr><tr id="37" style="display: none;" colspan="3"><td colspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>../src/session_impl.cpp:1943</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_upload_rate.close();
|
|
|
|
|
|
|
|
|
|
// #error closing the udp socket here means that
|
|
|
|
|
// the uTP connections cannot be closed gracefully
|
|
|
|
@ -2019,7 +1968,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
|
|
|
|
|
template <class Socket>
|
|
|
|
|
void static set_socket_buffer_size(Socket& s, session_settings const& sett, error_code& ec)
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(39)">../src/session_impl.cpp:3394</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="39" 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:3394</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // --------------------------------------------------------------
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(38)">../src/session_impl.cpp:3394</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="38" 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:3394</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // --------------------------------------------------------------
|
|
|
|
|
if (!m_paused) m_auto_manage_time_scaler--;
|
|
|
|
|
if (m_auto_manage_time_scaler < 0)
|
|
|
|
|
{
|
|
|
|
@ -2070,7 +2019,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
|
|
|
|
|
TORRENT_ASSERT(!t.is_aborted());
|
|
|
|
|
if (t.statistics().upload_rate() * 11 / 10 > t.upload_limit())
|
|
|
|
|
++congested_torrents;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(40)">../src/session_impl.cpp:4484</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="40" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4484</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> else if (!t->is_paused())
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(39)">../src/session_impl.cpp:4484</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4484</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> else if (!t->is_paused())
|
|
|
|
|
{
|
|
|
|
|
TORRENT_ASSERT(t->m_resume_data_loaded || !t->valid_metadata());
|
|
|
|
|
--hard_limit;
|
|
|
|
@ -2121,7 +2070,7 @@ 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 0</td><td><a href="javascript:expand(41)">../src/session_impl.cpp:4640</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="41" 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 0</td><td><a href="javascript:expand(40)">../src/session_impl.cpp:4640</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="40" 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:4640</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
if (m_boost_connections > max_connections)
|
|
|
|
@ -2174,7 +2123,7 @@ connections</h2><h4>../src/session_impl.cpp:4640</h4><pre style="background: #f6
|
|
|
|
|
int num_attempts = 1;
|
|
|
|
|
if (!t.is_finished())
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(42)">../src/session_impl.cpp:4674</a></td><td>make this bias configurable</td></tr><tr id="42" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>../src/session_impl.cpp:4674</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(43)">../src/session_impl.cpp:4675</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="43" 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:4675</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 0</td><td><a href="javascript:expand(41)">../src/session_impl.cpp:4674</a></td><td>make this bias configurable</td></tr><tr id="41" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>../src/session_impl.cpp:4674</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(42)">../src/session_impl.cpp:4675</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="42" 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:4675</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();
|
|
|
|
@ -2225,7 +2174,7 @@ connections</h2><h4>../src/session_impl.cpp:4640</h4><pre style="background: #f6
|
|
|
|
|
if (max_connections == 0) return;
|
|
|
|
|
if (num_connections() >= m_settings.connections_limit) return;
|
|
|
|
|
}
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(44)">../src/session_impl.cpp:4819</a></td><td>make configurable</td></tr><tr id="44" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4819</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(43)">../src/session_impl.cpp:4819</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:4819</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
#ifdef TORRENT_DEBUG
|
|
|
|
|
for (std::vector<peer_connection*>::const_iterator i = peers.begin()
|
|
|
|
|
, end(peers.end()), prev(peers.end()); i != end; ++i)
|
|
|
|
@ -2258,7 +2207,7 @@ connections</h2><h4>../src/session_impl.cpp:4640</h4><pre style="background: #f6
|
|
|
|
|
|
|
|
|
|
++m_allowed_upload_slots;
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(45)">../src/session_impl.cpp:4833</a></td><td>make configurable</td></tr><tr id="45" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4833</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> >= (*i)->uploaded_in_last_round() * 1000
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(44)">../src/session_impl.cpp:4833</a></td><td>make configurable</td></tr><tr id="44" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4833</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> >= (*i)->uploaded_in_last_round() * 1000
|
|
|
|
|
* (1 + t2->priority()) / total_milliseconds(unchoke_interval));
|
|
|
|
|
}
|
|
|
|
|
prev = i;
|
|
|
|
@ -2309,7 +2258,7 @@ connections</h2><h4>../src/session_impl.cpp:4640</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 0</td><td><a href="javascript:expand(46)">../src/storage.cpp:324</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="46" 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->disk_pool()) block_size = m_storage->disk_pool()->block_size();
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(45)">../src/storage.cpp:324</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:324</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_storage->disk_pool()) block_size = m_storage->disk_pool()->block_size();
|
|
|
|
|
int size = slot_size;
|
|
|
|
|
int num_blocks = (size + block_size - 1) / block_size;
|
|
|
|
|
|
|
|
|
@ -2360,7 +2309,7 @@ connections</h2><h4>../src/session_impl.cpp:4640</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 0</td><td><a href="javascript:expand(47)">../src/storage.cpp:358</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="47" 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 0</td><td><a href="javascript:expand(46)">../src/storage.cpp:358</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="46" 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;
|
|
|
|
|
}
|
|
|
|
@ -2411,7 +2360,7 @@ connections</h2><h4>../src/session_impl.cpp:4640</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 0</td><td><a href="javascript:expand(48)">../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="48" 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 0</td><td><a href="javascript:expand(47)">../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="47" 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 (;;)
|
|
|
|
|
{
|
|
|
|
@ -2464,7 +2413,7 @@ maybe use the same format as .torrent files and reuse some code from torrent_inf
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < file_sizes_ent->list_size(); ++i)
|
|
|
|
|
{
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(49)">../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="49" 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 0</td><td><a href="javascript:expand(48)">../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="48" 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 the file is opened in no_buffer mode, and the
|
|
|
|
@ -2517,12 +2466,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 0</td><td><a href="javascript:expand(50)">../src/torrent.cpp:1362</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="50" 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 0</td><td><a href="javascript:expand(49)">../src/torrent.cpp:1359</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="49" 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:1362</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (pp) p->add_extension(pp);
|
|
|
|
|
need to be verified to make sure its DN matches the info-hash</h2><h4>../src/torrent.cpp:1359</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (pp) p->add_extension(pp);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if files are checked for this torrent, call the extension
|
|
|
|
@ -2573,12 +2522,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 0</td><td><a href="javascript:expand(51)">../src/torrent.cpp:5171</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="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 0</td><td><a href="javascript:expand(50)">../src/torrent.cpp:5177</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="50" 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:5171</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_seed_mode) m_verified.resize(m_torrent_file->num_pieces(), false);
|
|
|
|
|
which are kept in sync</h2><h4>../src/torrent.cpp:5177</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_seed_mode) m_verified.resize(m_torrent_file->num_pieces(), false);
|
|
|
|
|
super_seeding(rd.dict_find_int_value("super_seeding", 0));
|
|
|
|
|
|
|
|
|
|
m_last_scrape = rd.dict_find_int_value("last_scrape", 0);
|
|
|
|
@ -2629,12 +2578,12 @@ which are kept in sync</h2><h4>../src/torrent.cpp:5171</h4><pre style="backgroun
|
|
|
|
|
{
|
|
|
|
|
char const* p = piece_priority->string_ptr();
|
|
|
|
|
for (int i = 0; i < piece_priority->string_length(); ++i)
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(52)">../src/torrent.cpp:5307</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="52" 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 0</td><td><a href="javascript:expand(51)">../src/torrent.cpp:5313</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="51" 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:5307</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:5313</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2685,9 +2634,9 @@ no one uses merkle torrents</h2><h4>../src/torrent.cpp:5307</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 0</td><td><a href="javascript:expand(53)">../src/torrent.cpp:5495</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="53" 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 0</td><td><a href="javascript:expand(52)">../src/torrent.cpp:5501</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="52" 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:5495</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> entry::string_type& pieces = ret["pieces"].string();
|
|
|
|
|
using file_base</h2><h4>../src/torrent.cpp:5501</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> entry::string_type& pieces = ret["pieces"].string();
|
|
|
|
|
pieces.resize(m_torrent_file->num_pieces());
|
|
|
|
|
if (is_seed())
|
|
|
|
|
{
|
|
|
|
@ -2738,10 +2687,10 @@ using file_base</h2><h4>../src/torrent.cpp:5495</h4><pre style="background: #f6f
|
|
|
|
|
error_code ec;
|
|
|
|
|
policy::peer const* p = *i;
|
|
|
|
|
address addr = p->address();
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(54)">../src/torrent.cpp:8037</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="54" 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 0</td><td><a href="javascript:expand(53)">../src/torrent.cpp:8048</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="53" 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:8037</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:8048</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
|
|
|
|
|
|
|
|
|
rarest_pieces.clear();
|
|
|
|
|
rarest_rarity = pp.peer_count;
|
|
|
|
@ -2792,7 +2741,7 @@ it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:8
|
|
|
|
|
{
|
|
|
|
|
m_picker->get_availability(avail_vec);
|
|
|
|
|
}
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(55)">../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="55" 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 0</td><td><a href="javascript:expand(54)">../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="54" 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;"> }
|
|
|
|
|
|
|
|
|
@ -2845,7 +2794,7 @@ 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 0</td><td><a href="javascript:expand(56)">../src/utp_stream.cpp:1573</a></td><td>this loop may not be very efficient</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1573</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(p->header_size >= sizeof(utp_header) + sack_size + 2);
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(55)">../src/utp_stream.cpp:1573</a></td><td>this loop may not be very efficient</td></tr><tr id="55" style="display: none;" colspan="3"><td colspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1573</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(p->header_size >= sizeof(utp_header) + sack_size + 2);
|
|
|
|
|
memmove(ptr, ptr + sack_size + 2, p->size - p->header_size);
|
|
|
|
|
p->header_size -= sack_size + 2;
|
|
|
|
|
p->size -= sack_size + 2;
|
|
|
|
@ -2896,7 +2845,7 @@ bool utp_socket_impl::send_pkt(int flags)
|
|
|
|
|
if (sack > 32) sack = 32;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(57)">../src/kademlia/routing_table.cpp:280</a></td><td>instad of refreshing a bucket by using find_nodes, ping each node periodically</td></tr><tr id="57" 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 0</td><td><a href="javascript:expand(56)">../src/kademlia/routing_table.cpp:280</a></td><td>instad of refreshing a bucket by using find_nodes, ping each node periodically</td></tr><tr id="56" 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:280</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> os << "]\n";
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
@ -2948,7 +2897,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
|
|
|
|
// target = (target & ~mask) | (root & mask)
|
|
|
|
|
node_id root = m_id;
|
|
|
|
|
root &= mask;
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(58)">../include/libtorrent/config.hpp:305</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="58" 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:305</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(57)">../include/libtorrent/config.hpp:305</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="57" 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:305</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
// ==== eCS(OS/2) ===
|
|
|
|
|
#elif defined __OS2__
|
|
|
|
|
#define TORRENT_OS2
|
|
|
|
@ -2999,7 +2948,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
|
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
|
|
// internal
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 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 0</td><td><a href="javascript:expand(58)">../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="58" 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);
|
|
|
|
|
}
|
|
|
|
@ -3051,7 +3000,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 0</td><td><a href="javascript:expand(60)">../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="60" 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 0</td><td><a href="javascript:expand(59)">../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="59" 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;
|
|
|
|
@ -3102,7 +3051,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 0</td><td><a href="javascript:expand(61)">../include/libtorrent/upnp.hpp:121</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="61" 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 0</td><td><a href="javascript:expand(60)">../include/libtorrent/upnp.hpp:121</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="60" 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
|
|
|
|
|