forked from premiere/premiere-libtorrent
regenerate todo list
This commit is contained in:
parent
7607f20e2a
commit
28780c2a9f
415
docs/todo.html
415
docs/todo.html
|
@ -21,62 +21,11 @@
|
||||||
|
|
||||||
</head><body>
|
</head><body>
|
||||||
<h1>libtorrent todo-list</h1>
|
<h1>libtorrent todo-list</h1>
|
||||||
<span style="color: #f77">8 important</span>
|
<span style="color: #f77">6 important</span>
|
||||||
<span style="color: #3c3">9 relevant</span>
|
<span style="color: #3c3">9 relevant</span>
|
||||||
<span style="color: #77f">16 feasible</span>
|
<span style="color: #77f">16 feasible</span>
|
||||||
<span style="color: #999">33 notes</span>
|
<span style="color: #999">34 notes</span>
|
||||||
<table width="100%" border="1" style="border-collapse: collapse;"><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(0)">src/torrent.cpp:1505</a></td><td>filter out peers that are disconnecting</td></tr><tr id="0" style="display: none;" colspan="3"><td colspan="3"><h2>filter out peers that are disconnecting</h2><h4>src/torrent.cpp:1505</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> snprintf(filename, sizeof(filename), "/tmp/%d.pem", rand());
|
<table width="100%" border="1" style="border-collapse: collapse;"><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(0)">src/torrent.cpp:6073</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="0" 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:6073</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
|
||||||
FILE* f = fopen(filename, "w+");
|
|
||||||
fwrite(cert.c_str(), cert.size(), 1, f);
|
|
||||||
fclose(f);
|
|
||||||
ctx->load_verify_file(filename);
|
|
||||||
#endif
|
|
||||||
// if all went well, set the torrent ssl context to this one
|
|
||||||
m_ssl_ctx = ctx;
|
|
||||||
// tell the client we need a cert for this torrent
|
|
||||||
alerts().post_alert(torrent_need_cert_alert(get_handle()));
|
|
||||||
#else
|
|
||||||
set_error(asio::error::operation_not_supported, "x.509 certificate");
|
|
||||||
pause();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif // TORRENT_OPENSSL
|
|
||||||
|
|
||||||
peer_connection* torrent::find_lowest_ranking_peer() const
|
|
||||||
{
|
|
||||||
<div style="background: #ffff00" width="100%"> const_peer_iterator lowest_rank = std::min_element(begin(), end()
|
|
||||||
</div> , boost::bind(&peer_connection::peer_rank, _1)
|
|
||||||
< boost::bind(&peer_connection::peer_rank, _2));
|
|
||||||
|
|
||||||
if (lowest_rank == end()) return NULL;
|
|
||||||
return *lowest_rank;
|
|
||||||
}
|
|
||||||
|
|
||||||
// this may not be called from a constructor because of the call to
|
|
||||||
// shared_from_this()
|
|
||||||
void torrent::init()
|
|
||||||
{
|
|
||||||
TORRENT_ASSERT(m_ses.is_network_thread());
|
|
||||||
TORRENT_ASSERT(m_torrent_file->is_valid());
|
|
||||||
TORRENT_ASSERT(m_torrent_file->num_files() > 0);
|
|
||||||
TORRENT_ASSERT(m_torrent_file->total_size() >= 0);
|
|
||||||
|
|
||||||
#ifdef TORRENT_USE_OPENSSL
|
|
||||||
std::string cert = m_torrent_file->ssl_cert();
|
|
||||||
if (!cert.empty()) init_ssl(cert);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
m_file_priority.resize(m_torrent_file->num_files(), 1);
|
|
||||||
m_file_progress.resize(m_torrent_file->num_files(), 0);
|
|
||||||
|
|
||||||
m_block_size_shift = root2((std::min)(int(block_size()), m_torrent_file->piece_length()));
|
|
||||||
|
|
||||||
if (m_torrent_file->num_pieces() > piece_picker::max_pieces)
|
|
||||||
{
|
|
||||||
set_error(errors::too_many_pieces_in_torrent, "");
|
|
||||||
pause();
|
|
||||||
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(1)">src/torrent.cpp:6004</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="1" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it</h2><h4>src/torrent.cpp:6004</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);
|
||||||
|
@ -127,7 +76,7 @@
|
||||||
return m_connections.size() < m_max_connections
|
return m_connections.size() < m_max_connections
|
||||||
&& !is_paused()
|
&& !is_paused()
|
||||||
&& ((m_state != torrent_status::checking_files
|
&& ((m_state != torrent_status::checking_files
|
||||||
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(2)">src/utp_stream.cpp:412</a></td><td>remove the read timeout concept. This should not be necessary</td></tr><tr id="2" style="display: none;" colspan="3"><td colspan="3"><h2>remove the read timeout concept. This should not be necessary</h2><h4>src/utp_stream.cpp:412</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // these are the callbacks made into the utp_stream object
|
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(1)">src/utp_stream.cpp:412</a></td><td>remove the read timeout concept. This should not be necessary</td></tr><tr id="1" style="display: none;" colspan="3"><td colspan="3"><h2>remove the read timeout concept. This should not be necessary</h2><h4>src/utp_stream.cpp:412</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // these are the callbacks made into the utp_stream object
|
||||||
// on read/write/connect events
|
// on read/write/connect events
|
||||||
utp_stream::handler_t m_read_handler;
|
utp_stream::handler_t m_read_handler;
|
||||||
utp_stream::handler_t m_write_handler;
|
utp_stream::handler_t m_write_handler;
|
||||||
|
@ -149,7 +98,7 @@
|
||||||
// before)
|
// before)
|
||||||
<div style="background: #ffff00" width="100%"> ptime m_read_timeout;
|
<div style="background: #ffff00" width="100%"> ptime m_read_timeout;
|
||||||
</div>
|
</div>
|
||||||
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(3)">src/utp_stream.cpp:415</a></td><td>remove the write timeout concept. This should not be necessary</td></tr><tr id="3" style="display: none;" colspan="3"><td colspan="3"><h2>remove the write timeout concept. This should not be necessary</h2><h4>src/utp_stream.cpp:415</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> utp_stream::handler_t m_read_handler;
|
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(2)">src/utp_stream.cpp:415</a></td><td>remove the write timeout concept. This should not be necessary</td></tr><tr id="2" style="display: none;" colspan="3"><td colspan="3"><h2>remove the write timeout concept. This should not be necessary</h2><h4>src/utp_stream.cpp:415</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> utp_stream::handler_t m_read_handler;
|
||||||
utp_stream::handler_t m_write_handler;
|
utp_stream::handler_t m_write_handler;
|
||||||
utp_stream::connect_handler_t m_connect_handler;
|
utp_stream::connect_handler_t m_connect_handler;
|
||||||
|
|
||||||
|
@ -200,59 +149,7 @@
|
||||||
timestamp_history m_their_delay_hist;
|
timestamp_history m_their_delay_hist;
|
||||||
|
|
||||||
// the number of bytes we have buffered in m_inbuf
|
// the number of bytes we have buffered in m_inbuf
|
||||||
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(4)">src/utp_stream.cpp:1685</a></td><td>this alloca() statement won't necessarily produce correctly aligned memory. do something about that</td></tr><tr id="4" style="display: none;" colspan="3"><td colspan="3"><h2>this alloca() statement won't necessarily produce
|
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(3)">src/kademlia/rpc_manager.cpp:36</a></td><td>remove this dependency by having the dht observer have its own flags</td></tr><tr id="3" style="display: none;" colspan="3"><td colspan="3"><h2>remove this dependency by having the dht observer
|
||||||
correctly aligned memory. do something about that</h2><h4>src/utp_stream.cpp:1685</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> bool stack_alloced = false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// payload size being zero means we're just sending
|
|
||||||
// an force. We should not pick up the nagle packet
|
|
||||||
if (!m_nagle_packet || (payload_size == 0 && force))
|
|
||||||
{
|
|
||||||
// we only need a heap allocation if we have payload and
|
|
||||||
// need to keep the packet around (in the outbuf)
|
|
||||||
if (payload_size)
|
|
||||||
{
|
|
||||||
p = (packet*)malloc(sizeof(packet) + m_mtu);
|
|
||||||
p->allocated = m_mtu;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
#ifdef TORRENT_DEBUG
|
|
||||||
stack_alloced = true;
|
|
||||||
#endif
|
|
||||||
TORRENT_ASSERT(force);
|
|
||||||
<div style="background: #ffff00" width="100%"> p = (packet*)TORRENT_ALLOCA(char, sizeof(packet) + packet_size);
|
|
||||||
</div> UTP_LOGV("%8p: allocating %d bytes on the stack\n", this, packet_size);
|
|
||||||
p->allocated = packet_size;
|
|
||||||
}
|
|
||||||
|
|
||||||
p->size = packet_size;
|
|
||||||
p->header_size = packet_size - payload_size;
|
|
||||||
p->num_transmissions = 0;
|
|
||||||
p->need_resend = false;
|
|
||||||
ptr = p->buf;
|
|
||||||
h = (utp_header*)ptr;
|
|
||||||
ptr += sizeof(utp_header);
|
|
||||||
|
|
||||||
h->extension = sack ? 1 : 0;
|
|
||||||
h->connection_id = m_send_id;
|
|
||||||
// seq_nr is ignored for ST_STATE packets, so it doesn't
|
|
||||||
// matter that we say this is a sequence number we haven't
|
|
||||||
// actually sent yet
|
|
||||||
h->seq_nr = m_seq_nr;
|
|
||||||
h->type_ver = ((payload_size ? ST_DATA : ST_STATE) << 4) | 1;
|
|
||||||
|
|
||||||
write_payload(p->buf + p->header_size, payload_size);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// pick up the nagle packet and keep adding bytes to it
|
|
||||||
p = m_nagle_packet;
|
|
||||||
|
|
||||||
ptr = p->buf + sizeof(utp_header);
|
|
||||||
h = (utp_header*)p->buf;
|
|
||||||
TORRENT_ASSERT(h->seq_nr == m_seq_nr);
|
|
||||||
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(5)">src/kademlia/rpc_manager.cpp:36</a></td><td>remove this dependency by having the dht observer have its own flags</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>remove this dependency by having the dht observer
|
|
||||||
have its own flags</h2><h4>src/kademlia/rpc_manager.cpp:36</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> contributors may be used to endorse or promote products derived
|
have its own flags</h2><h4>src/kademlia/rpc_manager.cpp:36</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> contributors may be used to endorse or promote products derived
|
||||||
from this software without specific prior written permission.
|
from this software without specific prior written permission.
|
||||||
|
|
||||||
|
@ -304,7 +201,7 @@ namespace io = libtorrent::detail;
|
||||||
|
|
||||||
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
||||||
TORRENT_DEFINE_LOG(rpc)
|
TORRENT_DEFINE_LOG(rpc)
|
||||||
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(6)">include/libtorrent/kademlia/dht_tracker.hpp:79</a></td><td>take a udp_socket_interface here instead. Move udp_socket_interface down into libtorrent core</td></tr><tr id="6" style="display: none;" colspan="3"><td colspan="3"><h2>take a udp_socket_interface here instead. Move udp_socket_interface down into libtorrent core</h2><h4>include/libtorrent/kademlia/dht_tracker.hpp:79</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> struct lazy_entry;
|
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(4)">include/libtorrent/kademlia/dht_tracker.hpp:79</a></td><td>take a udp_socket_interface here instead. Move udp_socket_interface down into libtorrent core</td></tr><tr id="4" style="display: none;" colspan="3"><td colspan="3"><h2>take a udp_socket_interface here instead. Move udp_socket_interface down into libtorrent core</h2><h4>include/libtorrent/kademlia/dht_tracker.hpp:79</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> struct lazy_entry;
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace libtorrent { namespace dht
|
namespace libtorrent { namespace dht
|
||||||
|
@ -355,7 +252,7 @@ namespace libtorrent { namespace dht
|
||||||
|
|
||||||
void on_name_lookup(error_code const& e
|
void on_name_lookup(error_code const& e
|
||||||
, udp::resolver::iterator host);
|
, udp::resolver::iterator host);
|
||||||
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(7)">include/libtorrent/kademlia/find_data.hpp:60</a></td><td>rename this class to find_peers, since that's what it does find_data is an unnecessarily generic name</td></tr><tr id="7" style="display: none;" colspan="3"><td colspan="3"><h2>rename this class to find_peers, since that's what it does
|
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(5)">include/libtorrent/kademlia/find_data.hpp:60</a></td><td>rename this class to find_peers, since that's what it does find_data is an unnecessarily generic name</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>rename this class to find_peers, since that's what it does
|
||||||
find_data is an unnecessarily generic name</h2><h4>include/libtorrent/kademlia/find_data.hpp:60</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include <libtorrent/kademlia/node_id.hpp>
|
find_data is an unnecessarily generic name</h2><h4>include/libtorrent/kademlia/find_data.hpp:60</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include <libtorrent/kademlia/node_id.hpp>
|
||||||
#include <libtorrent/kademlia/routing_table.hpp>
|
#include <libtorrent/kademlia/routing_table.hpp>
|
||||||
#include <libtorrent/kademlia/rpc_manager.hpp>
|
#include <libtorrent/kademlia/rpc_manager.hpp>
|
||||||
|
@ -407,7 +304,59 @@ private:
|
||||||
nodes_callback m_nodes_callback;
|
nodes_callback m_nodes_callback;
|
||||||
std::map<node_id, std::string> m_write_tokens;
|
std::map<node_id, std::string> m_write_tokens;
|
||||||
node_id const m_target;
|
node_id const m_target;
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(8)">src/session_impl.cpp:5113</a></td><td>if we still can't find the torrent, we should probably look for it by url here</td></tr><tr id="8" style="display: none;" colspan="3"><td colspan="3"><h2>if we still can't find the torrent, we should probably look for it by url here</h2><h4>src/session_impl.cpp:5113</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(6)">src/piece_picker.cpp:1487</a></td><td>m_downloads size will be > 0 just by having pad-files in the torrent. That should be taken into account here.</td></tr><tr id="6" style="display: none;" colspan="3"><td colspan="3"><h2>m_downloads size will be > 0 just by having pad-files
|
||||||
|
in the torrent. That should be taken into account here.</h2><h4>src/piece_picker.cpp:1487</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // have an affinity to pick pieces in the same speed
|
||||||
|
// category.
|
||||||
|
// * ignore_whole_pieces
|
||||||
|
// ignores the prefer_whole_pieces parameter (as if
|
||||||
|
// it was 0)
|
||||||
|
|
||||||
|
// only one of rarest_first, sequential can be set
|
||||||
|
|
||||||
|
void piece_picker::pick_pieces(bitfield const& pieces
|
||||||
|
, std::vector<piece_block>& interesting_blocks, int num_blocks
|
||||||
|
, int prefer_whole_pieces, void* peer, piece_state_t speed
|
||||||
|
, int options, std::vector<int> const& suggested_pieces
|
||||||
|
, int num_peers) const
|
||||||
|
{
|
||||||
|
TORRENT_ASSERT(peer == 0 || static_cast<policy::peer*>(peer)->in_use);
|
||||||
|
|
||||||
|
// prevent the number of partial pieces to grow indefinitely
|
||||||
|
// make this scale by the number of peers we have. For large
|
||||||
|
// scale clients, we would have more peers, and allow a higher
|
||||||
|
// threshold for the number of partials
|
||||||
|
<div style="background: #ffff00" width="100%"> if (m_downloads.size() > num_peers * 3 / 2) options |= prioritize_partials;
|
||||||
|
</div>
|
||||||
|
if (options & ignore_whole_pieces) prefer_whole_pieces = 0;
|
||||||
|
|
||||||
|
// only one of rarest_first and sequential can be set.
|
||||||
|
TORRENT_ASSERT(((options & rarest_first) ? 1 : 0)
|
||||||
|
+ ((options & sequential) ? 1 : 0) <= 1);
|
||||||
|
#ifdef TORRENT_EXPENSIVE_INVARIANT_CHECKS
|
||||||
|
TORRENT_PIECE_PICKER_INVARIANT_CHECK;
|
||||||
|
#endif
|
||||||
|
TORRENT_ASSERT(num_blocks > 0);
|
||||||
|
TORRENT_ASSERT(pieces.size() == m_piece_map.size());
|
||||||
|
|
||||||
|
TORRENT_ASSERT(!m_priority_boundries.empty()
|
||||||
|
|| m_dirty);
|
||||||
|
|
||||||
|
// this will be filled with blocks that we should not request
|
||||||
|
// unless we can't find num_blocks among the other ones.
|
||||||
|
// blocks that belong to pieces with a mismatching speed
|
||||||
|
// category for instance, or if we prefer whole pieces,
|
||||||
|
// blocks belonging to a piece that others have
|
||||||
|
// downloaded to
|
||||||
|
std::vector<piece_block> backup_blocks;
|
||||||
|
std::vector<piece_block> backup_blocks2;
|
||||||
|
const std::vector<int> empty_vector;
|
||||||
|
|
||||||
|
// When prefer_whole_pieces is set (usually set when downloading from
|
||||||
|
// fast peers) the partial pieces will not be prioritized, but actually
|
||||||
|
// ignored as long as possible. All blocks found in downloading
|
||||||
|
// pieces are regarded as backup blocks
|
||||||
|
|
||||||
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(7)">src/session_impl.cpp:5113</a></td><td>if we still can't find the torrent, we should probably look for it by url here</td></tr><tr id="7" style="display: none;" colspan="3"><td colspan="3"><h2>if we still can't find the torrent, we should probably look for it by url here</h2><h4>src/session_impl.cpp:5113</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||||
}
|
}
|
||||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||||
else
|
else
|
||||||
|
@ -458,7 +407,7 @@ private:
|
||||||
torrent_ptr->start();
|
torrent_ptr->start();
|
||||||
|
|
||||||
#ifndef TORRENT_DISABLE_EXTENSIONS
|
#ifndef TORRENT_DISABLE_EXTENSIONS
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(9)">src/torrent.cpp:5789</a></td><td>pass in ec along with the alert</td></tr><tr id="9" style="display: none;" colspan="3"><td colspan="3"><h2>pass in ec along with the alert</h2><h4>src/torrent.cpp:5789</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(8)">src/torrent.cpp:5858</a></td><td>pass in ec along with the alert</td></tr><tr id="8" style="display: none;" colspan="3"><td colspan="3"><h2>pass in ec along with the alert</h2><h4>src/torrent.cpp:5858</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
if (info_hash != m_torrent_file->info_hash())
|
if (info_hash != m_torrent_file->info_hash())
|
||||||
{
|
{
|
||||||
if (alerts().should_post<metadata_failed_alert>())
|
if (alerts().should_post<metadata_failed_alert>())
|
||||||
|
@ -509,7 +458,7 @@ private:
|
||||||
{
|
{
|
||||||
std::set<peer_connection*>::iterator p = i++;
|
std::set<peer_connection*>::iterator p = i++;
|
||||||
(*p)->disconnect_if_redundant();
|
(*p)->disconnect_if_redundant();
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(10)">src/utp_stream.cpp:617</a></td><td>support the option to turn it off</td></tr><tr id="10" style="display: none;" colspan="3"><td colspan="3"><h2>support the option to turn it off</h2><h4>src/utp_stream.cpp:617</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> UTP_STATE_ERROR_WAIT,
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(9)">src/utp_stream.cpp:617</a></td><td>support the option to turn it off</td></tr><tr id="9" style="display: none;" colspan="3"><td colspan="3"><h2>support the option to turn it off</h2><h4>src/utp_stream.cpp:617</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> UTP_STATE_ERROR_WAIT,
|
||||||
|
|
||||||
// there are no more references to this socket
|
// there are no more references to this socket
|
||||||
// and we can delete it
|
// and we can delete it
|
||||||
|
@ -560,9 +509,9 @@ private:
|
||||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||||
int socket_impl_size() { return sizeof(utp_socket_impl); }
|
int socket_impl_size() { return sizeof(utp_socket_impl); }
|
||||||
#endif
|
#endif
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(11)">src/utp_stream.cpp:1848</a></td><td>we might want to do something else here as well, to resend the packet immediately without it being an MTU probe</td></tr><tr id="11" style="display: none;" colspan="3"><td colspan="3"><h2>we might want to do something else here
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(10)">src/utp_stream.cpp:1850</a></td><td>we might want to do something else here as well, to resend the packet immediately without it being an MTU probe</td></tr><tr id="10" style="display: none;" colspan="3"><td colspan="3"><h2>we might want to do something else here
|
||||||
as well, to resend the packet immediately without
|
as well, to resend the packet immediately without
|
||||||
it being an MTU probe</h2><h4>src/utp_stream.cpp:1848</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , boost::uint32_t(h->timestamp_difference_microseconds), int(p->mtu_probe)
|
it being an MTU probe</h2><h4>src/utp_stream.cpp:1850</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , boost::uint32_t(h->timestamp_difference_microseconds), int(p->mtu_probe)
|
||||||
, h->extension);
|
, h->extension);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -613,7 +562,7 @@ it being an MTU probe</h2><h4>src/utp_stream.cpp:1848</h4><pre style="background
|
||||||
{
|
{
|
||||||
// if we're sending a payload packet, there should not
|
// if we're sending a payload packet, there should not
|
||||||
// be a nagle packet waiting for more data
|
// be a nagle packet waiting for more data
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(12)">src/kademlia/dht_tracker.cpp:641</a></td><td>fix this stats logging. For instance, the stats counters could be factored out into its own class, and dht_tracker could take an optional reference to it ++m_replies_sent[e["r"]]; m_replies_bytes_sent[e["r"]] += int(m_send_buf.size());</td></tr><tr id="12" style="display: none;" colspan="3"><td colspan="3"><h2>fix this stats logging. For instance,
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(11)">src/kademlia/dht_tracker.cpp:641</a></td><td>fix this stats logging. For instance, the stats counters could be factored out into its own class, and dht_tracker could take an optional reference to it ++m_replies_sent[e["r"]]; m_replies_bytes_sent[e["r"]] += int(m_send_buf.size());</td></tr><tr id="11" style="display: none;" colspan="3"><td colspan="3"><h2>fix this stats logging. For instance,
|
||||||
the stats counters could be factored out into its own
|
the stats counters could be factored out into its own
|
||||||
class, and dht_tracker could take an optional reference to it
|
class, and dht_tracker could take an optional reference to it
|
||||||
++m_replies_sent[e["r"]];
|
++m_replies_sent[e["r"]];
|
||||||
|
@ -657,7 +606,7 @@ m_replies_bytes_sent[e["r"]] += int(m_send_buf.size());</h2><h4>src/kademlia/dht
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(13)">src/kademlia/node.cpp:63</a></td><td>make this configurable in dht_settings</td></tr><tr id="13" style="display: none;" colspan="3"><td colspan="3"><h2>make this configurable in dht_settings</h2><h4>src/kademlia/node.cpp:63</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include "libtorrent/alert.hpp"
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(12)">src/kademlia/node.cpp:63</a></td><td>make this configurable in dht_settings</td></tr><tr id="12" style="display: none;" colspan="3"><td colspan="3"><h2>make this configurable in dht_settings</h2><h4>src/kademlia/node.cpp:63</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include "libtorrent/alert.hpp"
|
||||||
#include "libtorrent/socket.hpp"
|
#include "libtorrent/socket.hpp"
|
||||||
#include "libtorrent/random.hpp"
|
#include "libtorrent/random.hpp"
|
||||||
#include "libtorrent/aux_/session_impl.hpp"
|
#include "libtorrent/aux_/session_impl.hpp"
|
||||||
|
@ -708,10 +657,10 @@ node_impl::node_impl(alert_dispatcher* alert_disp
|
||||||
, udp_socket_interface* sock
|
, udp_socket_interface* sock
|
||||||
, dht_settings const& settings, node_id nid, address const& external_address
|
, dht_settings const& settings, node_id nid, address const& external_address
|
||||||
, dht_observer* observer)
|
, dht_observer* observer)
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(14)">include/libtorrent/torrent.hpp:1038</a></td><td>this should be a deque, since time critical pieces are expected to be popped in the same order as they are sorted. The expectation is that new items are pushed back and items are popped from the front</td></tr><tr id="14" style="display: none;" colspan="3"><td colspan="3"><h2>this should be a deque, since time critical
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(13)">include/libtorrent/torrent.hpp:1044</a></td><td>this should be a deque, since time critical pieces are expected to be popped in the same order as they are sorted. The expectation is that new items are pushed back and items are popped from the front</td></tr><tr id="13" style="display: none;" colspan="3"><td colspan="3"><h2>this should be a deque, since time critical
|
||||||
pieces are expected to be popped in the same order
|
pieces are expected to be popped in the same order
|
||||||
as they are sorted. The expectation is that new items
|
as they are sorted. The expectation is that new items
|
||||||
are pushed back and items are popped from the front</h2><h4>include/libtorrent/torrent.hpp:1038</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
are pushed back and items are popped from the front</h2><h4>include/libtorrent/torrent.hpp:1044</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
struct time_critical_piece
|
struct time_critical_piece
|
||||||
{
|
{
|
||||||
// when this piece was first requested
|
// when this piece was first requested
|
||||||
|
@ -762,7 +711,7 @@ are pushed back and items are popped from the front</h2><h4>include/libtorrent/t
|
||||||
|
|
||||||
// each bit represents a piece. a set bit means
|
// each bit represents a piece. a set bit means
|
||||||
// the piece has had its hash verified. This
|
// the piece has had its hash verified. This
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(15)">include/libtorrent/torrent_info.hpp:455</a></td><td>these strings (m_comment, m_created_by, m_ssl_root_cert) could be lazy_entry* to save memory</td></tr><tr id="15" style="display: none;" colspan="3"><td colspan="3"><h2>these strings (m_comment, m_created_by, m_ssl_root_cert) could be lazy_entry* to save memory</h2><h4>include/libtorrent/torrent_info.hpp:455</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::vector<announce_entry> m_urls;
|
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(14)">include/libtorrent/torrent_info.hpp:466</a></td><td>these strings (m_comment, m_created_by, m_ssl_root_cert) could be lazy_entry* to save memory</td></tr><tr id="14" style="display: none;" colspan="3"><td colspan="3"><h2>these strings (m_comment, m_created_by, m_ssl_root_cert) could be lazy_entry* to save memory</h2><h4>include/libtorrent/torrent_info.hpp:466</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::vector<announce_entry> m_urls;
|
||||||
std::vector<web_seed_entry> m_web_seeds;
|
std::vector<web_seed_entry> m_web_seeds;
|
||||||
nodes_t m_nodes;
|
nodes_t m_nodes;
|
||||||
|
|
||||||
|
@ -813,46 +762,7 @@ are pushed back and items are popped from the front</h2><h4>include/libtorrent/t
|
||||||
// this is used when creating a torrent. If there's
|
// this is used when creating a torrent. If there's
|
||||||
// only one file there are cases where it's impossible
|
// only one file there are cases where it's impossible
|
||||||
// to know if it should be written as a multifile torrent
|
// to know if it should be written as a multifile torrent
|
||||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(16)">include/libtorrent/kademlia/node_entry.hpp:92</a></td><td>replace with a union of address_v4 and address_v6 to not waste space. This struct is instantiated hundreds of times for the routing table</td></tr><tr id="16" style="display: none;" colspan="3"><td colspan="3"><h2>replace with a union of address_v4 and address_v6
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(15)">src/http_seed_connection.cpp:120</a></td><td>in chunked encoding mode, this assert won't hold. the chunk headers should be subtracted from the receive_buffer_size</td></tr><tr id="15" style="display: none;" colspan="3"><td colspan="3"><h2>in chunked encoding mode, this assert won't hold.
|
||||||
to not waste space. This struct is instantiated hundreds of times
|
|
||||||
for the routing table</h2><h4>include/libtorrent/kademlia/node_entry.hpp:92</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> , id(0)
|
|
||||||
{
|
|
||||||
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
|
||||||
first_seen = time_now();
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
bool pinged() const { return timeout_count != 0xffff; }
|
|
||||||
void set_pinged() { if (timeout_count == 0xffff) timeout_count = 0; }
|
|
||||||
void timed_out() { if (pinged()) ++timeout_count; }
|
|
||||||
int fail_count() const { return pinged() ? timeout_count : 0; }
|
|
||||||
void reset_fail_count() { if (pinged()) timeout_count = 0; }
|
|
||||||
udp::endpoint ep() const { return udp::endpoint(addr, port); }
|
|
||||||
bool confirmed() const { return timeout_count == 0; }
|
|
||||||
void update_rtt(int new_rtt)
|
|
||||||
{
|
|
||||||
if (rtt == 0xffff) rtt = new_rtt;
|
|
||||||
else rtt = int(rtt) / 3 + int(new_rtt) * 2 / 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
<div style="background: #ffff00" width="100%"> address addr;
|
|
||||||
</div> boost::uint16_t port;
|
|
||||||
// the number of times this node has failed to
|
|
||||||
// respond in a row
|
|
||||||
boost::uint16_t timeout_count;
|
|
||||||
// the average RTT of this node
|
|
||||||
boost::uint16_t rtt;
|
|
||||||
node_id id;
|
|
||||||
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
|
||||||
ptime first_seen;
|
|
||||||
#endif
|
|
||||||
};
|
|
||||||
|
|
||||||
} } // namespace libtorrent::dht
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(17)">src/http_seed_connection.cpp:120</a></td><td>in chunked encoding mode, this assert won't hold. the chunk headers should be subtracted from the receive_buffer_size</td></tr><tr id="17" style="display: none;" colspan="3"><td colspan="3"><h2>in chunked encoding mode, this assert won't hold.
|
|
||||||
the chunk headers should be subtracted from the receive_buffer_size</h2><h4>src/http_seed_connection.cpp:120</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> boost::optional<piece_block_progress>
|
the chunk headers should be subtracted from the receive_buffer_size</h2><h4>src/http_seed_connection.cpp:120</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> boost::optional<piece_block_progress>
|
||||||
http_seed_connection::downloading_piece_progress() const
|
http_seed_connection::downloading_piece_progress() const
|
||||||
{
|
{
|
||||||
|
@ -904,7 +814,7 @@ the chunk headers should be subtracted from the receive_buffer_size</h2><h4>src/
|
||||||
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(18)">src/peer_connection.cpp:2488</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="18" 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(16)">src/peer_connection.cpp:2488</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="16" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
|
||||||
all completed disk operations</h2><h4>src/peer_connection.cpp:2488</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
all completed disk operations</h2><h4>src/peer_connection.cpp:2488</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||||
|
|
||||||
if (is_disconnecting()) return;
|
if (is_disconnecting()) return;
|
||||||
|
@ -956,7 +866,7 @@ all completed disk operations</h2><h4>src/peer_connection.cpp:2488</h4><pre styl
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(19)">src/session_impl.cpp:5471</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="19" 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(17)">src/session_impl.cpp:5471</a></td><td>report the proper address of the router as the source IP of this understanding of our external address, instead of the empty address</td></tr><tr id="17" style="display: none;" colspan="3"><td colspan="3"><h2>report the proper address of the router as the source IP of
|
||||||
this understanding of our external address, instead of the empty address</h2><h4>src/session_impl.cpp:5471</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:5471</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)
|
||||||
{
|
{
|
||||||
|
@ -1008,7 +918,7 @@ 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(20)">src/session_impl.cpp:5676</a></td><td>report errors as alerts</td></tr><tr id="20" style="display: none;" colspan="3"><td colspan="3"><h2>report errors as alerts</h2><h4>src/session_impl.cpp:5676</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/session_impl.cpp:5676</a></td><td>report errors as alerts</td></tr><tr id="18" style="display: none;" colspan="3"><td colspan="3"><h2>report errors as alerts</h2><h4>src/session_impl.cpp:5676</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||||
|
|
||||||
void session_impl::add_dht_router(std::pair<std::string, int> const& node)
|
void session_impl::add_dht_router(std::pair<std::string, int> const& node)
|
||||||
{
|
{
|
||||||
|
@ -1059,7 +969,7 @@ this understanding of our external address, instead of the empty address</h2><h4
|
||||||
, local_port, external_port);
|
, local_port, external_port);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(21)">src/session_impl.cpp:6138</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="21" 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(19)">src/session_impl.cpp:6138</a></td><td>we only need to do this if our global IPv4 address has changed since the DHT (currently) only supports IPv4. Since restarting the DHT is kind of expensive, it would be nice to not do it unnecessarily</td></tr><tr id="19" style="display: none;" colspan="3"><td colspan="3"><h2>we only need to do this if our global IPv4 address has changed
|
||||||
since the DHT (currently) only supports IPv4. Since restarting the DHT
|
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:6138</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:6138</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::set_external_address(address const& ip
|
||||||
, int source_type, address const& source)
|
, int source_type, address const& source)
|
||||||
|
@ -1112,11 +1022,11 @@ is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>src/se
|
||||||
|
|
||||||
#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(22)">src/torrent.cpp:1112</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="22" 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(20)">src/torrent.cpp:1113</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="20" 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:1112</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:1113</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (c) c->disconnect(errors::no_memory);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1154,6 +1064,7 @@ up to the highest written piece in each file</h2><h4>src/torrent.cpp:1112</h4><p
|
||||||
if (ret != r.length)
|
if (ret != r.length)
|
||||||
{
|
{
|
||||||
rp->fail = true;
|
rp->fail = true;
|
||||||
|
rp->error = j.error;
|
||||||
handle_disk_error(j);
|
handle_disk_error(j);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1166,9 +1077,8 @@ up to the highest written piece in each file</h2><h4>src/torrent.cpp:1112</h4><p
|
||||||
int size = m_torrent_file->piece_size(r.piece);
|
int size = m_torrent_file->piece_size(r.piece);
|
||||||
if (rp->fail)
|
if (rp->fail)
|
||||||
{
|
{
|
||||||
rp->piece_data.reset();
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(21)">src/torrent.cpp:5361</a></td><td>save the send_stats state instead of throwing them away it may pose an issue when downgrading though</td></tr><tr id="21" style="display: none;" colspan="3"><td colspan="3"><h2>save the send_stats state instead of throwing them away
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(23)">src/torrent.cpp:5292</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="23" 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:5361</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:5292</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);
|
||||||
}
|
}
|
||||||
|
@ -1219,8 +1129,8 @@ it may pose an issue when downgrading though</h2><h4>src/torrent.cpp:5292</h4><p
|
||||||
|
|
||||||
// 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(24)">src/torrent.cpp:5930</a></td><td>ideally, we would disconnect the oldest connection i.e. the one that has waited the longest to connect.</td></tr><tr id="24" style="display: none;" colspan="3"><td colspan="3"><h2>ideally, we would disconnect the oldest connection
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(22)">src/torrent.cpp:5999</a></td><td>ideally, we would disconnect the oldest connection i.e. the one that has waited the longest to connect.</td></tr><tr id="22" style="display: none;" colspan="3"><td colspan="3"><h2>ideally, we would disconnect the oldest connection
|
||||||
i.e. the one that has waited the longest to connect.</h2><h4>src/torrent.cpp:5930</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_ses.is_aborted())
|
i.e. the one that has waited the longest to connect.</h2><h4>src/torrent.cpp:5999</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_ses.is_aborted())
|
||||||
{
|
{
|
||||||
p->disconnect(errors::session_closing);
|
p->disconnect(errors::session_closing);
|
||||||
return false;
|
return false;
|
||||||
|
@ -1271,11 +1181,9 @@ i.e. the one that has waited the longest to connect.</h2><h4>src/torrent.cpp:593
|
||||||
{
|
{
|
||||||
boost::shared_ptr<peer_plugin> pp((*i)->new_connection(p));
|
boost::shared_ptr<peer_plugin> pp((*i)->new_connection(p));
|
||||||
if (pp) p->add_extension(pp);
|
if (pp) p->add_extension(pp);
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(25)">src/torrent.cpp:6179</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="25" 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(23)">src/torrent.cpp:6250</a></td><td>should disconnect all peers that have the pieces we have not just seeds. It would be pretty expensive to check all pieces for all peers though</td></tr><tr id="23" style="display: none;" colspan="3"><td colspan="3"><h2>should disconnect all peers that have the pieces we have
|
||||||
not just seeds. It would be pretty expensive to check all pieces
|
not just seeds. It would be pretty expensive to check all pieces
|
||||||
for all peers though</h2><h4>src/torrent.cpp:6179</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
for all peers though</h2><h4>src/torrent.cpp:6250</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_finished_alert_posted = true;
|
||||||
#if defined TORRENT_DEBUG || TORRENT_RELEASE_ASSERTS
|
|
||||||
m_finished_alert_posted = true;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
set_state(torrent_status::finished);
|
set_state(torrent_status::finished);
|
||||||
|
@ -1293,6 +1201,8 @@ for all peers though</h2><h4>src/torrent.cpp:6179</h4><pre style="background: #f
|
||||||
m_completed_time = time(0);
|
m_completed_time = time(0);
|
||||||
|
|
||||||
// disconnect all seeds
|
// disconnect all seeds
|
||||||
|
if (settings().close_redundant_connections)
|
||||||
|
{
|
||||||
<div style="background: #ffff00" width="100%"> std::vector<peer_connection*> seeds;
|
<div style="background: #ffff00" width="100%"> std::vector<peer_connection*> seeds;
|
||||||
</div> for (peer_iterator i = m_connections.begin();
|
</div> for (peer_iterator i = m_connections.begin();
|
||||||
i != m_connections.end(); ++i)
|
i != m_connections.end(); ++i)
|
||||||
|
@ -1309,6 +1219,7 @@ for all peers though</h2><h4>src/torrent.cpp:6179</h4><pre style="background: #f
|
||||||
}
|
}
|
||||||
std::for_each(seeds.begin(), seeds.end()
|
std::for_each(seeds.begin(), seeds.end()
|
||||||
, boost::bind(&peer_connection::disconnect, _1, errors::torrent_finished, 0));
|
, boost::bind(&peer_connection::disconnect, _1, errors::torrent_finished, 0));
|
||||||
|
}
|
||||||
|
|
||||||
if (m_abort) return;
|
if (m_abort) return;
|
||||||
|
|
||||||
|
@ -1323,8 +1234,7 @@ for all peers though</h2><h4>src/torrent.cpp:6179</h4><pre style="background: #f
|
||||||
// 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)
|
||||||
m_ses.trigger_auto_manage();
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(24)">src/torrent_info.cpp:187</a></td><td>we might save constructing a std::String if this would take a char const* instead</td></tr><tr id="24" 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:187</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(26)">src/torrent_info.cpp:187</a></td><td>we might save constructing a std::String if this would take a char const* instead</td></tr><tr id="26" 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:187</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];
|
||||||
|
@ -1375,9 +1285,9 @@ for all peers though</h2><h4>src/torrent.cpp:6179</h4><pre style="background: #f
|
||||||
|
|
||||||
TORRENT_EXTRA_EXPORT std::string sanitize_path(std::string const& p)
|
TORRENT_EXTRA_EXPORT std::string sanitize_path(std::string const& p)
|
||||||
{
|
{
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(27)">src/torrent_info.cpp:366</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="27" 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(25)">src/torrent_info.cpp:367</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="25" 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:366</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
filenames should be preserved!</h2><h4>src/torrent_info.cpp:367</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -1415,8 +1325,8 @@ filenames should be preserved!</h2><h4>src/torrent_info.cpp:366</h4><pre style="
|
||||||
// each entry keep a string for its filename, make it
|
// each entry keep a string for its filename, make it
|
||||||
// simply point into the info-section buffer
|
// simply point into the info-section buffer
|
||||||
internal_file_entry const& fe = *target.rbegin();
|
internal_file_entry const& fe = *target.rbegin();
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(28)">src/torrent_info.cpp:387</a></td><td>once the filename renaming is removed from here this check can be removed as well</td></tr><tr id="28" 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(26)">src/torrent_info.cpp:388</a></td><td>once the filename renaming is removed from here this check can be removed as well</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>once the filename renaming is removed from here
|
||||||
this check can be removed as well</h2><h4>src/torrent_info.cpp:387</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
|
this check can be removed as well</h2><h4>src/torrent_info.cpp:388</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
|
||||||
|
|
||||||
int cnt = 0;
|
int cnt = 0;
|
||||||
std::set<std::string, string_less_no_case> files;
|
std::set<std::string, string_less_no_case> files;
|
||||||
|
@ -1467,7 +1377,7 @@ this check can be removed as well</h2><h4>src/torrent_info.cpp:387</h4><pre styl
|
||||||
{
|
{
|
||||||
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(29)">src/kademlia/node.cpp:690</a></td><td>find_node should write directly to the response entry</td></tr><tr id="29" style="display: none;" colspan="3"><td colspan="3"><h2>find_node should write directly to the response entry</h2><h4>src/kademlia/node.cpp:690</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(27)">src/kademlia/node.cpp:690</a></td><td>find_node should write directly to the response entry</td></tr><tr id="27" style="display: none;" colspan="3"><td colspan="3"><h2>find_node should write directly to the response entry</h2><h4>src/kademlia/node.cpp:690</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
|
||||||
|
@ -1518,7 +1428,7 @@ this check can be removed as well</h2><h4>src/torrent_info.cpp:387</h4><pre styl
|
||||||
if (port < 0 || port >= 65536)
|
if (port < 0 || port >= 65536)
|
||||||
{
|
{
|
||||||
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
#ifdef TORRENT_DHT_VERBOSE_LOGGING
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(30)">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="30" 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(28)">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="28" 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;
|
||||||
};
|
};
|
||||||
|
@ -1545,7 +1455,7 @@ this check can be removed as well</h2><h4>src/torrent_info.cpp:387</h4><pre styl
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(31)">include/libtorrent/utp_stream.hpp:350</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="31" 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:350</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (typename Mutable_Buffers::const_iterator i = buffers.begin()
|
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(29)">include/libtorrent/utp_stream.hpp:350</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="29" 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:350</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;
|
||||||
|
@ -1596,7 +1506,7 @@ this check can be removed as well</h2><h4>src/torrent_info.cpp:387</h4><pre styl
|
||||||
if (m_impl == 0)
|
if (m_impl == 0)
|
||||||
{
|
{
|
||||||
m_io_service.post(boost::bind<void>(handler, asio::error::not_connected, 0));
|
m_io_service.post(boost::bind<void>(handler, asio::error::not_connected, 0));
|
||||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(32)">include/libtorrent/web_peer_connection.hpp:127</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="32" 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(30)">include/libtorrent/web_peer_connection.hpp:127</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="30" 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:127</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:127</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
private:
|
private:
|
||||||
|
@ -1647,7 +1557,7 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>include
|
||||||
|
|
||||||
#endif // TORRENT_WEB_PEER_CONNECTION_HPP_INCLUDED
|
#endif // TORRENT_WEB_PEER_CONNECTION_HPP_INCLUDED
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(33)">src/bt_peer_connection.cpp:660</a></td><td>this could be optimized using knuth morris pratt</td></tr><tr id="33" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>src/bt_peer_connection.cpp:660</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_encrypted && m_rc4_encrypted)
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(31)">src/bt_peer_connection.cpp:660</a></td><td>this could be optimized using knuth morris pratt</td></tr><tr id="31" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized using knuth morris pratt</h2><h4>src/bt_peer_connection.cpp:660</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_encrypted && m_rc4_encrypted)
|
||||||
{
|
{
|
||||||
fun = encrypt;
|
fun = encrypt;
|
||||||
userdata = m_enc_handler.get();
|
userdata = m_enc_handler.get();
|
||||||
|
@ -1698,7 +1608,7 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>include
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// no complete sync
|
// no complete sync
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(34)">src/bt_peer_connection.cpp:1755</a></td><td>don't trust this blindly</td></tr><tr id="34" style="display: none;" colspan="3"><td colspan="3"><h2>don't trust this blindly</h2><h4>src/bt_peer_connection.cpp:1755</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // but where do we put that info?
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(32)">src/bt_peer_connection.cpp:1755</a></td><td>don't trust this blindly</td></tr><tr id="32" style="display: none;" colspan="3"><td colspan="3"><h2>don't trust this blindly</h2><h4>src/bt_peer_connection.cpp:1755</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // but where do we put that info?
|
||||||
|
|
||||||
int last_seen_complete = boost::uint8_t(root.dict_find_int_value("complete_ago", -1));
|
int last_seen_complete = boost::uint8_t(root.dict_find_int_value("complete_ago", -1));
|
||||||
if (last_seen_complete >= 0) set_last_seen_complete(last_seen_complete);
|
if (last_seen_complete >= 0) set_last_seen_complete(last_seen_complete);
|
||||||
|
@ -1749,7 +1659,7 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>include
|
||||||
disconnect(errors::upload_upload_connection);
|
disconnect(errors::upload_upload_connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(35)">src/bt_peer_connection.cpp:2069</a></td><td>if we're finished, send upload_only message</td></tr><tr id="35" style="display: none;" colspan="3"><td colspan="3"><h2>if we're finished, send upload_only message</h2><h4>src/bt_peer_connection.cpp:2069</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(33)">src/bt_peer_connection.cpp:2074</a></td><td>if we're finished, send upload_only message</td></tr><tr id="33" style="display: none;" colspan="3"><td colspan="3"><h2>if we're finished, send upload_only message</h2><h4>src/bt_peer_connection.cpp:2074</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());
|
||||||
|
@ -1800,8 +1710,8 @@ use allocate_disk_receive_buffer and release_disk_receive_buffer</h2><h4>include
|
||||||
detail::write_address(remote().address(), out);
|
detail::write_address(remote().address(), out);
|
||||||
handshake["yourip"] = remote_address;
|
handshake["yourip"] = remote_address;
|
||||||
handshake["reqq"] = m_ses.settings().max_allowed_in_request_queue;
|
handshake["reqq"] = m_ses.settings().max_allowed_in_request_queue;
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(36)">src/bt_peer_connection.cpp:3308</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><tr id="36" style="display: none;" colspan="3"><td colspan="3"><h2>move the erasing into the loop above
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(34)">src/bt_peer_connection.cpp:3313</a></td><td>move the erasing into the loop above remove all payload ranges that has been sent</td></tr><tr id="34" 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:3308</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (std::vector<range>::iterator i = m_payloads.begin();
|
remove all payload ranges that has been sent</h2><h4>src/bt_peer_connection.cpp:3313</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;
|
||||||
|
@ -1852,7 +1762,7 @@ remove all payload ranges that has been sent</h2><h4>src/bt_peer_connection.cpp:
|
||||||
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(37)">src/file.cpp:1205</a></td><td>is there any way to pre-fetch data from a file on windows?</td></tr><tr id="37" 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:1205</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(35)">src/file.cpp:1205</a></td><td>is there any way to pre-fetch data from a file on windows?</td></tr><tr id="35" 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:1205</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;
|
||||||
|
@ -1903,7 +1813,7 @@ remove all payload ranges that has been sent</h2><h4>src/bt_peer_connection.cpp:
|
||||||
#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(38)">src/http_tracker_connection.cpp:99</a></td><td>support authentication (i.e. user name and password) in the URL</td></tr><tr id="38" 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(36)">src/http_tracker_connection.cpp:99</a></td><td>support authentication (i.e. user name and password) in the URL</td></tr><tr id="36" 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
|
||||||
|
@ -1954,7 +1864,7 @@ remove all payload ranges that has been sent</h2><h4>src/bt_peer_connection.cpp:
|
||||||
size_t arguments_start = url.find('?');
|
size_t arguments_start = url.find('?');
|
||||||
if (arguments_start != std::string::npos)
|
if (arguments_start != std::string::npos)
|
||||||
url += "&";
|
url += "&";
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(39)">src/i2p_stream.cpp:172</a></td><td>move this to proxy_base and use it in all proxies</td></tr><tr id="39" 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:172</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/i2p_stream.cpp:172</a></td><td>move this to proxy_base and use it in all proxies</td></tr><tr id="37" 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:172</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
||||||
m_state = sam_idle;
|
m_state = sam_idle;
|
||||||
|
|
||||||
std::string name = m_sam_socket->name_lookup();
|
std::string name = m_sam_socket->name_lookup();
|
||||||
|
@ -2005,7 +1915,7 @@ remove all payload ranges that has been sent</h2><h4>src/bt_peer_connection.cpp:
|
||||||
|
|
||||||
// send hello command
|
// send hello command
|
||||||
m_state = read_hello_response;
|
m_state = read_hello_response;
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(40)">src/packet_buffer.cpp:176</a></td><td>use compare_less_wrap for this comparison as well</td></tr><tr id="40" 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(38)">src/packet_buffer.cpp:176</a></td><td>use compare_less_wrap for this comparison as well</td></tr><tr id="38" 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);
|
||||||
|
@ -2056,7 +1966,7 @@ remove all payload ranges that has been sent</h2><h4>src/bt_peer_connection.cpp:
|
||||||
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(41)">src/peer_connection.cpp:2651</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="41" 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(39)">src/peer_connection.cpp:2651</a></td><td>this might need something more so that once we have the metadata we can construct a full bitfield</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>this might need something more
|
||||||
so that once we have the metadata
|
so that once we have the metadata
|
||||||
we can construct a full bitfield</h2><h4>src/peer_connection.cpp:2651</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
we can construct a full bitfield</h2><h4>src/peer_connection.cpp:2651</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||||
#ifdef TORRENT_VERBOSE_LOGGING
|
#ifdef TORRENT_VERBOSE_LOGGING
|
||||||
|
@ -2109,7 +2019,7 @@ we can construct a full bitfield</h2><h4>src/peer_connection.cpp:2651</h4><pre s
|
||||||
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(42)">src/peer_connection.cpp:2782</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="42" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>src/peer_connection.cpp:2782</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(40)">src/peer_connection.cpp:2782</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="40" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>src/peer_connection.cpp:2782</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
|
||||||
|
@ -2160,7 +2070,7 @@ we can construct a full bitfield</h2><h4>src/peer_connection.cpp:2651</h4><pre s
|
||||||
if (rit - m_request_queue.begin() < m_queued_time_critical) return;
|
if (rit - m_request_queue.begin() < m_queued_time_critical) return;
|
||||||
pending_block b = *rit;
|
pending_block b = *rit;
|
||||||
m_request_queue.erase(rit);
|
m_request_queue.erase(rit);
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(43)">src/peer_connection.cpp:3892</a></td><td>we should probably just send a HAVE_ALL here</td></tr><tr id="43" style="display: none;" colspan="3"><td colspan="3"><h2>we should probably just send a HAVE_ALL here</h2><h4>src/peer_connection.cpp:3892</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::fill(m_recv_buffer.begin() + m_recv_pos, m_recv_buffer.end(), 0);
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(41)">src/peer_connection.cpp:3892</a></td><td>we should probably just send a HAVE_ALL here</td></tr><tr id="41" style="display: none;" colspan="3"><td colspan="3"><h2>we should probably just send a HAVE_ALL here</h2><h4>src/peer_connection.cpp:3892</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::fill(m_recv_buffer.begin() + m_recv_pos, m_recv_buffer.end(), 0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_packet_size = packet_size;
|
m_packet_size = packet_size;
|
||||||
|
@ -2211,7 +2121,7 @@ we can construct a full bitfield</h2><h4>src/peer_connection.cpp:2651</h4><pre s
|
||||||
}
|
}
|
||||||
|
|
||||||
void peer_connection::update_desired_queue_size()
|
void peer_connection::update_desired_queue_size()
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(44)">src/peer_connection.cpp:4475</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="44" 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(42)">src/peer_connection.cpp:4475</a></td><td>peers should really be corked/uncorked outside of all completed disk operations</td></tr><tr id="42" style="display: none;" colspan="3"><td colspan="3"><h2>peers should really be corked/uncorked outside of
|
||||||
all completed disk operations</h2><h4>src/peer_connection.cpp:4475</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:4475</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
|
||||||
|
@ -2263,7 +2173,7 @@ all completed disk operations</h2><h4>src/peer_connection.cpp:4475</h4><pre styl
|
||||||
#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(45)">src/policy.cpp:857</a></td><td>only allow _one_ connection to use this override at a time</td></tr><tr id="45" 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(43)">src/policy.cpp:857</a></td><td>only allow _one_ connection to use this override at a time</td></tr><tr id="43" 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:857</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> " external: " << external.external_address(m_peers[candidate]->address()) <<
|
||||||
" t: " << (session_time - m_peers[candidate]->last_connected) <<
|
" t: " << (session_time - m_peers[candidate]->last_connected) <<
|
||||||
" ]\n";
|
" ]\n";
|
||||||
|
@ -2315,7 +2225,7 @@ override at a time</h2><h4>src/policy.cpp:857</h4><pre style="background: #f6f6f
|
||||||
{
|
{
|
||||||
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(46)">src/policy.cpp:1889</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="46" 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:1889</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(44)">src/policy.cpp:1889</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="44" 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:1889</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
|
||||||
, on_parole(false)
|
, on_parole(false)
|
||||||
, banned(false)
|
, banned(false)
|
||||||
#ifndef TORRENT_DISABLE_DHT
|
#ifndef TORRENT_DISABLE_DHT
|
||||||
|
@ -2366,7 +2276,7 @@ override at a time</h2><h4>src/policy.cpp:857</h4><pre style="background: #f6f6f
|
||||||
{
|
{
|
||||||
return size_type(prev_amount_upload) << 10;
|
return size_type(prev_amount_upload) << 10;
|
||||||
}
|
}
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(47)">src/session_impl.cpp:1887</a></td><td>recalculate all connect candidates for all torrents</td></tr><tr id="47" style="display: none;" colspan="3"><td colspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>src/session_impl.cpp:1887</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_upload_rate.close();
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(45)">src/session_impl.cpp:1887</a></td><td>recalculate all connect candidates for all torrents</td></tr><tr id="45" style="display: none;" colspan="3"><td colspan="3"><h2>recalculate all connect candidates for all torrents</h2><h4>src/session_impl.cpp:1887</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_upload_rate.close();
|
||||||
|
|
||||||
// #error closing the udp socket here means that
|
// #error closing the udp socket here means that
|
||||||
// the uTP connections cannot be closed gracefully
|
// the uTP connections cannot be closed gracefully
|
||||||
|
@ -2417,7 +2327,7 @@ override at a time</h2><h4>src/policy.cpp:857</h4><pre style="background: #f6f6f
|
||||||
void session_impl::set_settings(session_settings const& s)
|
void session_impl::set_settings(session_settings const& s)
|
||||||
{
|
{
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(48)">src/session_impl.cpp:4267</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="48" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>src/session_impl.cpp:4267</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> else if (!t->is_paused())
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(46)">src/session_impl.cpp:4267</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="46" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>src/session_impl.cpp:4267</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> else if (!t->is_paused())
|
||||||
{
|
{
|
||||||
TORRENT_ASSERT(t->m_resume_data_loaded || !t->valid_metadata());
|
TORRENT_ASSERT(t->m_resume_data_loaded || !t->valid_metadata());
|
||||||
--hard_limit;
|
--hard_limit;
|
||||||
|
@ -2468,7 +2378,7 @@ override at a time</h2><h4>src/policy.cpp:857</h4><pre style="background: #f6f6f
|
||||||
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(49)">src/session_impl.cpp:4423</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="49" 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(47)">src/session_impl.cpp:4423</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="47" 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:4423</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
connections</h2><h4>src/session_impl.cpp:4423</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
||||||
if (m_boost_connections > max_connections)
|
if (m_boost_connections > max_connections)
|
||||||
|
@ -2521,7 +2431,7 @@ connections</h2><h4>src/session_impl.cpp:4423</h4><pre style="background: #f6f6f
|
||||||
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(50)">src/session_impl.cpp:4457</a></td><td>make this bias configurable</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>src/session_impl.cpp:4457</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(51)">src/session_impl.cpp:4458</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="51" 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:4458</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(48)">src/session_impl.cpp:4457</a></td><td>make this bias configurable</td></tr><tr id="48" style="display: none;" colspan="3"><td colspan="3"><h2>make this bias configurable</h2><h4>src/session_impl.cpp:4457</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(49)">src/session_impl.cpp:4458</a></td><td>also take average_peers into account, to create a bias for downloading torrents with < average peers</td></tr><tr id="49" 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:4458</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();
|
||||||
|
@ -2572,7 +2482,7 @@ connections</h2><h4>src/session_impl.cpp:4423</h4><pre style="background: #f6f6f
|
||||||
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(52)">src/session_impl.cpp:4602</a></td><td>make configurable</td></tr><tr id="52" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>src/session_impl.cpp:4602</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/session_impl.cpp:4602</a></td><td>make configurable</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>src/session_impl.cpp:4602</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)
|
||||||
|
@ -2605,7 +2515,7 @@ connections</h2><h4>src/session_impl.cpp:4423</h4><pre style="background: #f6f6f
|
||||||
|
|
||||||
++m_allowed_upload_slots;
|
++m_allowed_upload_slots;
|
||||||
|
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(53)">src/session_impl.cpp:4616</a></td><td>make configurable</td></tr><tr id="53" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>src/session_impl.cpp:4616</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> >= (*i)->uploaded_since_unchoke() * 1000
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(51)">src/session_impl.cpp:4616</a></td><td>make configurable</td></tr><tr id="51" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>src/session_impl.cpp:4616</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> >= (*i)->uploaded_since_unchoke() * 1000
|
||||||
* (1 + t2->priority()) / total_milliseconds(unchoke_interval));
|
* (1 + t2->priority()) / total_milliseconds(unchoke_interval));
|
||||||
}
|
}
|
||||||
prev = i;
|
prev = i;
|
||||||
|
@ -2656,7 +2566,7 @@ connections</h2><h4>src/session_impl.cpp:4423</h4><pre style="background: #f6f6f
|
||||||
// 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(54)">src/storage.cpp:325</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>src/storage.cpp:325</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> int block_size = 16 * 1024;
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(52)">src/storage.cpp:325</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="52" style="display: none;" colspan="3"><td colspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>src/storage.cpp:325</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> int block_size = 16 * 1024;
|
||||||
if (m_storage->disk_pool()) block_size = m_storage->disk_pool()->block_size();
|
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;
|
||||||
|
@ -2707,7 +2617,7 @@ connections</h2><h4>src/session_impl.cpp:4423</h4><pre style="background: #f6f6f
|
||||||
{
|
{
|
||||||
buf.iov_len = (std::min)(block_size, size);
|
buf.iov_len = (std::min)(block_size, size);
|
||||||
int ret = m_storage->readv(&buf, slot, ph.offset, 1);
|
int ret = m_storage->readv(&buf, slot, ph.offset, 1);
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(55)">src/storage.cpp:358</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="55" 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;"> else
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(53)">src/storage.cpp:358</a></td><td>if the read fails, set error and exit immediately</td></tr><tr id="53" style="display: none;" colspan="3"><td colspan="3"><h2>if the read fails, set error and exit immediately</h2><h4>src/storage.cpp:358</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> else
|
||||||
{
|
{
|
||||||
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;
|
||||||
|
@ -2758,7 +2668,7 @@ connections</h2><h4>src/session_impl.cpp:4423</h4><pre style="background: #f6f6f
|
||||||
, 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(56)">src/storage.cpp:623</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="56" 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(54)">src/storage.cpp:623</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="54" 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:623</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (file_iter = files().begin();;)
|
maybe use the same format as .torrent files and reuse some code from torrent_info</h2><h4>src/storage.cpp:623</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (file_iter = files().begin();;)
|
||||||
{
|
{
|
||||||
|
@ -2811,7 +2721,7 @@ maybe use the same format as .torrent files and reuse some code from torrent_inf
|
||||||
|
|
||||||
for (int i = 0; i < file_sizes_ent->list_size(); ++i)
|
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(57)">src/storage.cpp:1192</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="57" 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(55)">src/storage.cpp:1192</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="55" 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:1192</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:1192</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
|
||||||
|
@ -2864,12 +2774,12 @@ if file_base is used. This is not a widely used feature though</h2><h4>src/stora
|
||||||
// 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(58)">src/torrent.cpp:5025</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info The mapped_files needs to be read both in the network thread and in the disk thread, since they both have their own mapped files structures which are kept in sync</td></tr><tr id="58" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(56)">src/torrent.cpp:5094</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="56" 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:5025</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:5094</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);
|
||||||
|
@ -2920,12 +2830,12 @@ which are kept in sync</h2><h4>src/torrent.cpp:5025</h4><pre style="background:
|
||||||
{
|
{
|
||||||
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(59)">src/torrent.cpp:5161</a></td><td>if this is a merkle torrent and we can't restore the tree, we need to wipe all the bits in the have array, but not necessarily we might want to do a full check to see if we have all the pieces. This is low priority since almost no one uses merkle torrents</td></tr><tr id="59" style="display: none;" colspan="3"><td colspan="3"><h2>if this is a merkle torrent and we can't
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(57)">src/torrent.cpp:5230</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="57" 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:5161</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:5230</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2973,12 +2883,12 @@ no one uses merkle torrents</h2><h4>src/torrent.cpp:5161</h4><pre style="backgro
|
||||||
ret["seeding_time"] = m_seeding_time;
|
ret["seeding_time"] = m_seeding_time;
|
||||||
ret["last_seen_complete"] = m_last_seen_complete;
|
ret["last_seen_complete"] = m_last_seen_complete;
|
||||||
|
|
||||||
ret["num_seeds"] = m_complete;
|
ret["num_complete"] = m_complete;
|
||||||
ret["num_incomplete"] = m_incomplete;
|
ret["num_incomplete"] = m_incomplete;
|
||||||
ret["num_downloaders"] = m_downloaders;
|
ret["num_downloaded"] = m_downloaded;
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(60)">src/torrent.cpp:5349</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance. using file_base</td></tr><tr id="60" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(58)">src/torrent.cpp:5418</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="58" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
||||||
renamed, but also if they have been merged into a single file for instance.
|
renamed, but also if they have been merged into a single file for instance.
|
||||||
using file_base</h2><h4>src/torrent.cpp:5349</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> entry::string_type& pieces = ret["pieces"].string();
|
using file_base</h2><h4>src/torrent.cpp:5418</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())
|
||||||
{
|
{
|
||||||
|
@ -3029,10 +2939,10 @@ using file_base</h2><h4>src/torrent.cpp:5349</h4><pre style="background: #f6f6f6
|
||||||
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(61)">src/torrent.cpp:7823</a></td><td>go through the pieces we have and count the total number of downloaders we have. Only count peers that are interested in us since some peers might not send have messages for pieces we have it num_interested == 0, we need to pick a new piece</td></tr><tr id="61" style="display: none;" colspan="3"><td colspan="3"><h2>go through the pieces we have and count the total number
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(59)">src/torrent.cpp:7901</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="59" 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:7823</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:7901</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;
|
||||||
|
@ -3083,10 +2993,10 @@ it num_interested == 0, we need to pick a new piece</h2><h4>src/torrent.cpp:7823
|
||||||
{
|
{
|
||||||
// we don't keep track of availability, do it the expensive way
|
// we don't keep track of availability, do it the expensive way
|
||||||
// do a linear search from the first piece
|
// do a linear search from the first piece
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(62)">src/torrent.cpp:8050</a></td><td>if there's been long enough since we requested something from this piece, request one of the backup blocks (the one with the least number of requests to it) and update the last request timestamp</td></tr><tr id="62" style="display: none;" colspan="3"><td colspan="3"><h2>if there's been long enough since we requested something
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(60)">src/torrent.cpp:8128</a></td><td>if there's been long enough since we requested something from this piece, request one of the backup blocks (the one with the least number of requests to it) and update the last request timestamp</td></tr><tr id="60" style="display: none;" colspan="3"><td colspan="3"><h2>if there's been long enough since we requested something
|
||||||
from this piece, request one of the backup blocks (the one with
|
from this piece, request one of the backup blocks (the one with
|
||||||
the least number of requests to it) and update the last request
|
the least number of requests to it) and update the last request
|
||||||
timestamp</h2><h4>src/torrent.cpp:8050</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::vector<pending_block> const& rq = c.request_queue();
|
timestamp</h2><h4>src/torrent.cpp:8128</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::vector<pending_block> const& rq = c.request_queue();
|
||||||
|
|
||||||
bool added_request = false;
|
bool added_request = false;
|
||||||
|
|
||||||
|
@ -3137,7 +3047,7 @@ timestamp</h2><h4>src/torrent.cpp:8050</h4><pre style="background: #f6f6f6; bord
|
||||||
(*i)->send_block_requests();
|
(*i)->send_block_requests();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(63)">src/udp_tracker_connection.cpp:548</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="63" 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(61)">src/udp_tracker_connection.cpp:548</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="61" 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:548</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
with actual strings. For example i2p trackers</h2><h4>src/udp_tracker_connection.cpp:548</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||||
|
|
||||||
|
@ -3180,7 +3090,7 @@ with actual strings. For example i2p trackers</h2><h4>src/udp_tracker_connection
|
||||||
}
|
}
|
||||||
|
|
||||||
cb->tracker_response(tracker_req(), m_target.address(), ip_list
|
cb->tracker_response(tracker_req(), m_target.address(), ip_list
|
||||||
, peer_list, interval, min_interval, complete, incomplete, address(), "" /*trackerid*/);
|
, peer_list, interval, min_interval, complete, incomplete, 0, address(), "" /*trackerid*/);
|
||||||
|
|
||||||
close();
|
close();
|
||||||
return true;
|
return true;
|
||||||
|
@ -3190,7 +3100,7 @@ with actual strings. For example i2p trackers</h2><h4>src/udp_tracker_connection
|
||||||
{
|
{
|
||||||
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(64)">include/libtorrent/config.hpp:283</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="64" 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:283</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(62)">include/libtorrent/config.hpp:283</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="62" 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:283</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
|
||||||
|
@ -3241,7 +3151,7 @@ with actual strings. For example i2p trackers</h2><h4>src/udp_tracker_connection
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
inline int snprintf(char* buf, int len, char const* fmt, ...)
|
inline int snprintf(char* buf, int len, char const* fmt, ...)
|
||||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(65)">include/libtorrent/proxy_base.hpp:152</a></td><td>it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);</td></tr><tr id="65" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to remember the bind port and bind once we know where the proxy is
|
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(63)">include/libtorrent/proxy_base.hpp:152</a></td><td>it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);</td></tr><tr id="63" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to remember the bind port and bind once we know where the proxy is
|
||||||
m_sock.bind(endpoint, ec);</h2><h4>include/libtorrent/proxy_base.hpp:152</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
m_sock.bind(endpoint, ec);</h2><h4>include/libtorrent/proxy_base.hpp:152</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
||||||
return m_sock.set_option(opt, ec);
|
return m_sock.set_option(opt, ec);
|
||||||
}
|
}
|
||||||
|
@ -3293,4 +3203,55 @@ m_sock.bind(endpoint, ec);</h2><h4>include/libtorrent/proxy_base.hpp:152</h4><pr
|
||||||
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(64)">include/libtorrent/torrent_info.hpp:108</a></td><td>include the number of peers received from this tracker, at last announce</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>include the number of peers received from this tracker, at last announce</h2><h4>include/libtorrent/torrent_info.hpp:108</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> std::string url;
|
||||||
|
std::string trackerid;
|
||||||
|
|
||||||
|
// if this tracker has returned an error or warning message
|
||||||
|
// that message is stored here
|
||||||
|
std::string message;
|
||||||
|
|
||||||
|
// if this tracker failed the last time it was contacted
|
||||||
|
// this error code specifies what error occurred
|
||||||
|
error_code last_error;
|
||||||
|
|
||||||
|
int next_announce_in() const;
|
||||||
|
int min_announce_in() const;
|
||||||
|
|
||||||
|
// the time of next tracker announce
|
||||||
|
ptime next_announce;
|
||||||
|
|
||||||
|
// no announces before this time
|
||||||
|
ptime min_announce;
|
||||||
|
|
||||||
|
<div style="background: #ffff00" width="100%">
|
||||||
|
</div> // if this tracker has returned scrape data, these fields are filled
|
||||||
|
// in with valid numbers. Otherwise they are set to -1.
|
||||||
|
// the number of current downloaders
|
||||||
|
int scrape_incomplete;
|
||||||
|
// the number of current seeds
|
||||||
|
int scrape_complete;
|
||||||
|
// the cumulative number of completed downloads, ever
|
||||||
|
int scrape_downloaded;
|
||||||
|
|
||||||
|
// the tier this tracker belongs to
|
||||||
|
boost::uint8_t tier;
|
||||||
|
|
||||||
|
// the number of times this tracker can fail
|
||||||
|
// in a row before it's removed. 0 means unlimited
|
||||||
|
boost::uint8_t fail_limit;
|
||||||
|
|
||||||
|
// the number of times in a row this tracker has failed
|
||||||
|
boost::uint8_t fails:7;
|
||||||
|
|
||||||
|
// true if we're currently trying to announce with
|
||||||
|
// this tracker
|
||||||
|
bool updating:1;
|
||||||
|
|
||||||
|
enum tracker_source
|
||||||
|
{
|
||||||
|
source_torrent = 1,
|
||||||
|
source_client = 2,
|
||||||
|
source_magnet_link = 4,
|
||||||
|
source_tex = 8
|
||||||
|
};
|
||||||
</pre></td></tr></table></body></html>
|
</pre></td></tr></table></body></html>
|
Loading…
Reference in New Issue