forked from premiere/premiere-libtorrent
regenerate html
This commit is contained in:
parent
23b7e5c055
commit
8e0b458464
327
docs/todo.html
327
docs/todo.html
|
@ -22,9 +22,9 @@
|
||||||
</head><body>
|
</head><body>
|
||||||
<h1>libtorrent todo-list</h1>
|
<h1>libtorrent todo-list</h1>
|
||||||
<span style="color: #f77">2 important</span>
|
<span style="color: #f77">2 important</span>
|
||||||
<span style="color: #3c3">2 relevant</span>
|
<span style="color: #3c3">4 relevant</span>
|
||||||
<span style="color: #77f">13 feasible</span>
|
<span style="color: #77f">13 feasible</span>
|
||||||
<span style="color: #999">41 notes</span>
|
<span style="color: #999">40 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:663</a></td><td>in order to support SSL over uTP, the utp_socket manager either needs to be able to receive packets on multiple ports, or we need to peek into the first few bytes the payload stream of a socket to determine whether or not it's an SSL connection. (The former is simpler but won't do as well with NATs)</td></tr><tr id="0" style="display: none;" colspan="3"><td colspan="3"><h2>in order to support SSL over uTP, the utp_socket manager either
|
<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:663</a></td><td>in order to support SSL over uTP, the utp_socket manager either needs to be able to receive packets on multiple ports, or we need to peek into the first few bytes the payload stream of a socket to determine whether or not it's an SSL connection. (The former is simpler but won't do as well with NATs)</td></tr><tr id="0" style="display: none;" colspan="3"><td colspan="3"><h2>in order to support SSL over uTP, the utp_socket manager either
|
||||||
needs to be able to receive packets on multiple ports, or we need to
|
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
|
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 integer16: *((boost::uint16_t*)dest) = boost::uint16_t(val); break;
|
||||||
case integer: *((int*)dest) = int(val); break;
|
case integer: *((int*)dest) = int(val); break;
|
||||||
case size_integer: *((size_type*)dest) = size_type(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:6090</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="2" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it</h2><h4>../src/torrent.cpp:6090</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
|
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(2)">../src/torrent.cpp:6093</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:6093</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
|
||||||
}
|
}
|
||||||
TORRENT_ASSERT(m_connections.find(p) == m_connections.end());
|
TORRENT_ASSERT(m_connections.find(p) == m_connections.end());
|
||||||
m_connections.insert(p);
|
m_connections.insert(p);
|
||||||
|
@ -167,7 +167,7 @@ namespace libtorrent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined TORRENT_DEBUG && !defined TORRENT_DISABLE_INVARIANT_CHECKS
|
#if TORRENT_USE_INVARIANT_CHECKS
|
||||||
m_policy.check_invariant();
|
m_policy.check_invariant();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -235,7 +235,60 @@ when it doesn't have any of the file do the following</h2><h4>../src/web_peer_co
|
||||||
{
|
{
|
||||||
// we should not try this server again.
|
// we should not try this server again.
|
||||||
t->remove_web_seed(this);
|
t->remove_web_seed(this);
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(4)">../src/web_peer_connection.cpp:546</a></td><td>create a mapping of file-index to redirection URLs. Use that to form URLs instead. Support to reconnect to a new server without destructing this peer_connection</td></tr><tr id="4" style="display: none;" colspan="3"><td colspan="3"><h2>create a mapping of file-index to redirection URLs. Use that to form URLs instead. Support to reconnect to a new server without destructing this peer_connection</h2><h4>../src/web_peer_connection.cpp:546</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t->remove_web_seed(this);
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(4)">../src/policy.cpp:155</a></td><td>this could be optimized if SSE 4.2 is available. It could also be optimized given that we have a fixed length</td></tr><tr id="4" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized if SSE 4.2 is
|
||||||
|
available. It could also be optimized given
|
||||||
|
that we have a fixed length</h2><h4>../src/policy.cpp:155</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // 4. if IPs are not in the same /16, mask the IPs by 0xffff5555, hash them
|
||||||
|
// ordered, lowest first.
|
||||||
|
//
|
||||||
|
// * for IPv6 peers, just use the first 64 bits and widen the masks.
|
||||||
|
// like this: 0xffff5555 -> 0xffffffff55555555
|
||||||
|
// the lower 64 bits are always unmasked
|
||||||
|
//
|
||||||
|
// * for IPv6 addresses, compare /32 and /48 instead of /16 and /24
|
||||||
|
//
|
||||||
|
// * the two IP addresses that are used to calculate the rank must
|
||||||
|
// always be of the same address family
|
||||||
|
//
|
||||||
|
// * all IP addresses are in network byte order when hashed
|
||||||
|
boost::uint32_t peer_priority(tcp::endpoint e1, tcp::endpoint e2)
|
||||||
|
{
|
||||||
|
TORRENT_ASSERT(e1.address().is_v4() == e2.address().is_v4());
|
||||||
|
|
||||||
|
using std::swap;
|
||||||
|
|
||||||
|
// this is the crc32c (Castagnoli) polynomial
|
||||||
|
<div style="background: #ffff00" width="100%"> boost::crc_optimal<32, 0x1EDC6F41, 0xFFFFFFFF, 0xFFFFFFFF, true, true> crc;
|
||||||
|
</div>
|
||||||
|
if (e1.address() == e2.address())
|
||||||
|
{
|
||||||
|
if (e1.port() > e2.port())
|
||||||
|
swap(e1, e2);
|
||||||
|
boost::uint16_t p[2];
|
||||||
|
p[0] = htons(e1.port());
|
||||||
|
p[1] = htons(e2.port());
|
||||||
|
crc.process_bytes((char const*)&p[0], 4);
|
||||||
|
}
|
||||||
|
#if TORRENT_USE_IPV6
|
||||||
|
else if (e1.address().is_v6())
|
||||||
|
{
|
||||||
|
const static boost::uint8_t v6mask[][8] = {
|
||||||
|
{ 0xff, 0xff, 0xff, 0xff, 0x55, 0x55, 0x55, 0x55 },
|
||||||
|
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x55, 0x55 },
|
||||||
|
{ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }
|
||||||
|
};
|
||||||
|
|
||||||
|
if (e2 < e1) swap(e1, e2);
|
||||||
|
address_v6::bytes_type b1 = e1.address().to_v6().to_bytes();
|
||||||
|
address_v6::bytes_type b2 = e2.address().to_v6().to_bytes();
|
||||||
|
int mask = memcmp(&b1[0], &b2[0], 4) ? 0
|
||||||
|
: memcmp(&b1[0], &b2[0], 6) ? 1 : 2;
|
||||||
|
apply_mask(&b1[0], v6mask[mask], 8);
|
||||||
|
apply_mask(&b2[0], v6mask[mask], 8);
|
||||||
|
|
||||||
|
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(5)">../src/web_peer_connection.cpp:546</a></td><td>create a mapping of file-index to redirection URLs. Use that to form URLs instead. Support to reconnect to a new server without destructing this peer_connection</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>create a mapping of file-index to redirection URLs. Use that to form URLs instead. Support to reconnect to a new server without destructing this peer_connection</h2><h4>../src/web_peer_connection.cpp:546</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t->remove_web_seed(this);
|
||||||
disconnect(errors::missing_location, 2);
|
disconnect(errors::missing_location, 2);
|
||||||
#ifdef TORRENT_DEBUG
|
#ifdef TORRENT_DEBUG
|
||||||
TORRENT_ASSERT(m_statistics.last_payload_downloaded()
|
TORRENT_ASSERT(m_statistics.last_payload_downloaded()
|
||||||
|
@ -286,7 +339,7 @@ when it doesn't have any of the file do the following</h2><h4>../src/web_peer_co
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(5)">../src/kademlia/node.cpp:68</a></td><td>make this configurable in dht_settings</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>make this configurable in dht_settings</h2><h4>../src/kademlia/node.cpp:68</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include "libtorrent/kademlia/rpc_manager.hpp"
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(6)">../src/kademlia/node.cpp:68</a></td><td>make this configurable in dht_settings</td></tr><tr id="6" style="display: none;" colspan="3"><td colspan="3"><h2>make this configurable in dht_settings</h2><h4>../src/kademlia/node.cpp:68</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include "libtorrent/kademlia/rpc_manager.hpp"
|
||||||
#include "libtorrent/kademlia/routing_table.hpp"
|
#include "libtorrent/kademlia/routing_table.hpp"
|
||||||
#include "libtorrent/kademlia/node.hpp"
|
#include "libtorrent/kademlia/node.hpp"
|
||||||
#include "libtorrent/kademlia/dht_observer.hpp"
|
#include "libtorrent/kademlia/dht_observer.hpp"
|
||||||
|
@ -337,7 +390,60 @@ void purge_peers(std::set<peer_entry>& peers)
|
||||||
|
|
||||||
void nop() {}
|
void nop() {}
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(6)">../src/http_seed_connection.cpp:117</a></td><td>in chunked encoding mode, this assert won't hold. the chunk headers should be subtracted from the receive_buffer_size</td></tr><tr id="6" style="display: none;" colspan="3"><td colspan="3"><h2>in chunked encoding mode, this assert won't hold.
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(7)">../src/kademlia/node_id.cpp:137</a></td><td>this could be optimized if SSE 4.2 is available. It could also be optimized given that we have a fixed length</td></tr><tr id="7" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized if SSE 4.2 is
|
||||||
|
available. It could also be optimized given
|
||||||
|
that we have a fixed length</h2><h4>../src/kademlia/node_id.cpp:137</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> b6 = ip_.to_v6().to_bytes();
|
||||||
|
ip = &b6[0];
|
||||||
|
num_octets = 8;
|
||||||
|
mask = v6mask;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
b4 = ip_.to_v4().to_bytes();
|
||||||
|
ip = &b4[0];
|
||||||
|
num_octets = 4;
|
||||||
|
mask = v4mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < num_octets; ++i)
|
||||||
|
ip[i] &= mask[i];
|
||||||
|
|
||||||
|
ip[0] |= (r & 0x7) << 5;
|
||||||
|
|
||||||
|
// this is the crc32c (Castagnoli) polynomial
|
||||||
|
<div style="background: #ffff00" width="100%"> boost::crc_optimal<32, 0x1EDC6F41, 0xFFFFFFFF, 0xFFFFFFFF, true, true> crc;
|
||||||
|
</div> crc.process_block(ip, ip + num_octets);
|
||||||
|
boost::uint32_t c = crc.checksum();
|
||||||
|
node_id id;
|
||||||
|
|
||||||
|
id[0] = (c >> 24) & 0xff;
|
||||||
|
id[1] = (c >> 16) & 0xff;
|
||||||
|
id[2] = ((c >> 8) & 0xf8) | (random() & 0x7);
|
||||||
|
|
||||||
|
for (int i = 3; i < 19; ++i) id[i] = random();
|
||||||
|
id[19] = r;
|
||||||
|
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
node_id generate_random_id()
|
||||||
|
{
|
||||||
|
char r[20];
|
||||||
|
for (int i = 0; i < 20; ++i) r[i] = random();
|
||||||
|
return hasher(r, 20).final();
|
||||||
|
}
|
||||||
|
|
||||||
|
// verifies whether a node-id matches the IP it's used from
|
||||||
|
// returns true if the node-id is OK coming from this source
|
||||||
|
// and false otherwise.
|
||||||
|
bool verify_id(node_id const& nid, address const& source_ip)
|
||||||
|
{
|
||||||
|
// no need to verify local IPs, they would be incorrect anyway
|
||||||
|
if (is_local(source_ip)) return true;
|
||||||
|
|
||||||
|
node_id h = generate_id_impl(source_ip, nid[19]);
|
||||||
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(8)">../src/http_seed_connection.cpp:117</a></td><td>in chunked encoding mode, this assert won't hold. the chunk headers should be subtracted from the receive_buffer_size</td></tr><tr id="8" style="display: none;" colspan="3"><td colspan="3"><h2>in chunked encoding mode, this assert won't hold.
|
||||||
the chunk headers should be subtracted from the receive_buffer_size</h2><h4>../src/http_seed_connection.cpp:117</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> boost::optional<piece_block_progress>
|
the chunk headers should be subtracted from the receive_buffer_size</h2><h4>../src/http_seed_connection.cpp:117</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> boost::optional<piece_block_progress>
|
||||||
http_seed_connection::downloading_piece_progress() const
|
http_seed_connection::downloading_piece_progress() const
|
||||||
{
|
{
|
||||||
|
@ -389,8 +495,8 @@ the chunk headers should be subtracted from the receive_buffer_size</h2><h4>../s
|
||||||
std::string request;
|
std::string request;
|
||||||
request.reserve(400);
|
request.reserve(400);
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(7)">../src/peer_connection.cpp:2570</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="7" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(9)">../src/peer_connection.cpp:2596</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="9" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
|
||||||
all completed disk operations</h2><h4>../src/peer_connection.cpp:2570</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
all completed disk operations</h2><h4>../src/peer_connection.cpp:2596</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||||
|
|
||||||
if (is_disconnecting()) return;
|
if (is_disconnecting()) return;
|
||||||
|
|
||||||
|
@ -441,7 +547,7 @@ all completed disk operations</h2><h4>../src/peer_connection.cpp:2570</h4><pre s
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(8)">../src/session_impl.cpp:5543</a></td><td>report the proper address of the router as the source IP of this understanding of our external address, instead of the empty address</td></tr><tr id="8" style="display: none;" colspan="3"><td colspan="3"><h2>report the proper address of the router as the source IP of
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(10)">../src/session_impl.cpp:5543</a></td><td>report the proper address of the router as the source IP of this understanding of our external address, instead of the empty address</td></tr><tr id="10" style="display: none;" colspan="3"><td colspan="3"><h2>report the proper address of the router as the source IP of
|
||||||
this understanding of our external address, instead of the empty address</h2><h4>../src/session_impl.cpp:5543</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const& ip, int port
|
this understanding of our external address, instead of the empty address</h2><h4>../src/session_impl.cpp:5543</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const& ip, int port
|
||||||
, error_code const& ec, int map_transport)
|
, error_code const& ec, int map_transport)
|
||||||
{
|
{
|
||||||
|
@ -493,15 +599,9 @@ this understanding of our external address, instead of the empty address</h2><h4
|
||||||
{
|
{
|
||||||
// INVARIANT_CHECK;
|
// INVARIANT_CHECK;
|
||||||
TORRENT_ASSERT(is_network_thread());
|
TORRENT_ASSERT(is_network_thread());
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(9)">../src/session_impl.cpp:6247</a></td><td>we only need to do this if our global IPv4 address has changed since the DHT (currently) only supports IPv4. Since restarting the DHT is kind of expensive, it would be nice to not do it unnecessarily</td></tr><tr id="9" style="display: none;" colspan="3"><td colspan="3"><h2>we only need to do this if our global IPv4 address has changed
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(11)">../src/session_impl.cpp:6253</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="11" 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
|
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:6247</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::set_external_address(address const& ip
|
is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src/session_impl.cpp:6253</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
||||||
, int source_type, address const& source)
|
|
||||||
{
|
|
||||||
#if defined TORRENT_VERBOSE_LOGGING
|
|
||||||
session_log(": set_external_address(%s, %d, %s)", print_address(ip).c_str()
|
|
||||||
, source_type, print_address(source).c_str());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (!m_external_ip.cast_vote(ip, source_type, source)) return;
|
if (!m_external_ip.cast_vote(ip, source_type, source)) return;
|
||||||
|
|
||||||
|
@ -512,6 +612,12 @@ is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src
|
||||||
if (m_alerts.should_post<external_ip_alert>())
|
if (m_alerts.should_post<external_ip_alert>())
|
||||||
m_alerts.post_alert(external_ip_alert(ip));
|
m_alerts.post_alert(external_ip_alert(ip));
|
||||||
|
|
||||||
|
for (torrent_map::iterator i = m_torrents.begin()
|
||||||
|
, end(m_torrents.end()); i != end; ++i)
|
||||||
|
{
|
||||||
|
i->second->new_external_ip();
|
||||||
|
}
|
||||||
|
|
||||||
// since we have a new external IP now, we need to
|
// since we have a new external IP now, we need to
|
||||||
// restart the DHT with a new node ID
|
// restart the DHT with a new node ID
|
||||||
#ifndef TORRENT_DISABLE_DHT
|
#ifndef TORRENT_DISABLE_DHT
|
||||||
|
@ -546,11 +652,11 @@ is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src
|
||||||
|
|
||||||
#ifdef TORRENT_DISK_STATS
|
#ifdef TORRENT_DISK_STATS
|
||||||
TORRENT_ASSERT(m_buffer_allocations >= 0);
|
TORRENT_ASSERT(m_buffer_allocations >= 0);
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(10)">../src/torrent.cpp:1044</a></td><td>make this depend on the error and on the filesystem the files are being downloaded to. If the error is no_space_left_on_device and the filesystem doesn't support sparse files, only zero the priorities of the pieces that are at the tails of all files, leaving everything up to the highest written piece in each file</td></tr><tr id="10" style="display: none;" colspan="3"><td colspan="3"><h2>make this depend on the error and on the filesystem the
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(12)">../src/torrent.cpp:1043</a></td><td>make this depend on the error and on the filesystem the files are being downloaded to. If the error is no_space_left_on_device and the filesystem doesn't support sparse files, only zero the priorities of the pieces that are at the tails of all files, leaving everything up to the highest written piece in each file</td></tr><tr id="12" 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
|
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
|
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
|
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:1044</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:1043</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (c) c->disconnect(errors::no_memory);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -601,8 +707,8 @@ up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1044</h4
|
||||||
{
|
{
|
||||||
int size = m_torrent_file->piece_size(r.piece);
|
int size = m_torrent_file->piece_size(r.piece);
|
||||||
if (rp->fail)
|
if (rp->fail)
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(11)">../src/torrent.cpp:5352</a></td><td>save the send_stats state instead of throwing them away it may pose an issue when downgrading though</td></tr><tr id="11" style="display: none;" colspan="3"><td colspan="3"><h2>save the send_stats state instead of throwing them away
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(13)">../src/torrent.cpp:5355</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="13" style="display: none;" colspan="3"><td colspan="3"><h2>save the send_stats state instead of throwing them away
|
||||||
it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:5352</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> ? (1 << k) : 0;
|
it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:5355</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> ? (1 << k) : 0;
|
||||||
bitmask.append(1, v);
|
bitmask.append(1, v);
|
||||||
TORRENT_ASSERT(bits == 8 || j == num_bitmask_bytes - 1);
|
TORRENT_ASSERT(bits == 8 || j == num_bitmask_bytes - 1);
|
||||||
}
|
}
|
||||||
|
@ -653,9 +759,9 @@ it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:5352</h4
|
||||||
|
|
||||||
// write have bitmask
|
// write have bitmask
|
||||||
// the pieces string has one byte per piece. Each
|
// 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(12)">../src/torrent.cpp:6258</a></td><td>should disconnect all peers that have the pieces we have not just seeds. It would be pretty expensive to check all pieces for all peers though</td></tr><tr id="12" style="display: none;" colspan="3"><td colspan="3"><h2>should disconnect all peers that have the pieces we have
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(14)">../src/torrent.cpp:6261</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="14" 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
|
not just seeds. It would be pretty expensive to check all pieces
|
||||||
for all peers though</h2><h4>../src/torrent.cpp:6258</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(m_state != torrent_status::finished && m_state != torrent_status::seeding);
|
for all peers though</h2><h4>../src/torrent.cpp:6261</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_state(torrent_status::finished);
|
||||||
set_queue_position(-1);
|
set_queue_position(-1);
|
||||||
|
@ -706,7 +812,7 @@ for all peers though</h2><h4>../src/torrent.cpp:6258</h4><pre style="background:
|
||||||
// under a different limit with the auto-manager. Make sure we
|
// under a different limit with the auto-manager. Make sure we
|
||||||
// update auto-manage torrents in that case
|
// update auto-manage torrents in that case
|
||||||
if (m_auto_managed)
|
if (m_auto_managed)
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(13)">../src/torrent_info.cpp:181</a></td><td>we might save constructing a std::string if this would take a char const* instead</td></tr><tr id="13" style="display: none;" colspan="3"><td colspan="3"><h2>we might save constructing a std::string if this would take a char const* instead</h2><h4>../src/torrent_info.cpp:181</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(15)">../src/torrent_info.cpp:181</a></td><td>we might save constructing a std::string if this would take a char const* instead</td></tr><tr id="15" style="display: none;" colspan="3"><td colspan="3"><h2>we might save constructing a std::string if this would take a char const* instead</h2><h4>../src/torrent_info.cpp:181</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
||||||
tmp_path += i[0];
|
tmp_path += i[0];
|
||||||
tmp_path += i[1];
|
tmp_path += i[1];
|
||||||
tmp_path += i[2];
|
tmp_path += i[2];
|
||||||
|
@ -757,7 +863,7 @@ for all peers though</h2><h4>../src/torrent.cpp:6258</h4><pre style="background:
|
||||||
path_element.resize(max_path_len);
|
path_element.resize(max_path_len);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(14)">../src/torrent_info.cpp:401</a></td><td>this logic should be a separate step done once the torrent is loaded, and the original filenames should be preserved!</td></tr><tr id="14" style="display: none;" colspan="3"><td colspan="3"><h2>this logic should be a separate step
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(16)">../src/torrent_info.cpp:401</a></td><td>this logic should be a separate step done once the torrent is loaded, and the original filenames should be preserved!</td></tr><tr id="16" style="display: none;" colspan="3"><td colspan="3"><h2>this logic should be a separate step
|
||||||
done once the torrent is loaded, and the original
|
done once the torrent is loaded, and the original
|
||||||
filenames should be preserved!</h2><h4>../src/torrent_info.cpp:401</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
filenames should be preserved!</h2><h4>../src/torrent_info.cpp:401</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
while (*s1 != 0 || *s2 != 0)
|
while (*s1 != 0 || *s2 != 0)
|
||||||
|
@ -810,7 +916,7 @@ filenames should be preserved!</h2><h4>../src/torrent_info.cpp:401</h4><pre styl
|
||||||
|
|
||||||
// This is a memory optimization! Instead of having
|
// This is a memory optimization! Instead of having
|
||||||
// each entry keep a string for its filename, make it
|
// each entry keep a string for its filename, make it
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(15)">../src/torrent_info.cpp:437</a></td><td>once the filename renaming is removed from here this check can be removed as well</td></tr><tr id="15" style="display: none;" colspan="3"><td colspan="3"><h2>once the filename renaming is removed from here
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(17)">../src/torrent_info.cpp:437</a></td><td>once the filename renaming is removed from here this check can be removed as well</td></tr><tr id="17" style="display: none;" colspan="3"><td colspan="3"><h2>once the filename renaming is removed from here
|
||||||
this check can be removed as well</h2><h4>../src/torrent_info.cpp:437</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // increase the counter
|
this check can be removed as well</h2><h4>../src/torrent_info.cpp:437</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // increase the counter
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
if (!files.insert(e.path).second)
|
if (!files.insert(e.path).second)
|
||||||
|
@ -862,7 +968,7 @@ this check can be removed as well</h2><h4>../src/torrent_info.cpp:437</h4><pre s
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(leafs > 0);
|
TORRENT_ASSERT(leafs > 0);
|
||||||
return (leafs << 1) - 1;
|
return (leafs << 1) - 1;
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(16)">../src/kademlia/node.cpp:797</a></td><td>find_node should write directly to the response entry</td></tr><tr id="16" style="display: none;" colspan="3"><td colspan="3"><h2>find_node should write directly to the response entry</h2><h4>../src/kademlia/node.cpp:797</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(18)">../src/kademlia/node.cpp:797</a></td><td>find_node should write directly to the response entry</td></tr><tr id="18" style="display: none;" colspan="3"><td colspan="3"><h2>find_node should write directly to the response entry</h2><h4>../src/kademlia/node.cpp:797</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
||||||
TORRENT_LOG(node) << " values: " << reply["values"].list().size();
|
TORRENT_LOG(node) << " values: " << reply["values"].list().size();
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -913,7 +1019,7 @@ this check can be removed as well</h2><h4>../src/torrent_info.cpp:437</h4><pre s
|
||||||
// listen port and instead use the source port of the packet?
|
// listen port and instead use the source port of the packet?
|
||||||
if (msg_keys[5] && msg_keys[5]->int_value() != 0)
|
if (msg_keys[5] && msg_keys[5]->int_value() != 0)
|
||||||
port = m.addr.port();
|
port = m.addr.port();
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(17)">../include/libtorrent/ip_voter.hpp:100</a></td><td>instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.</td></tr><tr id="17" style="display: none;" colspan="3"><td colspan="3"><h2>instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.</h2><h4>../include/libtorrent/ip_voter.hpp:100</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> bloom_filter<32> m_external_address_voters;
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(19)">../include/libtorrent/ip_voter.hpp:100</a></td><td>instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.</td></tr><tr id="19" style="display: none;" colspan="3"><td colspan="3"><h2>instead, have one instance per possible subnet, global IPv4, global IPv6, loopback, 192.168.x.x, 10.x.x.x, etc.</h2><h4>../include/libtorrent/ip_voter.hpp:100</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> bloom_filter<32> m_external_address_voters;
|
||||||
std::vector<external_ip_t> m_external_addresses;
|
std::vector<external_ip_t> m_external_addresses;
|
||||||
address m_external_address;
|
address m_external_address;
|
||||||
};
|
};
|
||||||
|
@ -940,7 +1046,7 @@ this check can be removed as well</h2><h4>../src/torrent_info.cpp:437</h4><pre s
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(18)">../include/libtorrent/web_peer_connection.hpp:126</a></td><td>if we make this be a disk_buffer_holder instead we would save a copy sometimes use allocate_disk_receive_buffer and release_disk_receive_buffer</td></tr><tr id="18" style="display: none;" colspan="3"><td colspan="3"><h2>if we make this be a disk_buffer_holder instead
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(20)">../include/libtorrent/web_peer_connection.hpp:126</a></td><td>if we make this be a disk_buffer_holder instead we would save a copy sometimes use allocate_disk_receive_buffer and release_disk_receive_buffer</td></tr><tr id="20" style="display: none;" colspan="3"><td colspan="3"><h2>if we make this be a disk_buffer_holder instead
|
||||||
we would save a copy sometimes
|
we would save a copy sometimes
|
||||||
use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../include/libtorrent/web_peer_connection.hpp:126</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../include/libtorrent/web_peer_connection.hpp:126</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
bool maybe_harvest_block();
|
bool maybe_harvest_block();
|
||||||
|
@ -993,7 +1099,7 @@ 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(19)">../src/bt_peer_connection.cpp:625</a></td><td>this could be optimized using knuth morris pratt</td></tr><tr id="19" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>../src/bt_peer_connection.cpp:625</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(21)">../src/bt_peer_connection.cpp:639</a></td><td>this could be optimized using knuth morris pratt</td></tr><tr id="21" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>../src/bt_peer_connection.cpp:639</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
||||||
disconnect(errors::no_memory);
|
disconnect(errors::no_memory);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -1044,7 +1150,7 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../incl
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// no complete sync
|
// no complete sync
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(20)">../src/bt_peer_connection.cpp:2089</a></td><td>if we're finished, send upload_only message</td></tr><tr id="20" style="display: none;" colspan="3"><td colspan="3"><h2>if we're finished, send upload_only message</h2><h4>../src/bt_peer_connection.cpp:2089</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (msg[5 + k / 8] & (0x80 >> (k % 8))) bitfield_string[k] = '1';
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(22)">../src/bt_peer_connection.cpp:2108</a></td><td>if we're finished, send upload_only message</td></tr><tr id="22" style="display: none;" colspan="3"><td colspan="3"><h2>if we're finished, send upload_only message</h2><h4>../src/bt_peer_connection.cpp:2108</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';
|
else bitfield_string[k] = '0';
|
||||||
}
|
}
|
||||||
peer_log("==> BITFIELD [ %s ]", bitfield_string.c_str());
|
peer_log("==> BITFIELD [ %s ]", bitfield_string.c_str());
|
||||||
|
@ -1081,22 +1187,22 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>../incl
|
||||||
entry handshake;
|
entry handshake;
|
||||||
entry::dictionary_type& m = handshake["m"].dict();
|
entry::dictionary_type& m = handshake["m"].dict();
|
||||||
|
|
||||||
|
// if we're using a proxy, our listen port won't be useful
|
||||||
|
// anyway.
|
||||||
|
if (!m_ses.settings().force_proxy && is_outgoing())
|
||||||
|
handshake["p"] = m_ses.listen_port();
|
||||||
|
|
||||||
// only send the port in case we bade the connection
|
// only send the port in case we bade the connection
|
||||||
// on incoming connections the other end already knows
|
// on incoming connections the other end already knows
|
||||||
// our listen port
|
// our listen port
|
||||||
if (!m_ses.m_settings.anonymous_mode)
|
if (!m_ses.m_settings.anonymous_mode)
|
||||||
{
|
{
|
||||||
if (is_outgoing()) handshake["p"] = m_ses.listen_port();
|
|
||||||
handshake["v"] = m_ses.settings().handshake_client_version.empty()
|
handshake["v"] = m_ses.settings().handshake_client_version.empty()
|
||||||
? m_ses.settings().user_agent : m_ses.settings().handshake_client_version;
|
? m_ses.settings().user_agent : m_ses.settings().handshake_client_version;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string remote_address;
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(23)">../src/bt_peer_connection.cpp:3352</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><tr id="23" style="display: none;" colspan="3"><td colspan="3"><h2>move the erasing into the loop above
|
||||||
std::back_insert_iterator<std::string> out(remote_address);
|
remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.cpp:3352</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (std::vector<range>::iterator i = m_payloads.begin();
|
||||||
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(21)">../src/bt_peer_connection.cpp:3329</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><tr id="21" style="display: none;" colspan="3"><td colspan="3"><h2>move the erasing into the loop above
|
|
||||||
remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.cpp:3329</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (std::vector<range>::iterator i = m_payloads.begin();
|
|
||||||
i != m_payloads.end(); ++i)
|
i != m_payloads.end(); ++i)
|
||||||
{
|
{
|
||||||
i->start -= bytes_transferred;
|
i->start -= bytes_transferred;
|
||||||
|
@ -1131,7 +1237,7 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined TORRENT_DEBUG && !defined TORRENT_DISABLE_INVARIANT_CHECKS
|
#if TORRENT_USE_INVARIANT_CHECKS
|
||||||
void bt_peer_connection::check_invariant() const
|
void bt_peer_connection::check_invariant() const
|
||||||
{
|
{
|
||||||
boost::shared_ptr<torrent> t = associated_torrent().lock();
|
boost::shared_ptr<torrent> t = associated_torrent().lock();
|
||||||
|
@ -1147,7 +1253,7 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
|
||||||
TORRENT_ASSERT(m_sent_handshake);
|
TORRENT_ASSERT(m_sent_handshake);
|
||||||
}
|
}
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(22)">../src/file.cpp:1381</a></td><td>is there any way to pre-fetch data from a file on windows?</td></tr><tr id="22" style="display: none;" colspan="3"><td colspan="3"><h2>is there any way to pre-fetch data from a file on windows?</h2><h4>../src/file.cpp:1381</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(24)">../src/file.cpp:1381</a></td><td>is there any way to pre-fetch data from a file on windows?</td></tr><tr id="24" style="display: none;" colspan="3"><td colspan="3"><h2>is there any way to pre-fetch data from a file on windows?</h2><h4>../src/file.cpp:1381</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
void file::init_file()
|
void file::init_file()
|
||||||
{
|
{
|
||||||
if (m_page_size != 0) return;
|
if (m_page_size != 0) return;
|
||||||
|
@ -1198,7 +1304,7 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
|
||||||
#ifdef TORRENT_DEBUG
|
#ifdef TORRENT_DEBUG
|
||||||
if (m_open_mode & no_buffer)
|
if (m_open_mode & no_buffer)
|
||||||
{
|
{
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(23)">../src/http_tracker_connection.cpp:99</a></td><td>support authentication (i.e. user name and password) in the URL</td></tr><tr id="23" style="display: none;" colspan="3"><td colspan="3"><h2>support authentication (i.e. user name and password) in the URL</h2><h4>../src/http_tracker_connection.cpp:99</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , aux::session_impl const& ses
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(25)">../src/http_tracker_connection.cpp:99</a></td><td>support authentication (i.e. user name and password) in the URL</td></tr><tr id="25" style="display: none;" colspan="3"><td colspan="3"><h2>support authentication (i.e. user name and password) in the URL</h2><h4>../src/http_tracker_connection.cpp:99</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , aux::session_impl const& ses
|
||||||
, proxy_settings const& ps
|
, proxy_settings const& ps
|
||||||
, std::string const& auth
|
, std::string const& auth
|
||||||
#if TORRENT_USE_I2P
|
#if TORRENT_USE_I2P
|
||||||
|
@ -1249,7 +1355,7 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
|
||||||
if (arguments_start != std::string::npos)
|
if (arguments_start != std::string::npos)
|
||||||
url += "&";
|
url += "&";
|
||||||
else
|
else
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(24)">../src/i2p_stream.cpp:204</a></td><td>move this to proxy_base and use it in all proxies</td></tr><tr id="24" style="display: none;" colspan="3"><td colspan="3"><h2>move this to proxy_base and use it in all proxies</h2><h4>../src/i2p_stream.cpp:204</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(26)">../src/i2p_stream.cpp:204</a></td><td>move this to proxy_base and use it in all proxies</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>move this to proxy_base and use it in all proxies</h2><h4>../src/i2p_stream.cpp:204</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
i2p_stream::i2p_stream(io_service& io_service)
|
i2p_stream::i2p_stream(io_service& io_service)
|
||||||
: proxy_base(io_service)
|
: proxy_base(io_service)
|
||||||
, m_id(0)
|
, m_id(0)
|
||||||
|
@ -1300,7 +1406,7 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
|
||||||
void i2p_stream::connected(error_code const& e, boost::shared_ptr<handler_type> h)
|
void i2p_stream::connected(error_code const& e, boost::shared_ptr<handler_type> h)
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(m_magic == 0x1337);
|
TORRENT_ASSERT(m_magic == 0x1337);
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(25)">../src/packet_buffer.cpp:176</a></td><td>use compare_less_wrap for this comparison as well</td></tr><tr id="25" style="display: none;" colspan="3"><td colspan="3"><h2>use compare_less_wrap for this comparison as well</h2><h4>../src/packet_buffer.cpp:176</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> while (new_size < size)
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(27)">../src/packet_buffer.cpp:176</a></td><td>use compare_less_wrap for this comparison as well</td></tr><tr id="27" style="display: none;" colspan="3"><td colspan="3"><h2>use compare_less_wrap for this comparison as well</h2><h4>../src/packet_buffer.cpp:176</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> while (new_size < size)
|
||||||
new_size <<= 1;
|
new_size <<= 1;
|
||||||
|
|
||||||
void** new_storage = (void**)malloc(sizeof(void*) * new_size);
|
void** new_storage = (void**)malloc(sizeof(void*) * new_size);
|
||||||
|
@ -1351,9 +1457,9 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
|
||||||
if (m_storage[m_last & mask]) break;
|
if (m_storage[m_last & mask]) break;
|
||||||
++m_last;
|
++m_last;
|
||||||
m_last &= 0xffff;
|
m_last &= 0xffff;
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(26)">../src/peer_connection.cpp:2733</a></td><td>this might need something more so that once we have the metadata we can construct a full bitfield</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>this might need something more
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(28)">../src/peer_connection.cpp:2759</a></td><td>this might need something more so that once we have the metadata we can construct a full bitfield</td></tr><tr id="28" style="display: none;" colspan="3"><td colspan="3"><h2>this might need something more
|
||||||
so that once we have the metadata
|
so that once we have the metadata
|
||||||
we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2733</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2759</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
#ifdef TORRENT_VERBOSE_LOGGING
|
#ifdef TORRENT_VERBOSE_LOGGING
|
||||||
peer_log("*** THIS IS A SEED [ p: %p ]", m_peer_info);
|
peer_log("*** THIS IS A SEED [ p: %p ]", m_peer_info);
|
||||||
#endif
|
#endif
|
||||||
|
@ -1404,7 +1510,7 @@ we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2733</h4><pr
|
||||||
boost::shared_ptr<torrent> t = m_torrent.lock();
|
boost::shared_ptr<torrent> t = m_torrent.lock();
|
||||||
TORRENT_ASSERT(t);
|
TORRENT_ASSERT(t);
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(27)">../src/peer_connection.cpp:2864</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="27" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:2864</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this piece index later
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(29)">../src/peer_connection.cpp:2890</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="29" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:2890</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this piece index later
|
||||||
m_allowed_fast.push_back(index);
|
m_allowed_fast.push_back(index);
|
||||||
|
|
||||||
// if the peer has the piece and we want
|
// if the peer has the piece and we want
|
||||||
|
@ -1455,8 +1561,8 @@ we can construct a full bitfield</h2><h4>../src/peer_connection.cpp:2733</h4><pr
|
||||||
TORRENT_ASSERT(t->has_picker());
|
TORRENT_ASSERT(t->has_picker());
|
||||||
TORRENT_ASSERT(t->picker().is_requested(block));
|
TORRENT_ASSERT(t->picker().is_requested(block));
|
||||||
#endif
|
#endif
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(28)">../src/peer_connection.cpp:4584</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="28" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(30)">../src/peer_connection.cpp:4610</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="30" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
|
||||||
all completed disk operations</h2><h4>../src/peer_connection.cpp:4584</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this means we're in seed mode and we haven't yet
|
all completed disk operations</h2><h4>../src/peer_connection.cpp:4610</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this means we're in seed mode and we haven't yet
|
||||||
// verified this piece (r.piece)
|
// verified this piece (r.piece)
|
||||||
t->filesystem().async_read_and_hash(r, boost::bind(&peer_connection::on_disk_read_complete
|
t->filesystem().async_read_and_hash(r, boost::bind(&peer_connection::on_disk_read_complete
|
||||||
, self(), _1, _2, r), cache.second);
|
, self(), _1, _2, r), cache.second);
|
||||||
|
@ -1507,8 +1613,8 @@ all completed disk operations</h2><h4>../src/peer_connection.cpp:4584</h4><pre s
|
||||||
#endif
|
#endif
|
||||||
write_reject_request(r);
|
write_reject_request(r);
|
||||||
if (t->seed_mode()) t->leave_seed_mode(false);
|
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(29)">../src/policy.cpp:857</a></td><td>only allow _one_ connection to use this override at a time</td></tr><tr id="29" style="display: none;" colspan="3"><td colspan="3"><h2>only allow _one_ connection to use this
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(31)">../src/policy.cpp:868</a></td><td>only allow _one_ connection to use this override at a time</td></tr><tr id="31" 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()) <<
|
override at a time</h2><h4>../src/policy.cpp:868</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) <<
|
" t: " << (session_time - m_peers[candidate]->last_connected) <<
|
||||||
" ]\n";
|
" ]\n";
|
||||||
}
|
}
|
||||||
|
@ -1559,58 +1665,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
|
||||||
{
|
{
|
||||||
iter = std::lower_bound(
|
iter = std::lower_bound(
|
||||||
m_peers.begin(), m_peers.end()
|
m_peers.begin(), m_peers.end()
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(30)">../src/policy.cpp:1902</a></td><td>how do we deal with our external address changing? Pass in a force-update maybe? and keep a version number in policy</td></tr><tr id="30" style="display: none;" colspan="3"><td colspan="3"><h2>how do we deal with our external address changing? Pass in a force-update maybe? and keep a version number in policy</h2><h4>../src/policy.cpp:1902</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(32)">../src/session_impl.cpp:1764</a></td><td>recalculate all connect candidates for all torrents</td></tr><tr id="32" style="display: none;" colspan="3"><td colspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>../src/session_impl.cpp:1764</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // #error closing the udp socket here means that
|
||||||
, on_parole(false)
|
|
||||||
, banned(false)
|
|
||||||
#ifndef TORRENT_DISABLE_DHT
|
|
||||||
, added_to_dht(false)
|
|
||||||
#endif
|
|
||||||
, supports_utp(true) // assume peers support utp
|
|
||||||
, confirmed_supports_utp(false)
|
|
||||||
, supports_holepunch(false)
|
|
||||||
, web_seed(false)
|
|
||||||
#if TORRENT_USE_ASSERTS
|
|
||||||
, in_use(false)
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
TORRENT_ASSERT((src & 0xff) == src);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TOOD: pass in both an IPv6 and IPv4 address here
|
|
||||||
boost::uint32_t policy::peer::rank(external_ip const& external, int external_port) const
|
|
||||||
{
|
|
||||||
<div style="background: #ffff00" width="100%"> if (peer_rank == 0)
|
|
||||||
</div> peer_rank = peer_priority(
|
|
||||||
tcp::endpoint(external.external_address(this->address()), external_port)
|
|
||||||
, tcp::endpoint(this->address(), this->port));
|
|
||||||
return peer_rank;
|
|
||||||
}
|
|
||||||
|
|
||||||
size_type policy::peer::total_download() const
|
|
||||||
{
|
|
||||||
if (connection != 0)
|
|
||||||
{
|
|
||||||
TORRENT_ASSERT(prev_amount_download == 0);
|
|
||||||
return connection->statistics().total_payload_download();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return size_type(prev_amount_download) << 10;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
size_type policy::peer::total_upload() const
|
|
||||||
{
|
|
||||||
if (connection != 0)
|
|
||||||
{
|
|
||||||
TORRENT_ASSERT(prev_amount_upload == 0);
|
|
||||||
return connection->statistics().total_payload_upload();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return size_type(prev_amount_upload) << 10;
|
|
||||||
}
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(31)">../src/session_impl.cpp:1764</a></td><td>recalculate all connect candidates for all torrents</td></tr><tr id="31" style="display: none;" colspan="3"><td colspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>../src/session_impl.cpp:1764</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // #error closing the udp socket here means that
|
|
||||||
// the uTP connections cannot be closed gracefully
|
// the uTP connections cannot be closed gracefully
|
||||||
m_udp_socket.close();
|
m_udp_socket.close();
|
||||||
m_external_udp_port = 0;
|
m_external_udp_port = 0;
|
||||||
|
@ -1661,7 +1716,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
|
||||||
template <class Socket>
|
template <class Socket>
|
||||||
void static set_socket_buffer_size(Socket& s, session_settings const& sett, error_code& ec)
|
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(32)">../src/session_impl.cpp:3227</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="32" style="display: none;" colspan="3"><td colspan="3"><h2>have a separate list for these connections, instead of having to loop through all of them</h2><h4>../src/session_impl.cpp:3227</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // --------------------------------------------------------------
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(33)">../src/session_impl.cpp:3227</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="33" style="display: none;" colspan="3"><td colspan="3"><h2>have a separate list for these connections, instead of having to loop through all of them</h2><h4>../src/session_impl.cpp:3227</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // --------------------------------------------------------------
|
||||||
if (!m_paused) m_auto_manage_time_scaler--;
|
if (!m_paused) m_auto_manage_time_scaler--;
|
||||||
if (m_auto_manage_time_scaler < 0)
|
if (m_auto_manage_time_scaler < 0)
|
||||||
{
|
{
|
||||||
|
@ -1712,7 +1767,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
|
||||||
TORRENT_ASSERT(!t.is_aborted());
|
TORRENT_ASSERT(!t.is_aborted());
|
||||||
if (t.statistics().upload_rate() * 11 / 10 > t.upload_limit())
|
if (t.statistics().upload_rate() * 11 / 10 > t.upload_limit())
|
||||||
++congested_torrents;
|
++congested_torrents;
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(33)">../src/session_impl.cpp:4307</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="33" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4307</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (t->is_auto_managed() && !t->has_error())
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(34)">../src/session_impl.cpp:4307</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="34" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4307</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (t->is_auto_managed() && !t->has_error())
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(t->m_resume_data_loaded || !t->valid_metadata());
|
TORRENT_ASSERT(t->m_resume_data_loaded || !t->valid_metadata());
|
||||||
// this torrent is auto managed, add it to
|
// this torrent is auto managed, add it to
|
||||||
|
@ -1763,7 +1818,7 @@ override at a time</h2><h4>../src/policy.cpp:857</h4><pre style="background: #f6
|
||||||
void session_impl::recalculate_optimistic_unchoke_slots()
|
void session_impl::recalculate_optimistic_unchoke_slots()
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(is_network_thread());
|
TORRENT_ASSERT(is_network_thread());
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(34)">../src/session_impl.cpp:4463</a></td><td>use a lower limit than m_settings.connections_limit to allocate the to 10% or so of connection slots for incoming connections</td></tr><tr id="34" style="display: none;" colspan="3"><td colspan="3"><h2>use a lower limit than m_settings.connections_limit
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(35)">../src/session_impl.cpp:4463</a></td><td>use a lower limit than m_settings.connections_limit to allocate the to 10% or so of connection slots for incoming connections</td></tr><tr id="35" 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
|
to allocate the to 10% or so of connection slots for incoming
|
||||||
connections</h2><h4>../src/session_impl.cpp:4463</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
connections</h2><h4>../src/session_impl.cpp:4463</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
||||||
if (m_boost_connections > max_connections)
|
if (m_boost_connections > max_connections)
|
||||||
|
@ -1816,7 +1871,7 @@ connections</h2><h4>../src/session_impl.cpp:4463</h4><pre style="background: #f6
|
||||||
int num_attempts = 1;
|
int num_attempts = 1;
|
||||||
if (!t.is_finished())
|
if (!t.is_finished())
|
||||||
{
|
{
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(35)">../src/session_impl.cpp:4497</a></td><td>make this bias configurable</td></tr><tr id="35" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>../src/session_impl.cpp:4497</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(36)">../src/session_impl.cpp:4498</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="36" style="display: none;" colspan="3"><td colspan="3"><h2>also take average_peers into account, to create a bias for downloading torrents with < average peers</h2><h4>../src/session_impl.cpp:4498</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> average_peers = num_downloads_peers / num_downloads;
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(36)">../src/session_impl.cpp:4497</a></td><td>make this bias configurable</td></tr><tr id="36" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>../src/session_impl.cpp:4497</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"></pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(37)">../src/session_impl.cpp:4498</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="37" style="display: none;" colspan="3"><td colspan="3"><h2>also take average_peers into account, to create a bias for downloading torrents with < average peers</h2><h4>../src/session_impl.cpp:4498</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> average_peers = num_downloads_peers / num_downloads;
|
||||||
|
|
||||||
if (m_next_connect_torrent == m_torrents.end())
|
if (m_next_connect_torrent == m_torrents.end())
|
||||||
m_next_connect_torrent = m_torrents.begin();
|
m_next_connect_torrent = m_torrents.begin();
|
||||||
|
@ -1867,7 +1922,7 @@ connections</h2><h4>../src/session_impl.cpp:4463</h4><pre style="background: #f6
|
||||||
if (max_connections == 0) return;
|
if (max_connections == 0) return;
|
||||||
if (num_connections() >= m_settings.connections_limit) 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(37)">../src/session_impl.cpp:4642</a></td><td>make configurable</td></tr><tr id="37" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4642</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(38)">../src/session_impl.cpp:4642</a></td><td>make configurable</td></tr><tr id="38" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4642</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
#ifdef TORRENT_DEBUG
|
#ifdef TORRENT_DEBUG
|
||||||
for (std::vector<peer_connection*>::const_iterator i = peers.begin()
|
for (std::vector<peer_connection*>::const_iterator i = peers.begin()
|
||||||
, end(peers.end()), prev(peers.end()); i != end; ++i)
|
, end(peers.end()), prev(peers.end()); i != end; ++i)
|
||||||
|
@ -1900,7 +1955,7 @@ connections</h2><h4>../src/session_impl.cpp:4463</h4><pre style="background: #f6
|
||||||
|
|
||||||
++m_allowed_upload_slots;
|
++m_allowed_upload_slots;
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(38)">../src/session_impl.cpp:4656</a></td><td>make configurable</td></tr><tr id="38" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4656</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> >= (*i)->uploaded_in_last_round() * 1000
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(39)">../src/session_impl.cpp:4656</a></td><td>make configurable</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:4656</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> >= (*i)->uploaded_in_last_round() * 1000
|
||||||
* (1 + t2->priority()) / total_milliseconds(unchoke_interval));
|
* (1 + t2->priority()) / total_milliseconds(unchoke_interval));
|
||||||
}
|
}
|
||||||
prev = i;
|
prev = i;
|
||||||
|
@ -1951,7 +2006,7 @@ connections</h2><h4>../src/session_impl.cpp:4463</h4><pre style="background: #f6
|
||||||
// if our current upload rate is less than 90% of our
|
// if our current upload rate is less than 90% of our
|
||||||
// limit AND most torrents are not "congested", i.e.
|
// limit AND most torrents are not "congested", i.e.
|
||||||
// they are not holding back because of a per-torrent
|
// 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(39)">../src/storage.cpp:324</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>../src/storage.cpp:324</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_storage->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(40)">../src/storage.cpp:324</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="40" style="display: none;" colspan="3"><td colspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>../src/storage.cpp: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 size = slot_size;
|
||||||
int num_blocks = (size + block_size - 1) / block_size;
|
int num_blocks = (size + block_size - 1) / block_size;
|
||||||
|
|
||||||
|
@ -2002,7 +2057,7 @@ connections</h2><h4>../src/session_impl.cpp:4463</h4><pre style="background: #f6
|
||||||
{
|
{
|
||||||
buf.iov_len = (std::min)(block_size, size);
|
buf.iov_len = (std::min)(block_size, size);
|
||||||
// deliberately pass in 0 as flags, to disable random_access
|
// 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(40)">../src/storage.cpp:358</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="40" style="display: none;" colspan="3"><td colspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>../src/storage.cpp:358</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(41)">../src/storage.cpp:358</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="41" 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);
|
ph.h.update((char const*)bufs[i].iov_base, bufs[i].iov_len);
|
||||||
small_piece_size -= bufs[i].iov_len;
|
small_piece_size -= bufs[i].iov_len;
|
||||||
}
|
}
|
||||||
|
@ -2053,7 +2108,7 @@ connections</h2><h4>../src/session_impl.cpp:4463</h4><pre style="background: #f6
|
||||||
, m_file_priority(file_prio)
|
, m_file_priority(file_prio)
|
||||||
, m_pool(fp)
|
, m_pool(fp)
|
||||||
, m_page_size(page_size())
|
, m_page_size(page_size())
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(41)">../src/storage.cpp:629</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info</td></tr><tr id="41" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(42)">../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="42" 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
|
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 (;;)
|
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 (;;)
|
||||||
{
|
{
|
||||||
|
@ -2106,9 +2161,9 @@ 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)
|
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(42)">../src/storage.cpp:1263</a></td><td>what if file_base is used to merge several virtual files into a single physical file? We should probably disable this if file_base is used. This is not a widely used feature though</td></tr><tr id="42" style="display: none;" colspan="3"><td colspan="3"><h2>what if file_base is used to merge several virtual files
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(43)">../src/storage.cpp:1265</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="43" 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
|
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:1263</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> int bytes_transferred = 0;
|
if file_base is used. This is not a widely used feature though</h2><h4>../src/storage.cpp:1265</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> int bytes_transferred = 0;
|
||||||
// if the file is opened in no_buffer mode, and the
|
// if the file is opened in no_buffer mode, and the
|
||||||
// read is unaligned, we need to fall back on a slow
|
// read is unaligned, we need to fall back on a slow
|
||||||
// special read that reads aligned buffers and copies
|
// special read that reads aligned buffers and copies
|
||||||
|
@ -2159,12 +2214,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
|
// makes unaligned requests (and the disk cache is disabled or fully utilized
|
||||||
// for write cache).
|
// for write cache).
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(43)">../src/torrent.cpp:1246</a></td><td>is verify_peer_cert called once per certificate in the chain, and this function just tells us which depth we're at right now? If so, the comment makes sense. any certificate that isn't the leaf (i.e. the one presented by the peer) should be accepted automatically, given preverified is true. The leaf certificate need to be verified to make sure its DN matches the info-hash</td></tr><tr id="43" style="display: none;" colspan="3"><td colspan="3"><h2>is verify_peer_cert called once per certificate in the chain, and
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(44)">../src/torrent.cpp:1245</a></td><td>is verify_peer_cert called once per certificate in the chain, and this function just tells us which depth we're at right now? If so, the comment makes sense. any certificate that isn't the leaf (i.e. the one presented by the peer) should be accepted automatically, given preverified is true. The leaf certificate need to be verified to make sure its DN matches the info-hash</td></tr><tr id="44" 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
|
this function just tells us which depth we're at right now? If so, the comment
|
||||||
makes sense.
|
makes sense.
|
||||||
any certificate that isn't the leaf (i.e. the one presented by the peer)
|
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
|
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:1246</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:1245</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
|
// if files are checked for this torrent, call the extension
|
||||||
|
@ -2215,12 +2270,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)
|
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
|
||||||
match = true;
|
match = true;
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(44)">../src/torrent.cpp:5085</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info The mapped_files needs to be read both in the network thread and in the disk thread, since they both have their own mapped files structures which are kept in sync</td></tr><tr id="44" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(45)">../src/torrent.cpp:5088</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="45" 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
|
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
|
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
|
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
|
and in the disk thread, since they both have their own mapped files structures
|
||||||
which are kept in sync</h2><h4>../src/torrent.cpp:5085</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_seed_mode) m_verified.resize(m_torrent_file->num_pieces(), false);
|
which are kept in sync</h2><h4>../src/torrent.cpp:5088</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));
|
super_seeding(rd.dict_find_int_value("super_seeding", 0));
|
||||||
|
|
||||||
m_last_scrape = rd.dict_find_int_value("last_scrape", 0);
|
m_last_scrape = rd.dict_find_int_value("last_scrape", 0);
|
||||||
|
@ -2271,12 +2326,12 @@ which are kept in sync</h2><h4>../src/torrent.cpp:5085</h4><pre style="backgroun
|
||||||
{
|
{
|
||||||
char const* p = piece_priority->string_ptr();
|
char const* p = piece_priority->string_ptr();
|
||||||
for (int i = 0; i < piece_priority->string_length(); ++i)
|
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(45)">../src/torrent.cpp:5221</a></td><td>if this is a merkle torrent and we can't restore the tree, we need to wipe all the bits in the have array, but not necessarily we might want to do a full check to see if we have all the pieces. This is low priority since almost no one uses merkle torrents</td></tr><tr id="45" style="display: none;" colspan="3"><td colspan="3"><h2>if this is a merkle torrent and we can't
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(46)">../src/torrent.cpp:5224</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="46" 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
|
restore the tree, we need to wipe all the
|
||||||
bits in the have array, but not necessarily
|
bits in the have array, but not necessarily
|
||||||
we might want to do a full check to see if we have
|
we might want to do a full check to see if we have
|
||||||
all the pieces. This is low priority since almost
|
all the pieces. This is low priority since almost
|
||||||
no one uses merkle torrents</h2><h4>../src/torrent.cpp:5221</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
|
no one uses merkle torrents</h2><h4>../src/torrent.cpp:5224</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2327,9 +2382,9 @@ no one uses merkle torrents</h2><h4>../src/torrent.cpp:5221</h4><pre style="back
|
||||||
ret["num_complete"] = m_complete;
|
ret["num_complete"] = m_complete;
|
||||||
ret["num_incomplete"] = m_incomplete;
|
ret["num_incomplete"] = m_incomplete;
|
||||||
ret["num_downloaded"] = m_downloaded;
|
ret["num_downloaded"] = m_downloaded;
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(46)">../src/torrent.cpp:5409</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance. using file_base</td></tr><tr id="46" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(47)">../src/torrent.cpp:5412</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="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.
|
renamed, but also if they have been merged into a single file for instance.
|
||||||
using file_base</h2><h4>../src/torrent.cpp:5409</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> entry::string_type& pieces = ret["pieces"].string();
|
using file_base</h2><h4>../src/torrent.cpp:5412</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> entry::string_type& pieces = ret["pieces"].string();
|
||||||
pieces.resize(m_torrent_file->num_pieces());
|
pieces.resize(m_torrent_file->num_pieces());
|
||||||
if (is_seed())
|
if (is_seed())
|
||||||
{
|
{
|
||||||
|
@ -2380,10 +2435,10 @@ using file_base</h2><h4>../src/torrent.cpp:5409</h4><pre style="background: #f6f
|
||||||
error_code ec;
|
error_code ec;
|
||||||
policy::peer const* p = *i;
|
policy::peer const* p = *i;
|
||||||
address addr = p->address();
|
address addr = p->address();
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(47)">../src/torrent.cpp:7962</a></td><td>go through the pieces we have and count the total number of downloaders we have. Only count peers that are interested in us since some peers might not send have messages for pieces we have it num_interested == 0, we need to pick a new piece</td></tr><tr id="47" style="display: none;" colspan="3"><td colspan="3"><h2>go through the pieces we have and count the total number
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(48)">../src/torrent.cpp:7974</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="48" 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
|
of downloaders we have. Only count peers that are interested in us
|
||||||
since some peers might not send have messages for pieces we have
|
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:7962</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:7974</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||||
|
|
||||||
rarest_pieces.clear();
|
rarest_pieces.clear();
|
||||||
rarest_rarity = pp.peer_count;
|
rarest_rarity = pp.peer_count;
|
||||||
|
@ -2434,7 +2489,7 @@ it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:7
|
||||||
{
|
{
|
||||||
m_picker->get_availability(avail_vec);
|
m_picker->get_availability(avail_vec);
|
||||||
}
|
}
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(48)">../src/udp_tracker_connection.cpp:550</a></td><td>it would be more efficient to not use a string here. however, the problem is that some trackers will respond with actual strings. For example i2p trackers</td></tr><tr id="48" style="display: none;" colspan="3"><td colspan="3"><h2>it would be more efficient to not use a string here.
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(49)">../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="49" 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
|
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;"> }
|
with actual strings. For example i2p trackers</h2><h4>../src/udp_tracker_connection.cpp:550</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||||
|
|
||||||
|
@ -2487,7 +2542,7 @@ with actual strings. For example i2p trackers</h2><h4>../src/udp_tracker_connect
|
||||||
{
|
{
|
||||||
restart_read_timeout();
|
restart_read_timeout();
|
||||||
int action = detail::read_int32(buf);
|
int action = detail::read_int32(buf);
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(49)">../src/utp_stream.cpp:1604</a></td><td>this loop may not be very efficient</td></tr><tr id="49" style="display: none;" colspan="3"><td colspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1604</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(50)">../src/utp_stream.cpp:1604</a></td><td>this loop may not be very efficient</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1604</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
private:
|
private:
|
||||||
|
|
||||||
char* m_buf;
|
char* m_buf;
|
||||||
|
@ -2538,7 +2593,7 @@ bool utp_socket_impl::send_pkt(int flags)
|
||||||
if (sack > 32) sack = 32;
|
if (sack > 32) sack = 32;
|
||||||
}
|
}
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(50)">../src/kademlia/routing_table.cpp:293</a></td><td>instad of refreshing a bucket by using find_nodes, ping each node periodically</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>instad of refreshing a bucket by using find_nodes,
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(51)">../src/kademlia/routing_table.cpp:293</a></td><td>instad of refreshing a bucket by using find_nodes, ping each node periodically</td></tr><tr id="51" style="display: none;" colspan="3"><td colspan="3"><h2>instad of refreshing a bucket by using find_nodes,
|
||||||
ping each node periodically</h2><h4>../src/kademlia/routing_table.cpp:293</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> os << "]\n";
|
ping each node periodically</h2><h4>../src/kademlia/routing_table.cpp:293</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> os << "]\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2590,7 +2645,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
||||||
node_id mask = generate_prefix_mask(num_bits);
|
node_id mask = generate_prefix_mask(num_bits);
|
||||||
|
|
||||||
// target = (target & ~mask) | (root & mask)
|
// target = (target & ~mask) | (root & mask)
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(51)">../include/libtorrent/config.hpp:326</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="51" style="display: none;" colspan="3"><td colspan="3"><h2>Make this count Unicode characters instead of bytes on windows</h2><h4>../include/libtorrent/config.hpp:326</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(52)">../include/libtorrent/config.hpp:326</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="52" style="display: none;" colspan="3"><td colspan="3"><h2>Make this count Unicode characters instead of bytes on windows</h2><h4>../include/libtorrent/config.hpp:326</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
// ==== eCS(OS/2) ===
|
// ==== eCS(OS/2) ===
|
||||||
#elif defined __OS2__
|
#elif defined __OS2__
|
||||||
#define TORRENT_OS2
|
#define TORRENT_OS2
|
||||||
|
@ -2641,7 +2696,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
// internal
|
// internal
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(52)">../include/libtorrent/peer_connection.hpp:729</a></td><td>make this private</td></tr><tr id="52" style="display: none;" colspan="3"><td colspan="3"><h2>make this private</h2><h4>../include/libtorrent/peer_connection.hpp:729</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void set_soft_packet_size(int size) { m_soft_packet_size = size; }
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(53)">../include/libtorrent/peer_connection.hpp:729</a></td><td>make this private</td></tr><tr id="53" style="display: none;" colspan="3"><td colspan="3"><h2>make this private</h2><h4>../include/libtorrent/peer_connection.hpp:729</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void set_soft_packet_size(int size) { m_soft_packet_size = size; }
|
||||||
|
|
||||||
// if allow_encrypted is false, and the torrent 'ih' turns out
|
// if allow_encrypted is false, and the torrent 'ih' turns out
|
||||||
// to be an encrypted torrent (AES-256 encrypted) the peer will
|
// to be an encrypted torrent (AES-256 encrypted) the peer will
|
||||||
|
@ -2692,7 +2747,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
||||||
// we have choked the upload to the peer
|
// we have choked the upload to the peer
|
||||||
bool m_choked:1;
|
bool m_choked:1;
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(53)">../include/libtorrent/peer_connection.hpp:810</a></td><td>make these private as well</td></tr><tr id="53" style="display: none;" colspan="3"><td colspan="3"><h2>make these private as well</h2><h4>../include/libtorrent/peer_connection.hpp:810</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(54)">../include/libtorrent/peer_connection.hpp:810</a></td><td>make these private as well</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>make these private as well</h2><h4>../include/libtorrent/peer_connection.hpp:810</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
// when this is set, the peer_connection socket is
|
// when this is set, the peer_connection socket is
|
||||||
// corked, similar to the linux TCP feature TCP_CORK.
|
// corked, similar to the linux TCP feature TCP_CORK.
|
||||||
// we won't send anything to the actual socket, just
|
// we won't send anything to the actual socket, just
|
||||||
|
@ -2743,7 +2798,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
||||||
sliding_average<20> m_send_rate;
|
sliding_average<20> m_send_rate;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(54)">../include/libtorrent/proxy_base.hpp:166</a></td><td>it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to remember the bind port and bind once we know where the proxy is
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(55)">../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="55" 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;"> {
|
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);
|
return m_sock.get_option(opt, ec);
|
||||||
}
|
}
|
||||||
|
@ -2795,7 +2850,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
|
||||||
m_sock.close(ec);
|
m_sock.close(ec);
|
||||||
m_resolver.cancel();
|
m_resolver.cancel();
|
||||||
}
|
}
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(55)">../include/libtorrent/stat.hpp:113</a></td><td>this is 4 bytes of padding!</td></tr><tr id="55" style="display: none;" colspan="3"><td colspan="3"><h2>this is 4 bytes of padding!</h2><h4>../include/libtorrent/stat.hpp:113</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(56)">../include/libtorrent/stat.hpp:113</a></td><td>this is 4 bytes of padding!</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>this is 4 bytes of padding!</h2><h4>../include/libtorrent/stat.hpp:113</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
int counter() const { return m_counter; }
|
int counter() const { return m_counter; }
|
||||||
|
|
||||||
void clear()
|
void clear()
|
||||||
|
@ -2846,7 +2901,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(56)">../include/libtorrent/torrent.hpp:1351</a></td><td>there's space for another bit here</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>there's space for another bit here</h2><h4>../include/libtorrent/torrent.hpp:1351</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(57)">../include/libtorrent/torrent.hpp:1357</a></td><td>there's space for another bit here</td></tr><tr id="57" style="display: none;" colspan="3"><td colspan="3"><h2>there's space for another bit here</h2><h4>../include/libtorrent/torrent.hpp:1357</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
// these represent whether or not this torrent is counted
|
// these represent whether or not this torrent is counted
|
||||||
// in the total counters of active seeds and downloads
|
// in the total counters of active seeds and downloads
|
||||||
// in the session.
|
// in the session.
|
||||||
|
@ -2897,7 +2952,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
|
||||||
|
|
||||||
// if this is true, libtorrent may pause and resume
|
// if this is true, libtorrent may pause and resume
|
||||||
// this torrent depending on queuing rules. Torrents
|
// this torrent depending on queuing rules. Torrents
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(57)">../include/libtorrent/torrent_info.hpp:123</a></td><td>include the number of peers received from this tracker, at last announce</td></tr><tr id="57" style="display: none;" colspan="3"><td colspan="3"><h2>include the number of peers received from this tracker, at last announce</h2><h4>../include/libtorrent/torrent_info.hpp:123</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(58)">../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="58" 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
|
// if this tracker failed the last time it was contacted
|
||||||
// this error code specifies what error occurred
|
// this error code specifies what error occurred
|
||||||
error_code last_error;
|
error_code last_error;
|
||||||
|
@ -2948,7 +3003,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
|
||||||
// flags for the source bitmask, each indicating where
|
// flags for the source bitmask, each indicating where
|
||||||
// we heard about this tracker
|
// we heard about this tracker
|
||||||
enum tracker_source
|
enum tracker_source
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(58)">../include/libtorrent/upnp.hpp:121</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="58" style="display: none;" colspan="3"><td colspan="3"><h2>support using the windows API for UPnP operations as well</h2><h4>../include/libtorrent/upnp.hpp:121</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(59)">../include/libtorrent/upnp.hpp:121</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="59" 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 const char* name() const BOOST_SYSTEM_NOEXCEPT;
|
||||||
virtual std::string message(int ev) 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
|
virtual boost::system::error_condition default_error_condition(int ev) const BOOST_SYSTEM_NOEXCEPT
|
||||||
|
@ -2999,7 +3054,7 @@ public:
|
||||||
// is -1, which means failure. There will not be any error alert notification for
|
// is -1, which means failure. There will not be any error alert notification for
|
||||||
// mappings that fail with a -1 return value.
|
// mappings that fail with a -1 return value.
|
||||||
int add_mapping(protocol_type p, int external_port, int local_port);
|
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(59)">../include/libtorrent/utp_stream.hpp:378</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="59" style="display: none;" colspan="3"><td colspan="3"><h2>implement blocking write. Low priority since it's not used (yet)</h2><h4>../include/libtorrent/utp_stream.hpp:378</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (typename Mutable_Buffers::const_iterator i = buffers.begin()
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(60)">../include/libtorrent/utp_stream.hpp:378</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="60" 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)
|
, end(buffers.end()); i != end; ++i)
|
||||||
{
|
{
|
||||||
using asio::buffer_cast;
|
using asio::buffer_cast;
|
||||||
|
|
Loading…
Reference in New Issue