Merge pull request #225 from arvidn/aafigure

Aafigure
This commit is contained in:
Arvid Norberg 2015-10-31 11:17:50 -04:00
commit ce33f23eab
12 changed files with 178 additions and 167 deletions

View File

@ -39,6 +39,8 @@ DOCS_IMAGES = \
docs/troubleshooting_thumb.png \
docs/hacking.diagram \
docs/hacking.png \
docs/disk_cache.diagram \
docs/disk_cache.png \
docs/utp_stack.diagram \
docs/utp_stack.png \
docs/style.css \
@ -48,7 +50,7 @@ DOCS_IMAGES = \
docs/img/blue_top.png \
docs/img/dotline.gif \
docs/img/minus.gif \
docs/img/orange.png
docs/img/orange.png \
DOCS_PAGES = \
docs/building.html \

View File

@ -61,7 +61,7 @@ enumerated on this page, please contact <a class="reference external" href="mail
<dt>Testing</dt>
<dd><p class="first">This is not just limited to finding bugs and ways to reproduce crashes, but also
sub-optimal behavior is certain scenarios and finding ways to reproduce those. Please
report any issue to the bug tracker at <a class="reference external" href="http://code.google.com/p/libtorrent/issues/entry">google code</a>.</p>
report any issue to the bug tracker at <a class="reference external" href="https://github.com/arvidn/libtorrent/issues">github</a>.</p>
<p class="last">New features that need testing are streaming (<tt class="docutils literal">set_piece_deadline()</tt>), the different
choking algorithms (especially the new BitTyrant choker), the disk cache options (such
as <tt class="docutils literal">explicit_cache</tt>).</p>

View File

@ -21,13 +21,13 @@ enumerated on this page, please contact arvid@libtorrent.org or the `mailing lis
1. Testing
This is not just limited to finding bugs and ways to reproduce crashes, but also
sub-optimal behavior is certain scenarios and finding ways to reproduce those. Please
report any issue to the bug tracker at `google code`_.
report any issue to the bug tracker at `github`_.
New features that need testing are streaming (``set_piece_deadline()``), the different
choking algorithms (especially the new BitTyrant choker), the disk cache options (such
as ``explicit_cache``).
.. _`google code`: http://code.google.com/p/libtorrent/issues/entry
.. _`github`: https://github.com/arvidn/libtorrent/issues
2. Documentation
Finding typos or outdated sections in the documentation. Contributing documentation

12
docs/disk_cache.diagram Normal file
View File

@ -0,0 +1,12 @@
<---- "recently" "frequently" --->
"used" "used"
L1 ghost L1 L2 L2 ghost
AAAAAAAAFFFFFFFF FFFFFFFFAAAAAAAA
cache size
<--------------->
2x cache size
<------------------------------->

View File

@ -1,26 +1,30 @@
+--------------+ pimpl +--------------+
| cGRE session +----------->| session_impl |
+--------------+ +------+-----+-+
m_torrents[] | |
+---------------------+ | |
| cGRE torrent_handle +-------+ | |
+---------------------+ weak | | |
| | | m_connections[]
| | +---+-------+
| | | |
m_picker v v | v peers we are connected to
+--------------+ +--------++ +-----------------+
| piece_picker |<---+-+ torrent ++ +--+ peer_connection ++
+--------------+ | ++--------+| | ++----------------+|
m_torrent_file | +---------+ | +-----------------+
+-------------------+ | |
| cGRE torrent_info |<---+ | m_socket
+-------------------+ | | +--------------------------+
m_peer_list | +------+->| socket_type (variant) |
+-----------+ | | | (TCP/uTP/SSL/socks5/...) |
| peer_list |<---------+ | +--------------------------+
+---------+-+ v
list of all | m_peers[] +--------------+
peers we +-------------->| torrent_peer ++ contains contact information
know of ++-------------+| for peers we're not necessarily
+--------------+ connected to
+--------------+ "pimpl" +----------------+
| "session" +--------------------------->| "session_impl" |
+--------------+ +------+-----+---+
"m_torrents[]" | |
+---------------------+ | |
| "torrent_handle" +--------+ | |
+---------------------+ "weak" | +--------------+ |
| | | "m_connections[]"
| | +-------------+----+
| | | |
"m_picker" v v | v "peers we are connected to"
+----------------+ +----------++ +-------------------+
| "piece_picker" |<---+-+ "torrent" ++ +--+ "peer_connection" ++
+----------------+ | ++----------+| | ++------------------+|
"m_torrent_file" | +-----------+ | +-------------------+
+-------------------+ | |
| "torrent_info" |<---+ | "m_socket"
+-------------------+ | | +----------------------------+
| +->| "socket_type (variant)" |
"m_peer_list" v | | "(TCP/uTP/SSL/socks5/...)" |
+--------------+ | +----------------------------+
| "peer_list" | |
+------------+-+ | "m_peer_info"
"list of all" | "m_peers[]" | "contains contact information"
"peers we" | | "for peers we're not necessarily"
"know of" | v "connected to"
| +----------------+
+---->| "torrent_peer" ++
++---------------+|
+----------------+

View File

@ -136,17 +136,9 @@ The disk cache implements *ARC*, Adaptive Replacement Cache. This consists of a
5. volatile read blocks
6. write cache (blocks waiting to be flushed to disk)
.. parsed-literal::
<--- recently used frequently used --->
+--------------+--------------+ +--------------+--------------+
| L1 **ghost** | L1 | | L2 | L2 **ghost** |
+--------------+--------------+ +--------------+--------------+
<---------- cache_size ---------->
<---------------------- 2 x cache_size ------------------------>
.. image:: disk_cache.png
These LRUs are stored in ``block_cache`` in an array ``m_lru``.
The cache algorithm works like this::

View File

@ -49,12 +49,13 @@ TARGETS = index \
FIGURES = \
read_disk_buffers \
write_disk_buffers \
troubleshooting \
hacking \
utp_stack \
storage
storage \
disk_cache \
troubleshooting
html: $(TARGETS:=.html) $(FIGURES:=.png) todo.html
html: $(TARGETS:=.html) $(FIGURES:=.png) todo.html
pdf: $(TARGETS:=.pdf) $(FIGURES:=.eps)
@ -71,11 +72,11 @@ stats_counters.rst: ../src/session_stats.cpp ../include/libtorrent/performance_c
manual.rst: stats_counters.rst
touch manual.rst
troubleshooting_thumb.png: troubleshooting.png
convert troubleshooting.png -resize 800x800 troubleshooting_thumb.png
ifneq ($(STAGE),)
cp $@ $(WEB_PATH)/$@
endif
#troubleshooting_thumb.png: troubleshooting.png
# convert troubleshooting.png -resize 800x800 troubleshooting_thumb.png
#ifneq ($(STAGE),)
# cp $@ $(WEB_PATH)/$@
#endif
todo.html:gen_todo.py ../src/*.cpp ../include/libtorrent/*.hpp
python gen_todo.py
@ -111,11 +112,11 @@ ifneq ($(STAGE),)
endif
%.png:%.diagram
ditaa -E $? $@
aafigure -o $@ $?
ifneq ($(STAGE),)
cp $@ $(WEB_PATH)/$@
endif
clean:
rm -f $(TARGETS:=.html) $(TARGETS:=.pdf) settings.rst todo.html reference*.html reference*.rst
rm -f $(TARGETS:=.html) $(TARGETS:=.pdf) $(FIGURES:=.png) $(FIGURES:=.eps) settings.rst todo.html reference*.html reference*.rst

View File

@ -1,16 +1,16 @@
copy into peer's encrypt in place
+----------------+ send buffer +-------------+ (no copy) +-------------+
| receive buffer +----------------->| send buffer +--=--------------->| encrypted |
| | | | | send buffer |
+----------------+ +-------------+ +------+------+
"copy into peer's" "encrypt in place"
+------------------+ "send buffer" +---------------+ "(no copy)" +---------------+
| "receive buffer" +----------------->| "send buffer" +------------------>| "encrypted" |
| | | | | "send buffer" |
+------------------+ +---------------+ +---------------+
^ |
| read() from file write() to socket |
| (copy) (copy) |
---=----|---------------------------------=---------------------------------|--=----
| kernel space |
| "read() from file" "write() to socket" |
| "(copy)" "user space" "(copy)" |
- - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - - -
| "kernel space" |
| v
+-------+-----------+ +---------------+
| kernel page cache | | socket kernel |
| | | buffer |
+-------------------+ +---------------+
+-------+-------------+ +-----------------+
| "kernel page cache" | | "socket kernel" |
| | | "buffer" |
+---------------------+ +-----------------+

View File

@ -1,31 +1,31 @@
+--------------------------+
| disk_io_thread |
| (manages piece cache) |
| "disk_io_thread" |
| "(manages piece cache)" |
+--------------------------+
^
|
v
+--------------------------+
| piece_manager |
| (maps pieces to slots) |
| "piece_manager" |
| "(maps pieces to slots)" |
+--------------------------+
^
|
v customization point
/--------------------------\ +------------------+
| storage |<---->| file_pool |
| cGRE | | open file cache |
| (maps slots to file and | +------------------+
| offset. reads and writes |
| to disk) | +------------------+
| |<-----+ file_storage |
\--------------------------/ | standard slot to |
^ | file mapping |
| +------------------+
v "customization point"
/----------------------------\ +-------------------+
| "storage" |<---->| "file_pool" |
| | | "open file cache" |
| "(maps slots to file and" | +-------------------+
| "offset. reads and writes" |
| "to disk)" | +--------------------+
| |<-----+ "file_storage" |
\----------------------------/ | "standard slot to" |
^ | "file mapping" |
| +--------------------+
v
+--------------------------+
| file |
| (file class reads and |
| writes files) |
| "file" |
| "(file class reads and" |
| "writes files)" |
+--------------------------+

View File

@ -74,7 +74,7 @@ does not support hard links.</h2><h4>../src/file.cpp:487</h4><pre style="backgro
// most errors are passed through, except for the ones that indicate that
// hard links are not supported and require a copy.
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(1)">../src/session_impl.cpp:2028</a></td><td>port map SSL udp socket here</td></tr><tr id="1" style="display: none;" colspan="3"><td colspan="3"><h2>port map SSL udp socket here</h2><h4>../src/session_impl.cpp:2028</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> udp::endpoint ssl_bind_if(m_listen_interface.address(), ssl_port);
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(1)">../src/session_impl.cpp:2030</a></td><td>port map SSL udp socket here</td></tr><tr id="1" style="display: none;" colspan="3"><td colspan="3"><h2>port map SSL udp socket here</h2><h4>../src/session_impl.cpp:2030</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> udp::endpoint ssl_bind_if(m_listen_interface.address(), ssl_port);
// if ssl port is 0, we don't want to listen on an SSL port
if (ssl_port != 0)
@ -1483,7 +1483,9 @@ listen_interfaces list</h2><h4>../src/session_impl.cpp:1923</h4><pre style="back
{
error_code err;
address test_family = address::from_string(device.c_str(), err);
if (!err &amp;&amp; test_family.is_v4() != address_family)
if (!err
&amp;&amp; test_family.is_v4() != address_family
&amp;&amp; !is_any(test_family))
continue;
listen_socket_t s = setup_listener(device, address_family, port
@ -1496,9 +1498,7 @@ listen_interfaces list</h2><h4>../src/session_impl.cpp:1923</h4><pre style="back
}
if (!ec &amp;&amp; s.sock)
{
TORRENT_ASSERT(!m_abort);
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(30)">../src/session_impl.cpp:2012</a></td><td>use bind_to_device in udp_socket</td></tr><tr id="30" style="display: none;" colspan="3"><td colspan="3"><h2>use bind_to_device in udp_socket</h2><h4>../src/session_impl.cpp:2012</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(30)">../src/session_impl.cpp:2014</a></td><td>use bind_to_device in udp_socket</td></tr><tr id="30" style="display: none;" colspan="3"><td colspan="3"><h2>use bind_to_device in udp_socket</h2><h4>../src/session_impl.cpp:2014</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
if (listen_port_retries &gt; 0)
{
m_listen_interface.port(m_listen_interface.port() + 1);
@ -1533,7 +1533,7 @@ listen_interfaces list</h2><h4>../src/session_impl.cpp:1923</h4><pre style="back
}
ec.clear();
}
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(31)">../src/session_impl.cpp:2032</a></td><td>use bind_to_device in udp_socket</td></tr><tr id="31" style="display: none;" colspan="3"><td colspan="3"><h2>use bind_to_device in udp_socket</h2><h4>../src/session_impl.cpp:2032</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (ssl_port != 0)
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(31)">../src/session_impl.cpp:2034</a></td><td>use bind_to_device in udp_socket</td></tr><tr id="31" style="display: none;" colspan="3"><td colspan="3"><h2>use bind_to_device in udp_socket</h2><h4>../src/session_impl.cpp:2034</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (ssl_port != 0)
{
m_ssl_udp_socket.bind(ssl_bind_if, ec);
if (ec)
@ -1584,8 +1584,8 @@ listen_interfaces list</h2><h4>../src/session_impl.cpp:1923</h4><pre style="back
// we made it! now post all the listen_succeeded_alerts
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(32)">../src/session_impl.cpp:3511</a></td><td>make a list for torrents that want to be announced on the DHT so we don't have to loop over all torrents, just to find the ones that want to announce</td></tr><tr id="32" style="display: none;" colspan="3"><td colspan="3"><h2>make a list for torrents that want to be announced on the DHT so we
don't have to loop over all torrents, just to find the ones that want to announce</h2><h4>../src/session_impl.cpp:3511</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (!m_dht_torrents.empty())
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(32)">../src/session_impl.cpp:3513</a></td><td>make a list for torrents that want to be announced on the DHT so we don't have to loop over all torrents, just to find the ones that want to announce</td></tr><tr id="32" style="display: none;" colspan="3"><td colspan="3"><h2>make a list for torrents that want to be announced on the DHT so we
don't have to loop over all torrents, just to find the ones that want to announce</h2><h4>../src/session_impl.cpp:3513</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (!m_dht_torrents.empty())
{
boost::shared_ptr&lt;torrent&gt; t;
do
@ -1636,9 +1636,9 @@ don't have to loop over all torrents, just to find the ones that want to announc
if (m_torrents.empty()) return;
if (m_next_lsd_torrent == m_torrents.end())
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(33)">../src/storage.cpp:941</a></td><td>is this risky? The upper layer will assume we have the whole file. Perhaps we should verify that at least the size of the file is correct</td></tr><tr id="33" style="display: none;" colspan="3"><td colspan="3"><h2>is this risky? The upper layer will assume we have the
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(33)">../src/storage.cpp:948</a></td><td>is this risky? The upper layer will assume we have the whole file. Perhaps we should verify that at least the size of the file is correct</td></tr><tr id="33" style="display: none;" colspan="3"><td colspan="3"><h2>is this risky? The upper layer will assume we have the
whole file. Perhaps we should verify that at least the size
of the file is correct</h2><h4>../src/storage.cpp:941</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (links)
of the file is correct</h2><h4>../src/storage.cpp:948</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (links)
{
// if this is a mutable torrent, and we need to pick up some files
// from other torrents, do that now. Note that there is an inherent
@ -1844,8 +1844,8 @@ first IP in this list and leave a comment here</h2><h4>../src/torrent.cpp:3366</
if ((!resp.trackerid.empty()) &amp;&amp; (ae-&gt;trackerid != resp.trackerid))
{
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(37)">../src/torrent.cpp:4885</a></td><td>abort lookups this torrent has made via the session host resolver interface</td></tr><tr id="37" style="display: none;" colspan="3"><td colspan="3"><h2>abort lookups this torrent has made via the
session host resolver interface</h2><h4>../src/torrent.cpp:4885</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // files belonging to the torrents
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(37)">../src/torrent.cpp:4890</a></td><td>abort lookups this torrent has made via the session host resolver interface</td></tr><tr id="37" style="display: none;" colspan="3"><td colspan="3"><h2>abort lookups this torrent has made via the
session host resolver interface</h2><h4>../src/torrent.cpp:4890</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // files belonging to the torrents
disconnect_all(errors::torrent_aborted, op_bittorrent);
// post a message to the main thread to destruct
@ -1896,7 +1896,7 @@ session host resolver interface</h2><h4>../src/torrent.cpp:4885</h4><pre style="
// disable super seeding for all peers
for (peer_iterator i = begin(); i != end(); ++i)
{
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(38)">../src/torrent.cpp:5031</a></td><td>the tracker login feature should probably be deprecated</td></tr><tr id="38" style="display: none;" colspan="3"><td colspan="3"><h2>the tracker login feature should probably be deprecated</h2><h4>../src/torrent.cpp:5031</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> alerts().emplace_alert&lt;file_renamed_alert&gt;(get_handle()
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(38)">../src/torrent.cpp:5036</a></td><td>the tracker login feature should probably be deprecated</td></tr><tr id="38" style="display: none;" colspan="3"><td colspan="3"><h2>the tracker login feature should probably be deprecated</h2><h4>../src/torrent.cpp:5036</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> alerts().emplace_alert&lt;file_renamed_alert&gt;(get_handle()
, j-&gt;buffer.string, j-&gt;piece);
m_torrent_file-&gt;rename_file(j-&gt;piece, j-&gt;buffer.string);
}
@ -1947,9 +1947,9 @@ session host resolver interface</h2><h4>../src/torrent.cpp:4885</h4><pre style="
for (std::vector&lt;peer_connection*&gt;::iterator i
= m_connections.begin(), end(m_connections.end()); i != end; ++i)
{
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(39)">../src/torrent.cpp:8018</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it perhaps this logic should be disabled if we have too many idle peers (with some definition of idle)</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(39)">../src/torrent.cpp:8023</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it perhaps this logic should be disabled if we have too many idle peers (with some definition of idle)</td></tr><tr id="39" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it
perhaps this logic should be disabled if we have too many idle peers
(with some definition of idle)</h2><h4>../src/torrent.cpp:8018</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#ifndef TORRENT_DISABLE_LOGGING
(with some definition of idle)</h2><h4>../src/torrent.cpp:8023</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#ifndef TORRENT_DISABLE_LOGGING
debug_log("incoming peer (%d)", int(m_connections.size()));
#endif
@ -2418,7 +2418,7 @@ peer_connection</h2><h4>../src/web_peer_connection.cpp:689</h4><pre style="backg
#endif
t-&gt;add_web_seed(location, web_seed_entry::url_seed, m_external_auth, m_extra_headers);
t-&gt;remove_web_seed(this, errors::redirecting, op_bittorrent, 2);
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(48)">../src/kademlia/dht_storage.cpp:106</a></td><td>make this configurable in dht_settings</td></tr><tr id="48" style="display: none;" colspan="3"><td colspan="3"><h2>make this configurable in dht_settings</h2><h4>../src/kademlia/dht_storage.cpp:106</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this is a group. It contains a set of group members
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(48)">../src/kademlia/dht_storage.cpp:110</a></td><td>make this configurable in dht_settings</td></tr><tr id="48" style="display: none;" colspan="3"><td colspan="3"><h2>make this configurable in dht_settings</h2><h4>../src/kademlia/dht_storage.cpp:110</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // this is a group. It contains a set of group members
struct torrent_entry
{
std::string name;
@ -2725,14 +2725,14 @@ boost::tuple&lt;int, int, int&gt; routing_table::size() const
else
new_replacement_bucket.push_back(*j);
}
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(54)">../include/libtorrent/alert_types.hpp:1427</a></td><td>should the alert baseclass have this object instead?</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>should the alert baseclass have this object instead?</h2><h4>../include/libtorrent/alert_types.hpp:1427</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(54)">../include/libtorrent/alert_types.hpp:1429</a></td><td>should the alert baseclass have this object instead?</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>should the alert baseclass have this object instead?</h2><h4>../include/libtorrent/alert_types.hpp:1429</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
// internal
portmap_log_alert(aux::stack_allocator&amp; alloc, int t, const char* m);
TORRENT_DEFINE_ALERT(portmap_log_alert, 52)
static const int static_category = alert::port_mapping_log_notification;
virtual std::string message() const;
virtual std::string message() const TORRENT_OVERRIDE;
int map_type;
@ -2766,7 +2766,7 @@ boost::tuple&lt;int, int, int&gt; routing_table::size() const
static const int static_category = alert::status_notification
| alert::error_notification;
virtual std::string message() const;
virtual std::string message() const TORRENT_OVERRIDE;
error_code error;
@ -2819,11 +2819,11 @@ POSSIBILITY OF SUCH DAMAGE.
#endif
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(56)">../include/libtorrent/enum_net.hpp:143</a></td><td>this could be done more efficiently by just looking up the interface with the given name, maybe even with if_nametoindex()</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>this could be done more efficiently by just looking up
the interface with the given name, maybe even with if_nametoindex()</h2><h4>../include/libtorrent/enum_net.hpp:143</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
address ip = address::from_string(device_name, ec);
if (!ec)
{
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(56)">../include/libtorrent/enum_net.hpp:150</a></td><td>this could be done more efficiently by just looking up the interface with the given name, maybe even with if_nametoindex()</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>this could be done more efficiently by just looking up
the interface with the given name, maybe even with if_nametoindex()</h2><h4>../include/libtorrent/enum_net.hpp:150</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // providing 0.0.0.0 as the device, turn it into "::0"
if (ip == address_v4::any() &amp;&amp; !ipv4)
ip = address_v6::any();
#endif
bind_ep.address(ip);
// it appears to be an IP. Just bind to that address
sock.bind(bind_ep, ec);
@ -3205,8 +3205,8 @@ protected:
boost::shared_ptr&lt;tracker_connection&gt; shared_from_this()
{
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(64)">../include/libtorrent/aux_/session_impl.hpp:1146</a></td><td>the throttling of saving resume data could probably be factored out into a separate class</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>the throttling of saving resume data could probably be
factored out into a separate class</h2><h4>../include/libtorrent/aux_/session_impl.hpp:1146</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // each second tick the timer takes a little
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(64)">../include/libtorrent/aux_/session_impl.hpp:1147</a></td><td>the throttling of saving resume data could probably be factored out into a separate class</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>the throttling of saving resume data could probably be
factored out into a separate class</h2><h4>../include/libtorrent/aux_/session_impl.hpp:1147</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // each second tick the timer takes a little
// bit longer than one second to trigger. The
// extra time it took is accumulated into this
// counter. Every time it exceeds 1000, torrents
@ -3217,8 +3217,8 @@ factored out into a separate class</h2><h4>../include/libtorrent/aux_/session_im
boost::uint16_t m_tick_residual;
#ifndef TORRENT_DISABLE_LOGGING
virtual void session_log(char const* fmt, ...) const TORRENT_FORMAT(2,3);
virtual void session_vlog(char const* fmt, va_list&amp; va) const TORRENT_FORMAT(2,0);
virtual void session_log(char const* fmt, ...) const TORRENT_OVERRIDE TORRENT_FINAL TORRENT_FORMAT(2,3);
virtual void session_vlog(char const* fmt, va_list&amp; va) const TORRENT_OVERRIDE TORRENT_FINAL TORRENT_FORMAT(2,0);
// this list of tracker loggers serves as tracker_callbacks when
// shutting down. This list is just here to keep them alive during
@ -3226,8 +3226,8 @@ factored out into a separate class</h2><h4>../include/libtorrent/aux_/session_im
std::list&lt;boost::shared_ptr&lt;tracker_logger&gt; &gt; m_tracker_loggers;
#endif
<div style="background: #ffff00" width="100%"> void queue_async_resume_data(boost::shared_ptr&lt;torrent&gt; const&amp; t);
</div> void done_async_resume();
<div style="background: #ffff00" width="100%"> virtual void queue_async_resume_data(boost::shared_ptr&lt;torrent&gt; const&amp; t) TORRENT_OVERRIDE TORRENT_FINAL;
</div> virtual void done_async_resume() TORRENT_OVERRIDE TORRENT_FINAL;
void async_resume_dispatched();
// state for keeping track of external IPs
@ -3242,7 +3242,7 @@ factored out into a separate class</h2><h4>../include/libtorrent/aux_/session_im
// *glares at gcc*
struct extention_dht_query
{
uint8_t query_len;
boost::uint8_t query_len;
boost::array&lt;char, max_dht_query_length&gt; query;
dht_extension_handler_t handler;
};
@ -3498,8 +3498,8 @@ the chunk headers should be subtracted from the receive_buffer_size</h2><h4>../s
std::string request;
request.reserve(400);
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(70)">../src/session_impl.cpp:5306</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="70" 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:5306</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const&amp; ip, int port
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(70)">../src/session_impl.cpp:5308</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="70" 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:5308</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void session_impl::on_port_mapping(int mapping, address const&amp; ip, int port
, error_code const&amp; ec, int map_transport)
{
TORRENT_ASSERT(is_single_thread());
@ -3550,9 +3550,9 @@ this understanding of our external address, instead of the empty address</h2><h4
session_status session_impl::status() const
{
// INVARIANT_CHECK;
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(71)">../src/session_impl.cpp:6700</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="71" style="display: none;" colspan="3"><td colspan="3"><h2>we only need to do this if our global IPv4 address has changed
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(71)">../src/session_impl.cpp:6702</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="71" style="display: none;" colspan="3"><td colspan="3"><h2>we only need to do this if our global IPv4 address has changed
since the DHT (currently) only supports IPv4. Since restarting the DHT
is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src/session_impl.cpp:6700</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
is kind of expensive, it would be nice to not do it unnecessarily</h2><h4>../src/session_impl.cpp:6702</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
if (!m_external_ip.cast_vote(ip, source_type, source)) return;
@ -3658,8 +3658,8 @@ up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1235</h4
if (p-&gt;is_interesting()) continue;
p-&gt;update_interest();
if (!m_abort)
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(73)">../src/torrent.cpp:7139</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="73" 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:7139</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (int k = 0; k &lt; bits; ++k)
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(73)">../src/torrent.cpp:7144</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="73" 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:7144</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (int k = 0; k &lt; bits; ++k)
v |= (info[j*8+k].state == piece_picker::block_info::state_finished)
? (1 &lt;&lt; k) : 0;
bitmask.append(1, v);
@ -3710,9 +3710,9 @@ it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:7139</h4
// write have bitmask
// the pieces string has one byte per piece. Each
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(74)">../src/torrent.cpp:8362</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="74" style="display: none;" colspan="3"><td colspan="3"><h2>should disconnect all peers that have the pieces we have
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(74)">../src/torrent.cpp:8367</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="74" style="display: none;" colspan="3"><td colspan="3"><h2>should disconnect all peers that have the pieces we have
not just seeds. It would be pretty expensive to check all pieces
for all peers though</h2><h4>../src/torrent.cpp:8362</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
for all peers though</h2><h4>../src/torrent.cpp:8367</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
set_state(torrent_status::finished);
set_queue_position(-1);
@ -4215,7 +4215,7 @@ TORRENT_TEST(duplicates)
}
<div style="background: #ffff00" width="100%">
</div></pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(112)">../test/test_ssl.cpp:385</a></td><td>test using a signed certificate with the wrong info-hash in DN</td></tr><tr id="112" style="display: none;" colspan="3"><td colspan="3"><h2>test using a signed certificate with the wrong info-hash in DN</h2><h4>../test/test_ssl.cpp:385</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // in verifying peers
</div></pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(112)">../test/test_ssl.cpp:391</a></td><td>test using a signed certificate with the wrong info-hash in DN</td></tr><tr id="112" style="display: none;" colspan="3"><td colspan="3"><h2>test using a signed certificate with the wrong info-hash in DN</h2><h4>../test/test_ssl.cpp:391</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // in verifying peers
ctx.set_verify_mode(context::verify_none, ec);
if (ec)
{
@ -4266,8 +4266,8 @@ TORRENT_TEST(duplicates)
return false;
}
fprintf(stderr, "use_tmp_dh_file \"%s\"\n", dh_params.c_str());
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(113)">../test/test_ssl.cpp:483</a></td><td>also test using a hash that refers to a valid torrent but that differs from the SNI hash</td></tr><tr id="113" style="display: none;" colspan="3"><td colspan="3"><h2>also test using a hash that refers to a valid torrent
but that differs from the SNI hash</h2><h4>../test/test_ssl.cpp:483</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> print_alerts(ses1, "ses1", true, true, true, &amp;on_alert);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(113)">../test/test_ssl.cpp:489</a></td><td>also test using a hash that refers to a valid torrent but that differs from the SNI hash</td></tr><tr id="113" style="display: none;" colspan="3"><td colspan="3"><h2>also test using a hash that refers to a valid torrent
but that differs from the SNI hash</h2><h4>../test/test_ssl.cpp:489</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> print_alerts(ses1, "ses1", true, true, true, &amp;on_alert);
if (ec)
{
fprintf(stderr, "Failed SSL handshake: %s\n"
@ -6465,7 +6465,7 @@ retry:
TORRENT_ASSERT(!m_abort);
m_listen_sockets.push_back(s);
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(187)">../src/session_impl.cpp:2750</a></td><td>should this function take a shared_ptr instead?</td></tr><tr id="187" style="display: none;" colspan="3"><td colspan="3"><h2>should this function take a shared_ptr instead?</h2><h4>../src/session_impl.cpp:2750</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(187)">../src/session_impl.cpp:2752</a></td><td>should this function take a shared_ptr instead?</td></tr><tr id="187" style="display: none;" colspan="3"><td colspan="3"><h2>should this function take a shared_ptr instead?</h2><h4>../src/session_impl.cpp:2752</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
#if defined TORRENT_ASIO_DEBUGGING
complete_async("session_impl::on_socks_accept");
#endif
@ -6516,7 +6516,7 @@ retry:
TORRENT_ASSERT(p-&gt;is_disconnecting());
TORRENT_ASSERT(sp.use_count() &gt; 0);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(188)">../src/session_impl.cpp:3099</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="188" style="display: none;" colspan="3"><td colspan="3"><h2>have a separate list for these connections, instead of having to loop through all of them</h2><h4>../src/session_impl.cpp:3099</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_auto_manage_time_scaler &lt; 0)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(188)">../src/session_impl.cpp:3101</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="188" style="display: none;" colspan="3"><td colspan="3"><h2>have a separate list for these connections, instead of having to loop through all of them</h2><h4>../src/session_impl.cpp:3101</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_auto_manage_time_scaler &lt; 0)
{
INVARIANT_CHECK;
m_auto_manage_time_scaler = settings().get_int(settings_pack::auto_manage_interval);
@ -6567,7 +6567,7 @@ retry:
// to not miss the torrent after it
if (!t.want_tick()) --i;
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(189)">../src/session_impl.cpp:3132</a></td><td>this should apply to all bandwidth channels</td></tr><tr id="189" style="display: none;" colspan="3"><td colspan="3"><h2>this should apply to all bandwidth channels</h2><h4>../src/session_impl.cpp:3132</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#if TORRENT_DEBUG_STREAMING &gt; 0
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(189)">../src/session_impl.cpp:3134</a></td><td>this should apply to all bandwidth channels</td></tr><tr id="189" style="display: none;" colspan="3"><td colspan="3"><h2>this should apply to all bandwidth channels</h2><h4>../src/session_impl.cpp:3134</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#if TORRENT_DEBUG_STREAMING &gt; 0
printf("\033[2J\033[0;0H");
#endif
@ -6618,9 +6618,9 @@ retry:
// scrape paused torrents that are auto managed
// (unless the session is paused)
// --------------------------------------------------------------
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(190)">../src/session_impl.cpp:3861</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="190" style="display: none;" colspan="3"><td colspan="3"><h2>use a lower limit than m_settings.connections_limit
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(190)">../src/session_impl.cpp:3863</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="190" style="display: none;" colspan="3"><td colspan="3"><h2>use a lower limit than m_settings.connections_limit
to allocate the to 10% or so of connection slots for incoming
connections</h2><h4>../src/session_impl.cpp:3861</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // robin fashion, so that every torrent is equally likely to connect to a
connections</h2><h4>../src/session_impl.cpp:3863</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // robin fashion, so that every torrent is equally likely to connect to a
// peer
// boost connections are connections made by torrent connection
@ -6671,8 +6671,8 @@ connections</h2><h4>../src/session_impl.cpp:3861</h4><pre style="background: #f6
m_next_finished_connect_torrent = 0;
torrent* t = NULL;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(191)">../src/session_impl.cpp:4011</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><tr id="191" style="display: none;" colspan="3"><td colspan="3"><h2>post a message to have this happen
immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp:4011</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> continue;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(191)">../src/session_impl.cpp:4013</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><tr id="191" style="display: none;" colspan="3"><td colspan="3"><h2>post a message to have this happen
immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp:4013</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> continue;
}
if (!p-&gt;is_peer_interested()
@ -6723,12 +6723,12 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
, allowed_upload_slots);
#ifndef TORRENT_DISABLE_LOGGING
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(192)">../src/session_impl.cpp:4397</a></td><td>it might be a nice feature here to limit the number of torrents to send in a single update. By just posting the first n torrents, they would nicely be round-robined because the torrent lists are always pushed back. Perhaps the status_update_alert could even have a fixed array of n entries rather than a vector, to further improve memory locality.</td></tr><tr id="192" style="display: none;" colspan="3"><td colspan="3"><h2>it might be a nice feature here to limit the number of torrents
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(192)">../src/session_impl.cpp:4399</a></td><td>it might be a nice feature here to limit the number of torrents to send in a single update. By just posting the first n torrents, they would nicely be round-robined because the torrent lists are always pushed back. Perhaps the status_update_alert could even have a fixed array of n entries rather than a vector, to further improve memory locality.</td></tr><tr id="192" style="display: none;" colspan="3"><td colspan="3"><h2>it might be a nice feature here to limit the number of torrents
to send in a single update. By just posting the first n torrents, they
would nicely be round-robined because the torrent lists are always
pushed back. Perhaps the status_update_alert could even have a fixed
array of n entries rather than a vector, to further improve memory
locality.</h2><h4>../src/session_impl.cpp:4397</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;status(&amp;*i, flags);
locality.</h2><h4>../src/session_impl.cpp:4399</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;status(&amp;*i, flags);
}
}
@ -6779,8 +6779,8 @@ locality.</h2><h4>../src/session_impl.cpp:4397</h4><pre style="background: #f6f6
m_dht-&gt;update_stats_counters(m_stats_counters);
#endif
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(193)">../src/session_impl.cpp:4610</a></td><td>this logic could probably be less spaghetti looking by being moved to a function with early exits</td></tr><tr id="193" style="display: none;" colspan="3"><td colspan="3"><h2>this logic could probably be less spaghetti looking by being
moved to a function with early exits</h2><h4>../src/session_impl.cpp:4610</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(193)">../src/session_impl.cpp:4612</a></td><td>this logic could probably be less spaghetti looking by being moved to a function with early exits</td></tr><tr id="193" style="display: none;" colspan="3"><td colspan="3"><h2>this logic could probably be less spaghetti looking by being
moved to a function with early exits</h2><h4>../src/session_impl.cpp:4612</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
// figure out the info hash of the torrent
sha1_hash const* ih = 0;
@ -6831,9 +6831,9 @@ moved to a function with early exits</h2><h4>../src/session_impl.cpp:4610</h4><p
|| !params.url.empty()
|| params.info_hash.is_all_zeros())
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(194)">../src/storage.cpp:751</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="194" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(194)">../src/storage.cpp:758</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="194" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
renamed, but also if they have been merged into a single file for instance
maybe use the same format as .torrent files and reuse some code from torrent_info</h2><h4>../src/storage.cpp:751</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (file_offset &lt; files().file_size(file_index))
maybe use the same format as .torrent files and reuse some code from torrent_info</h2><h4>../src/storage.cpp:758</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (file_offset &lt; files().file_size(file_index))
break;
file_offset -= files().file_size(file_index);
@ -6884,9 +6884,9 @@ maybe use the same format as .torrent files and reuse some code from torrent_inf
}
if (file_sizes_ent.list_size() == 0)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(195)">../src/storage.cpp:1082</a></td><td>if everything moves OK, except for the partfile we currently won't update the save path, which breaks things. it would probably make more sense to give up on the partfile</td></tr><tr id="195" style="display: none;" colspan="3"><td colspan="3"><h2>if everything moves OK, except for the partfile
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(195)">../src/storage.cpp:1089</a></td><td>if everything moves OK, except for the partfile we currently won't update the save path, which breaks things. it would probably make more sense to give up on the partfile</td></tr><tr id="195" style="display: none;" colspan="3"><td colspan="3"><h2>if everything moves OK, except for the partfile
we currently won't update the save path, which breaks things.
it would probably make more sense to give up on the partfile</h2><h4>../src/storage.cpp:1082</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (ec)
it would probably make more sense to give up on the partfile</h2><h4>../src/storage.cpp:1089</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (ec)
{
ec.file = i-&gt;second;
ec.operation = storage_error::copy;
@ -7446,7 +7446,7 @@ dedicated listen port</h2><h4>../src/torrent.cpp:2926</h4><pre style="background
debug_log("DHT: no listen sockets");
if (m_torrent_file-&gt;is_valid() &amp;&amp; !m_files_checked)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(206)">../src/torrent.cpp:3723</a></td><td>add one peer per IP the hostname resolves to</td></tr><tr id="206" style="display: none;" colspan="3"><td colspan="3"><h2>add one peer per IP the hostname resolves to</h2><h4>../src/torrent.cpp:3723</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(206)">../src/torrent.cpp:3728</a></td><td>add one peer per IP the hostname resolves to</td></tr><tr id="206" style="display: none;" colspan="3"><td colspan="3"><h2>add one peer per IP the hostname resolves to</h2><h4>../src/torrent.cpp:3728</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
void torrent::on_peer_name_lookup(error_code const&amp; e
, std::vector&lt;address&gt; const&amp; host_list, int port)
@ -7497,7 +7497,7 @@ dedicated listen port</h2><h4>../src/torrent.cpp:2926</h4><pre style="background
boost::int64_t torrent::quantized_bytes_done() const
{
// INVARIANT_CHECK;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(207)">../src/torrent.cpp:4663</a></td><td>update suggest_piece?</td></tr><tr id="207" style="display: none;" colspan="3"><td colspan="3"><h2>update suggest_piece?</h2><h4>../src/torrent.cpp:4663</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (has_picker())
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(207)">../src/torrent.cpp:4668</a></td><td>update suggest_piece?</td></tr><tr id="207" style="display: none;" colspan="3"><td colspan="3"><h2>update suggest_piece?</h2><h4>../src/torrent.cpp:4668</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (has_picker())
{
torrent_peer* pp = peer-&gt;peer_info_struct();
m_picker-&gt;inc_refcount_all(pp);
@ -7548,8 +7548,8 @@ dedicated listen port</h2><h4>../src/torrent.cpp:2926</h4><pre style="background
// availability even when we're a seed, for
// the suggest piece feature
if (!has_picker()) return;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(208)">../src/torrent.cpp:4807</a></td><td>really, we should just keep the picker around in this case to maintain the availability counters</td></tr><tr id="208" style="display: none;" colspan="3"><td colspan="3"><h2>really, we should just keep the picker around
in this case to maintain the availability counters</h2><h4>../src/torrent.cpp:4807</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.reserve(cs.pieces.size());
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(208)">../src/torrent.cpp:4812</a></td><td>really, we should just keep the picker around in this case to maintain the availability counters</td></tr><tr id="208" style="display: none;" colspan="3"><td colspan="3"><h2>really, we should just keep the picker around
in this case to maintain the availability counters</h2><h4>../src/torrent.cpp:4812</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.reserve(cs.pieces.size());
// sort in ascending order, to get most recently used first
std::sort(cs.pieces.begin(), cs.pieces.end()
@ -7600,12 +7600,12 @@ in this case to maintain the availability counters</h2><h4>../src/torrent.cpp:48
}
void torrent::abort()
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(209)">../src/torrent.cpp:6838</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="209" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(209)">../src/torrent.cpp:6843</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="209" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
renamed, but also if they have been merged into a single file for instance
maybe use the same format as .torrent files and reuse some code from torrent_info
The mapped_files needs to be read both in the network thread
and in the disk thread, since they both have their own mapped files structures
which are kept in sync</h2><h4>../src/torrent.cpp:6838</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
which are kept in sync</h2><h4>../src/torrent.cpp:6843</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
m_save_path = p;
#ifndef TORRENT_DISABLE_LOGGING
debug_log("loaded resume data: save-path: %s", m_save_path.c_str());
@ -7656,12 +7656,12 @@ which are kept in sync</h2><h4>../src/torrent.cpp:6838</h4><pre style="backgroun
m_file_priority[i] = file_priority.list_int_value_at(i, 1);
// this is suspicious, leave seed mode
if (m_file_priority[i] == 0) m_seed_mode = false;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(210)">../src/torrent.cpp:6971</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="210" style="display: none;" colspan="3"><td colspan="3"><h2>if this is a merkle torrent and we can't
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(210)">../src/torrent.cpp:6976</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="210" style="display: none;" colspan="3"><td colspan="3"><h2>if this is a merkle torrent and we can't
restore the tree, we need to wipe all the
bits in the have array, but not necessarily
we might want to do a full check to see if we have
all the pieces. This is low priority since almost
no one uses merkle torrents</h2><h4>../src/torrent.cpp:6971</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:6976</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
}
}
@ -7712,9 +7712,9 @@ no one uses merkle torrents</h2><h4>../src/torrent.cpp:6971</h4><pre style="back
if (piece_priority &amp;&amp; piece_priority.string_length()
== m_torrent_file-&gt;num_pieces())
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(211)">../src/torrent.cpp:7197</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="211" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(211)">../src/torrent.cpp:7202</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="211" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
renamed, but also if they have been merged into a single file for instance.
using file_base</h2><h4>../src/torrent.cpp:7197</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.resize(m_torrent_file-&gt;num_pieces());
using file_base</h2><h4>../src/torrent.cpp:7202</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> pieces.resize(m_torrent_file-&gt;num_pieces());
if (!has_picker())
{
std::memset(&amp;pieces[0], m_have_all, pieces.size());
@ -7765,9 +7765,9 @@ using file_base</h2><h4>../src/torrent.cpp:7197</h4><pre style="background: #f6f
{
error_code ec;
torrent_peer const* p = *i;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(212)">../src/torrent.cpp:9440</a></td><td>add a flag to ignore stats, and only care about resume data for content. For unchanged files, don't trigger a load of the metadata just to save an empty resume data file</td></tr><tr id="212" style="display: none;" colspan="3"><td colspan="3"><h2>add a flag to ignore stats, and only care about resume data for
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(212)">../src/torrent.cpp:9445</a></td><td>add a flag to ignore stats, and only care about resume data for content. For unchanged files, don't trigger a load of the metadata just to save an empty resume data file</td></tr><tr id="212" style="display: none;" colspan="3"><td colspan="3"><h2>add a flag to ignore stats, and only care about resume data for
content. For unchanged files, don't trigger a load of the metadata
just to save an empty resume data file</h2><h4>../src/torrent.cpp:9440</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_complete != 0xffffff) seeds = m_complete;
just to save an empty resume data file</h2><h4>../src/torrent.cpp:9445</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_complete != 0xffffff) seeds = m_complete;
else seeds = m_peer_list ? m_peer_list-&gt;num_seeds() : 0;
if (m_incomplete != 0xffffff) downloaders = m_incomplete;
@ -7818,8 +7818,8 @@ just to save an empty resume data file</h2><h4>../src/torrent.cpp:9440</h4><pre
m_save_resume_flags = boost::uint8_t(flags);
state_updated();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(213)">../src/torrent.cpp:11057</a></td><td>instead of resorting the whole list, insert the peers directly into the right place</td></tr><tr id="213" style="display: none;" colspan="3"><td colspan="3"><h2>instead of resorting the whole list, insert the peers
directly into the right place</h2><h4>../src/torrent.cpp:11057</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> printf("timed out [average-piece-time: %d ms ]\n"
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(213)">../src/torrent.cpp:11062</a></td><td>instead of resorting the whole list, insert the peers directly into the right place</td></tr><tr id="213" style="display: none;" colspan="3"><td colspan="3"><h2>instead of resorting the whole list, insert the peers
directly into the right place</h2><h4>../src/torrent.cpp:11062</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> printf("timed out [average-piece-time: %d ms ]\n"
, m_average_piece_time);
#endif
}
@ -9050,10 +9050,10 @@ private:
// destructs.
//
// For more information on peer classes, see peer-classes_.
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(239)">../include/libtorrent/settings_pack.hpp:1094</a></td><td>deprecate this ``max_rejects`` is the number of piece requests we will reject in a row while a peer is choked before the peer is considered abusive and is disconnected.</td></tr><tr id="239" style="display: none;" colspan="3"><td colspan="3"><h2>deprecate this
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(239)">../include/libtorrent/settings_pack.hpp:1092</a></td><td>deprecate this ``max_rejects`` is the number of piece requests we will reject in a row while a peer is choked before the peer is considered abusive and is disconnected.</td></tr><tr id="239" style="display: none;" colspan="3"><td colspan="3"><h2>deprecate this
``max_rejects`` is the number of piece requests we will reject in a
row while a peer is choked before the peer is considered abusive
and is disconnected.</h2><h4>../include/libtorrent/settings_pack.hpp:1094</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
and is disconnected.</h2><h4>../include/libtorrent/settings_pack.hpp:1092</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// this is the minimum allowed announce interval for a tracker. This
// is specified in seconds and is used as a sanity check on what is
// returned from a tracker. It mitigates hammering misconfigured
@ -9453,7 +9453,7 @@ public:
item(entry const&amp; v
, std::pair&lt;char const*, int&gt; salt
, boost::uint64_t seq, char const* pk, char const* sk);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(247)">../include/libtorrent/aux_/session_impl.hpp:858</a></td><td>should this be renamed m_outgoing_interfaces?</td></tr><tr id="247" style="display: none;" colspan="3"><td colspan="3"><h2>should this be renamed m_outgoing_interfaces?</h2><h4>../include/libtorrent/aux_/session_impl.hpp:858</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // client with the tracker only. It is randomized
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(247)">../include/libtorrent/aux_/session_impl.hpp:859</a></td><td>should this be renamed m_outgoing_interfaces?</td></tr><tr id="247" style="display: none;" colspan="3"><td colspan="3"><h2>should this be renamed m_outgoing_interfaces?</h2><h4>../include/libtorrent/aux_/session_impl.hpp:859</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // client with the tracker only. It is randomized
// at startup
int m_key;
@ -9504,7 +9504,7 @@ public:
// round-robin index into m_net_interfaces
mutable boost::uint8_t m_interface_index;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(248)">../include/libtorrent/aux_/session_impl.hpp:909</a></td><td>replace this by a proper asio timer</td></tr><tr id="248" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:909</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(248)">../include/libtorrent/aux_/session_impl.hpp:910</a></td><td>replace this by a proper asio timer</td></tr><tr id="248" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:910</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
void open_new_incoming_socks_connection();
enum listen_on_flags_t
@ -9528,7 +9528,7 @@ public:
</div>
// this is used to decide when to recalculate which
// torrents to keep queued and which to activate
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(249)">../include/libtorrent/aux_/session_impl.hpp:914</a></td><td>replace this by a proper asio timer</td></tr><tr id="249" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:914</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(249)">../include/libtorrent/aux_/session_impl.hpp:915</a></td><td>replace this by a proper asio timer</td></tr><tr id="249" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:915</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
open_ssl_socket = 0x10
};
@ -9554,7 +9554,7 @@ public:
// is only decresed when the unchoke set
// is recomputed, and when it reaches zero,
// the optimistic unchoke is moved to another peer.
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(250)">../include/libtorrent/aux_/session_impl.hpp:921</a></td><td>replace this by a proper asio timer</td></tr><tr id="250" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:921</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(250)">../include/libtorrent/aux_/session_impl.hpp:922</a></td><td>replace this by a proper asio timer</td></tr><tr id="250" style="display: none;" colspan="3"><td colspan="3"><h2>replace this by a proper asio timer</h2><h4>../include/libtorrent/aux_/session_impl.hpp:922</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
#ifndef TORRENT_DISABLE_DHT
entry m_dht_state;
#endif

Binary file not shown.

Before

Width:  |  Height:  |  Size: 272 KiB

After

Width:  |  Height:  |  Size: 365 KiB

View File

@ -1,9 +1,9 @@
+-----------------------+
| BitTorrent protocol |
+-----------------------+
| SSL |
+-----------+-----------+
| TCP | uTP |
| +-----------+
| | UDP |
+-----------+-----------+
+------------------------+
| "BitTorrent protocol" |
+------------------------+
| "SSL" |
+------------+-----------+
| "TCP" | "uTP" |
| +-----------+
| | "UDP" |
+------------+-----------+