|
|
|
@ -24,7 +24,7 @@
|
|
|
|
|
<span style="color: #f77">2 important</span>
|
|
|
|
|
<span style="color: #3c3">6 relevant</span>
|
|
|
|
|
<span style="color: #77f">13 feasible</span>
|
|
|
|
|
<span style="color: #999">46 notes</span>
|
|
|
|
|
<span style="color: #999">45 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:666</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
|
|
|
|
@ -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 3</td><td><a href="javascript:expand(2)">../src/torrent.cpp:6151</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:6151</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(2)">../src/torrent.cpp:6170</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:6170</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
|
|
|
|
|
}
|
|
|
|
|
TORRENT_ASSERT(m_connections.find(p) == m_connections.end());
|
|
|
|
|
m_connections.insert(p);
|
|
|
|
@ -339,7 +339,7 @@ that we have a fixed length</h2><h4>../src/policy.cpp:155</h4><pre style="backgr
|
|
|
|
|
crc.process_bytes((char const*)&b1[0], 16);
|
|
|
|
|
crc.process_bytes((char const*)&b2[0], 16);
|
|
|
|
|
}
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(6)">../src/torrent.cpp:633</a></td><td>post alert</td></tr><tr id="6" style="display: none;" colspan="3"><td colspan="3"><h2>post alert</h2><h4>../src/torrent.cpp:633</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> state_updated();
|
|
|
|
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(6)">../src/torrent.cpp:635</a></td><td>post alert</td></tr><tr id="6" style="display: none;" colspan="3"><td colspan="3"><h2>post alert</h2><h4>../src/torrent.cpp:635</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> state_updated();
|
|
|
|
|
|
|
|
|
|
set_state(torrent_status::downloading);
|
|
|
|
|
|
|
|
|
@ -649,8 +649,8 @@ all completed disk operations</h2><h4>../src/peer_connection.cpp:2581</h4><pre s
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(12)">../src/session_impl.cpp:5552</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="12" 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:5552</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const& ip, int port
|
|
|
|
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(12)">../src/session_impl.cpp:5544</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="12" 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:5544</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const& ip, int port
|
|
|
|
|
, error_code const& ec, int map_transport)
|
|
|
|
|
{
|
|
|
|
|
TORRENT_ASSERT(is_network_thread());
|
|
|
|
@ -701,9 +701,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 1</td><td><a href="javascript:expand(13)">../src/session_impl.cpp:6341</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 1</td><td><a href="javascript:expand(13)">../src/session_impl.cpp:6333</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
|
|
|
|
|
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:6341</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
|
|
|
|
is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src/session_impl.cpp:6333</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
|
|
|
|
|
|
|
|
|
if (!m_external_ip.cast_vote(ip, source_type, source)) return;
|
|
|
|
|
|
|
|
|
@ -754,11 +754,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(14)">../src/torrent.cpp:1030</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 1</td><td><a href="javascript:expand(14)">../src/torrent.cpp:1032</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
|
|
|
|
|
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:1030</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:1032</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (c) c->disconnect(errors::no_memory);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -809,8 +809,8 @@ up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1030</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(15)">../src/torrent.cpp:5412</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:5412</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(15)">../src/torrent.cpp:5431</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:5431</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);
|
|
|
|
|
}
|
|
|
|
@ -861,9 +861,9 @@ it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:5412</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(16)">../src/torrent.cpp:6319</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 1</td><td><a href="javascript:expand(16)">../src/torrent.cpp:6338</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
|
|
|
|
|
not just seeds. It would be pretty expensive to check all pieces
|
|
|
|
|
for all peers though</h2><h4>../src/torrent.cpp:6319</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:6338</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);
|
|
|
|
@ -1303,8 +1303,8 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../incl
|
|
|
|
|
? m_ses.settings().user_agent : m_ses.settings().handshake_client_version;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(25)">../src/bt_peer_connection.cpp:3356</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><tr id="25" 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:3356</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(25)">../src/bt_peer_connection.cpp:3364</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><tr id="25" 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:3364</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;
|
|
|
|
@ -1920,7 +1920,7 @@ override at a time</h2><h4>../src/policy.cpp:888</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(37)">../src/session_impl.cpp:4316</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="37" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4316</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (t->is_auto_managed() && !t->has_error())
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(37)">../src/session_impl.cpp:4299</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="37" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4299</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (t->is_auto_managed() && !t->has_error())
|
|
|
|
|
{
|
|
|
|
|
TORRENT_ASSERT(t->m_resume_data_loaded || !t->valid_metadata());
|
|
|
|
|
// this torrent is auto managed, add it to
|
|
|
|
@ -1971,9 +1971,9 @@ override at a time</h2><h4>../src/policy.cpp:888</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(38)">../src/session_impl.cpp:4472</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="38" 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(38)">../src/session_impl.cpp:4464</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="38" 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:4472</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
connections</h2><h4>../src/session_impl.cpp:4464</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
if (m_boost_connections > max_connections)
|
|
|
|
|
{
|
|
|
|
|
m_boost_connections -= max_connections;
|
|
|
|
@ -2024,7 +2024,7 @@ connections</h2><h4>../src/session_impl.cpp:4472</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(39)">../src/session_impl.cpp:4506</a></td><td>make this bias configurable</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>../src/session_impl.cpp:4506</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(40)">../src/session_impl.cpp:4507</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="40" 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:4507</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(39)">../src/session_impl.cpp:4498</a></td><td>make this bias configurable</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>../src/session_impl.cpp:4498</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(40)">../src/session_impl.cpp:4499</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="40" 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:4499</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();
|
|
|
|
@ -2075,8 +2075,8 @@ connections</h2><h4>../src/session_impl.cpp:4472</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(41)">../src/session_impl.cpp:4617</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><tr id="41" style="display: none;" colspan="3"><td colspan="3"><h2>post a message to have this happen
|
|
|
|
|
immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp:4617</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(41)">../src/session_impl.cpp:4609</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><tr id="41" style="display: none;" colspan="3"><td colspan="3"><h2>post a message to have this happen
|
|
|
|
|
immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp:4609</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
|
|
|
|
// we've unchoked this peer, and it hasn't reciprocated
|
|
|
|
|
// we may want to increase our estimated reciprocation rate
|
|
|
|
|
p->increase_est_reciprocation_rate();
|
|
|
|
@ -2127,7 +2127,7 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
|
|
|
|
|
prev = i;
|
|
|
|
|
}
|
|
|
|
|
#endif
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(42)">../src/session_impl.cpp:4651</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:4651</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:4643</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:4643</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)
|
|
|
|
@ -2160,7 +2160,7 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
|
|
|
|
|
|
|
|
|
|
++m_allowed_upload_slots;
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(43)">../src/session_impl.cpp:4665</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:4665</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(43)">../src/session_impl.cpp:4657</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:4657</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> >= (*i)->uploaded_in_last_round() * 1000
|
|
|
|
|
* (1 + t2->priority()) / total_milliseconds(unchoke_interval));
|
|
|
|
|
}
|
|
|
|
|
prev = i;
|
|
|
|
@ -2419,12 +2419,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(48)">../src/torrent.cpp:1232</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 0</td><td><a href="javascript:expand(48)">../src/torrent.cpp:1234</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
|
|
|
|
|
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:1232</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:1234</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
|
|
|
|
@ -2475,12 +2475,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(49)">../src/torrent.cpp:5145</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 0</td><td><a href="javascript:expand(49)">../src/torrent.cpp:5164</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
|
|
|
|
|
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:5145</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:5164</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);
|
|
|
|
@ -2531,12 +2531,12 @@ which are kept in sync</h2><h4>../src/torrent.cpp:5145</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(50)">../src/torrent.cpp:5281</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 0</td><td><a href="javascript:expand(50)">../src/torrent.cpp:5300</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
|
|
|
|
|
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:5281</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:5300</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2587,9 +2587,9 @@ no one uses merkle torrents</h2><h4>../src/torrent.cpp:5281</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(51)">../src/torrent.cpp:5469</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 0</td><td><a href="javascript:expand(51)">../src/torrent.cpp:5488</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
|
|
|
|
|
renamed, but also if they have been merged into a single file for instance.
|
|
|
|
|
using file_base</h2><h4>../src/torrent.cpp:5469</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> entry::string_type& pieces = ret["pieces"].string();
|
|
|
|
|
using file_base</h2><h4>../src/torrent.cpp:5488</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())
|
|
|
|
|
{
|
|
|
|
@ -2640,10 +2640,10 @@ using file_base</h2><h4>../src/torrent.cpp:5469</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(52)">../src/torrent.cpp:8005</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 0</td><td><a href="javascript:expand(52)">../src/torrent.cpp:8073</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
|
|
|
|
|
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:8005</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:8073</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
|
|
|
|
|
|
|
|
|
rarest_pieces.clear();
|
|
|
|
|
rarest_rarity = pp.peer_count;
|
|
|
|
@ -3004,7 +3004,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
|
|
|
|
node_id mask = generate_prefix_mask(num_bits);
|
|
|
|
|
|
|
|
|
|
// target = (target & ~mask) | (root & mask)
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(59)">../include/libtorrent/config.hpp:327</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="59" 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:327</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/config.hpp:333</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="59" 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:333</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
|
|
|
|
// ==== eCS(OS/2) ===
|
|
|
|
|
#elif defined __OS2__
|
|
|
|
|
#define TORRENT_OS2
|
|
|
|
@ -3260,58 +3260,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 0</td><td><a href="javascript:expand(64)">../include/libtorrent/torrent.hpp:1336</a></td><td>there's space for another bit here</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>there's space for another bit here</h2><h4>../include/libtorrent/torrent.hpp:1336</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.
|
|
|
|
|
bool m_is_active_download:1;
|
|
|
|
|
bool m_is_active_finished:1;
|
|
|
|
|
|
|
|
|
|
// even if we're not built to support SSL torrents,
|
|
|
|
|
// remember that this is an SSL torrent, so that we don't
|
|
|
|
|
// accidentally start seeding it without any authentication.
|
|
|
|
|
bool m_ssl_torrent:1;
|
|
|
|
|
|
|
|
|
|
// this is set to true if we're trying to delete the
|
|
|
|
|
// files belonging to it. When set, don't write any
|
|
|
|
|
// 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>// ----
|
|
|
|
|
|
|
|
|
|
// the scrape data from the tracker response, this
|
|
|
|
|
// is optional and may be 0xffffff
|
|
|
|
|
boost::uint32_t m_incomplete:24;
|
|
|
|
|
|
|
|
|
|
// is set to true when the torrent has
|
|
|
|
|
// been aborted.
|
|
|
|
|
bool m_abort:1;
|
|
|
|
|
|
|
|
|
|
// true when the torrent should announce to
|
|
|
|
|
// the DHT
|
|
|
|
|
bool m_announce_to_dht:1;
|
|
|
|
|
|
|
|
|
|
// true when this torrent should anncounce to
|
|
|
|
|
// trackers
|
|
|
|
|
bool m_announce_to_trackers:1;
|
|
|
|
|
|
|
|
|
|
// true when this torrent should anncounce to
|
|
|
|
|
// the local network
|
|
|
|
|
bool m_announce_to_lsd:1;
|
|
|
|
|
|
|
|
|
|
// is true if this torrent has allows having peers
|
|
|
|
|
bool m_allow_peers:1;
|
|
|
|
|
|
|
|
|
|
// set to true when this torrent may not download anything
|
|
|
|
|
bool m_upload_mode:1;
|
|
|
|
|
|
|
|
|
|
// 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 0</td><td><a href="javascript:expand(65)">../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="65" style="display: none;" colspan="3"><td colspan="3"><h2>include the number of peers received from this tracker, at last announce</h2><h4>../include/libtorrent/torrent_info.hpp: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(64)">../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="64" 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;
|
|
|
|
@ -3362,7 +3311,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(66)">../include/libtorrent/upnp.hpp:108</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="66" 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:108</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // specific IP addres or DNS name
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(65)">../include/libtorrent/upnp.hpp:108</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="65" 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:108</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // specific IP addres or DNS name
|
|
|
|
|
remote_host_must_be_wildcard = 726,
|
|
|
|
|
// ExternalPort must be a wildcard and cannot be a
|
|
|
|
|
// specific port
|
|
|
|
@ -3413,7 +3362,7 @@ public:
|
|
|
|
|
// is -1, which means failure. There will not be any error alert notification for
|
|
|
|
|
// mappings that fail with a -1 return value.
|
|
|
|
|
int add_mapping(protocol_type p, int external_port, int local_port);
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(67)">../include/libtorrent/utp_stream.hpp:378</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="67" 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()
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(66)">../include/libtorrent/utp_stream.hpp:378</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="66" 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;
|
|
|
|
@ -3464,7 +3413,7 @@ public:
|
|
|
|
|
TORRENT_ASSERT(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(68)">../include/libtorrent/kademlia/item.hpp:61</a></td><td>since this is a public function, it should probably be moved out of this header and into one with other public functions.</td></tr><tr id="68" style="display: none;" colspan="3"><td colspan="3"><h2>since this is a public function, it should probably be moved
|
|
|
|
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(67)">../include/libtorrent/kademlia/item.hpp:61</a></td><td>since this is a public function, it should probably be moved out of this header and into one with other public functions.</td></tr><tr id="67" style="display: none;" colspan="3"><td colspan="3"><h2>since this is a public function, it should probably be moved
|
|
|
|
|
out of this header and into one with other public functions.</h2><h4>../include/libtorrent/kademlia/item.hpp:61</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include <boost/array.hpp>
|
|
|
|
|
|
|
|
|
|
namespace libtorrent { namespace dht
|
|
|
|
|