merged fixes from RC_1_0

This commit is contained in:
Arvid Norberg 2014-08-26 03:14:32 +00:00
parent d2c64915bf
commit 7d751b80da
36 changed files with 195 additions and 234 deletions

View File

@ -98,6 +98,7 @@
* fix uTP edge case where udp socket buffer fills up
* fix nagle implementation in uTP
* fixed overflow and download performance issue when downloading at high rates
* fixed bug in add_torrent_alert::message for magnet links
* disable optimistic disconnects when connection limit is low
* improved error handling of session::listen_on

View File

@ -23,7 +23,6 @@ DOCS_IMAGES = \
docs/read_disk_buffers.png \
docs/session_stats_peers.png \
docs/storage.png \
docs/style.css \
docs/todo.html \
docs/write_disk_buffers.png \
docs/ziptorrent_thumb.gif \
@ -34,7 +33,17 @@ DOCS_IMAGES = \
docs/hash_distribution.png \
docs/complete_bit_prefixes.png \
docs/troubleshooting.png \
docs/troubleshooting_thumb.png
docs/troubleshooting_thumb.png \
docs/style.css \
docs/base.css \
docs/rst.css \
docs/img/bg.png \
docs/img/blue_bottom.png \
docs/img/blue_top.png \
docs/img/dotline.gif \
docs/img/logo.png \
docs/img/minus.gif \
docs/img/orange.png
DOCS_PAGES = \
docs/building.html \

View File

@ -47,7 +47,7 @@ body { text-align: center; }
#header {
height: 116px;
width: 695px;
background: url(../img/orange.png) #FDA72A no-repeat top left;
background: url('img/orange.png') #FDA72A no-repeat top left;
}
#header h1 {
@ -56,7 +56,7 @@ body { text-align: center; }
float: right;
width: 536px;
height: 116px;
background: url(../img/logo.png);
background: url('img/logo.png');
}
#header h1 span, #header h2 { display: none; }
@ -65,7 +65,7 @@ body { text-align: center; }
clear: both;
width: 695px;
height: 49px;
background: #D3D3D3 url(../img/footer.png) no-repeat left top;
background: #D3D3D3 url('img/footer.png') no-repeat left top;
text-align: center;
margin-bottom: 1em;
}

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>libtorrent manual</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="libtorrent-manual">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>client_test example program</title>
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
<link rel="stylesheet" href="style.css" type="text/css" />
<style type="text/css">
/* Hides from IE-mac \*/
* html pre { height: 1%; }
/* End hide from IE-mac */
</style>
</head>
<body>
<div class="document" id="client-test-example-program">
<div id="container">
<div id="header">
<div id="orange"></div>
<div id="logo"></div>
</div>
<div id="main">
<h1 class="title">client_test example program</h1>
<p>Client test is a, more or less, complete bittorrent client. It lacks most
settings and you can't start or stop torrents once you've started it. All
the settings are hardcoded. The commandline arguments are:</p>
<pre class="literal-block">
client_test &lt;filename1.torrent&gt; &lt;filename2.torrent&gt; ...
</pre>
<p>You can start any number of torrent downloads/seeds via the commandline.
If one argument starts with <tt class="docutils literal"><span class="pre">http://</span></tt> it is interpreted as a tracker
announce url, and it expects an info-hash as the next argument. The info-hash
has to be hex-encoded. For example: <tt class="docutils literal">2410d4554d5ed856d69f426c38791673c59f4418</tt>.
If you pass an announce url and info-hash, a torrent-less download is started.
It relies on that at least one peer on the tracker is running a libtorrent based
client and has the metadata (.torrent file). The metadata extension in
libtorrent will then download it from that peer (or from those peers if more
than one).</p>
<p>While running, the <tt class="docutils literal">client_test</tt> sample will look something like this:</p>
<img alt="client_test.png" src="client_test.png" />
<p>The commands available in the client are:</p>
<ul class="simple">
<li><tt class="docutils literal">q</tt> quits the client (there will be a delay while the client waits
for tracker responses)</li>
<li><tt class="docutils literal">l</tt> toggle log. Will display the log at the bottom, informing about
tracker and peer events.</li>
<li><tt class="docutils literal">i</tt> toggles torrent info. Will show the peer list for each torrent.</li>
<li><tt class="docutils literal">d</tt> toggle download info. Will show the block list for each torrent,
showing downloaded and requested blocks.</li>
<li><tt class="docutils literal">p</tt> pause all torrents.</li>
<li><tt class="docutils literal">u</tt> unpause all torrents.</li>
<li><tt class="docutils literal">r</tt> force tracker reannounce for all torrents.</li>
<li><tt class="docutils literal">f</tt> toggle show file progress. Displays a list of all files and the
download progress for each file.</li>
</ul>
<p>The list at the bottom (shown if you press <tt class="docutils literal">d</tt>) shows which blocks has
been requested from which peer. The green background means that it has been
downloaded. It shows that fast peers will prefer to request whole pieces
instead of dowloading parts of pieces. It may make it easier to determine
which peer that sent the corrupt data if a piece fails the hash test.</p>
</div>
</body>
</html>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>libtorrent manual</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="libtorrent-manual">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title></title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>BitTorrent extension for DHT RSS feeds</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="bittorrent-extension-for-dht-rss-feeds">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>BitTorrent DHT security extension</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="bittorrent-dht-security-extension">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>BitTorrent extension for arbitrary DHT store</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="bittorrent-extension-for-arbitrary-dht-store">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>
@ -315,14 +308,14 @@ some additional error codes.</p>
</thead>
<tbody valign="top">
<tr><td>205</td>
<td>message (i.e. <tt class="docutils literal">v</tt> field)
<td>message (<tt class="docutils literal">v</tt> field)
too big.</td>
</tr>
<tr><td>206</td>
<td>invalid signature</td>
</tr>
<tr><td>207</td>
<td>salt (i.e. <tt class="docutils literal">salt</tt> field)
<td>salt (<tt class="docutils literal">salt</tt> field)
too big.</td>
</tr>
<tr><td>301</td>
@ -394,7 +387,7 @@ prepended if a non-empty salt is specified in the <tt class="docutils literal">p
</ol>
<p>On the storage node, the signature MUST be verified before accepting the store
command. The data MUST be stored under the SHA-1 hash of the public key (as it
appears in the bencoded dict).</p>
appears in the bencoded dict) and the salt (if present).</p>
<p>On the requesting nodes, the key they get back from a <tt class="docutils literal">get</tt> request MUST be
verified to hash to the target ID the lookup was made for, as well as verifying
the signature. If any of these fail, the response SHOULD be considered invalid.</p>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>libtorrent Examples</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="libtorrent-examples">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title></title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com Ludvig Strigeus, ludde&#64;utorrent.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>libtorrent manual</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="libtorrent-manual">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

BIN
docs/img/bg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
docs/img/blue_bottom.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
docs/img/blue_top.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

BIN
docs/img/dotline.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

BIN
docs/img/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

BIN
docs/img/minus.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 B

BIN
docs/img/orange.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

View File

@ -5,8 +5,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title></title>
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -28,13 +28,6 @@
<body>
<div class="document">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -83,8 +83,8 @@ $(REFERENCE_TARGETS:=.rst):gen_reference_doc.py ../include/libtorrent/*.hpp ../i
rst2pdf $? -o $@ --stylesheets stylesheet
%.html:%.rst
rst2html.py --template=template.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $@
rst2html.py --template=template2.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $(WEB_PATH)/$@
rst2html-2.6.py --template=template.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $@
rst2html-2.6.py --template=template2.txt --stylesheet-path=style.css --link-stylesheet --no-toc-backlinks $? > $(WEB_PATH)/$@
%.png:%.dot
dot -Tpng $? >$@

View File

@ -5,8 +5,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>projects using libtorrent</title>
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -28,13 +28,6 @@
<body>
<div class="document" id="projects-using-libtorrent">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>libtorrent python binding</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="libtorrent-python-binding">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>Session</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="session">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -179,13 +179,13 @@ div.contents {
width: 200px;
float: right;
clear: right;
background: url(../img/blue_bottom.png) no-repeat bottom left;
background: url('img/blue_bottom.png') no-repeat bottom left;
border-right: solid 1px #A1C5D6;
}
#table-of-contents p {
font-family: Georgia, "Times New Roman", serif;
background: #A1C5D6 url(../img/blue_top.png) no-repeat top left;
background: #A1C5D6 url('img/blue_top.png') no-repeat top left;
color: #AD370A;
padding: 0.5em;
margin: 0;
@ -204,7 +204,7 @@ div.contents {
}
#table-of-contents ul ul {
background: url(../img/dotline.gif) repeat-y;
background: url('img/dotline.gif') repeat-y;
}
#table-of-contents a.reference {
@ -213,7 +213,7 @@ div.contents {
font-weight: bold;
color: #000050;
margin-right: 1em;
background: url(../img/minus.gif) no-repeat left 50%;
background: url('img/minus.gif') no-repeat left 50%;
padding-left: 15px;
}

View File

@ -118,7 +118,7 @@ div.section p, div.section ul, div.section dl {
#header {
height: 116px;
background: url(../img/bg.png) #1f5c85;
background: url('img/bg.png') #1f5c85;
-moz-border-radius: 6pt;
border-radius: 6pt;
}
@ -129,7 +129,7 @@ div.section p, div.section ul, div.section dl {
float: left;
width: 159px;
height: 116px;
background: url(../img/orange.png) no-repeat top left;
background: url('img/orange.png') no-repeat top left;
}
#logo {
@ -138,7 +138,7 @@ div.section p, div.section ul, div.section dl {
float: right;
width: 535px;
height: 116px;
background: url(../img/logo.png);
background: url('img/logo.png');
}
#footer {

View File

@ -1,7 +1,7 @@
%(head_prefix)s
%(head)s
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -21,13 +21,6 @@
</style>
%(body_prefix)s
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -175,8 +175,8 @@ void bootstrap::done()
m_threads.resize(m_num_threads);
}
}
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(3)">../src/peer_connection.cpp:1713</a></td><td>we should probably use ses.m_allowed_upload_slots here instead to work with auto-unchoke logic</td></tr><tr id="3" style="display: none;" colspan="3"><td colspan="3"><h2>we should probably use ses.m_allowed_upload_slots here instead
to work with auto-unchoke logic</h2><h4>../src/peer_connection.cpp:1713</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(3)">../src/peer_connection.cpp:1719</a></td><td>we should probably use ses.m_allowed_upload_slots here instead to work with auto-unchoke logic</td></tr><tr id="3" style="display: none;" colspan="3"><td colspan="3"><h2>we should probably use ses.m_allowed_upload_slots here instead
to work with auto-unchoke logic</h2><h4>../src/peer_connection.cpp:1719</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
if (t-&gt;graceful_pause())
{
#if defined TORRENT_VERBOSE_LOGGING
@ -227,11 +227,11 @@ to work with auto-unchoke logic</h2><h4>../src/peer_connection.cpp:1713</h4><pre
// end up sending an unchoke before the other end sends us
// an interested message. This may confuse clients, not reacting
// to the first unchoke, and then not check whether it's unchoked
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(4)">../src/peer_connection.cpp:3043</a></td><td>since we throw away the queue entry once we issue the disk job, this may happen. Instead, we should keep the queue entry around, mark it as having been requested from disk and once the disk job comes back, discard it if it has been cancelled. Maybe even be able to cancel disk jobs?</td></tr><tr id="4" style="display: none;" colspan="3"><td colspan="3"><h2>since we throw away the queue entry once we issue
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(4)">../src/peer_connection.cpp:3049</a></td><td>since we throw away the queue entry once we issue the disk job, this may happen. Instead, we should keep the queue entry around, mark it as having been requested from disk and once the disk job comes back, discard it if it has been cancelled. Maybe even be able to cancel disk jobs?</td></tr><tr id="4" style="display: none;" colspan="3"><td colspan="3"><h2>since we throw away the queue entry once we issue
the disk job, this may happen. Instead, we should keep the
queue entry around, mark it as having been requested from
disk and once the disk job comes back, discard it if it has
been cancelled. Maybe even be able to cancel disk jobs?</h2><h4>../src/peer_connection.cpp:3043</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
been cancelled. Maybe even be able to cancel disk jobs?</h2><h4>../src/peer_connection.cpp:3049</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
std::vector&lt;peer_request&gt;::iterator i
= std::find(m_requests.begin(), m_requests.end(), r);
@ -282,9 +282,9 @@ been cancelled. Maybe even be able to cancel disk jobs?</h2><h4>../src/peer_conn
{
INVARIANT_CHECK;
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(5)">../src/peer_connection.cpp:4740</a></td><td>instead of using settings_pack::request_timeout, use m_rtt.mean() + m_rtt.avg_deviation() * 2 or something like that. the configuration option could hopefully be removed</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>instead of using settings_pack::request_timeout, use
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(5)">../src/peer_connection.cpp:4746</a></td><td>instead of using settings_pack::request_timeout, use m_rtt.mean() + m_rtt.avg_deviation() * 2 or something like that. the configuration option could hopefully be removed</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>instead of using settings_pack::request_timeout, use
m_rtt.mean() + m_rtt.avg_deviation() * 2 or something like that.
the configuration option could hopefully be removed</h2><h4>../src/peer_connection.cpp:4740</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // don't bother disconnect peers we haven't been interested
the configuration option could hopefully be removed</h2><h4>../src/peer_connection.cpp:4746</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // don't bother disconnect peers we haven't been interested
// in (and that hasn't been interested in us) for a while
// unless we have used up all our connection slots
if (may_timeout
@ -414,7 +414,7 @@ namespace libtorrent
</div> : m_ios(ios)
, m_resolver(ios)
, m_max_size(700)
, m_timeout(1200)
, m_timeout(seconds(1200))
{}
void resolver::on_lookup(error_code const&amp; ec, tcp::resolver::iterator i
@ -431,7 +431,7 @@ namespace libtorrent
}
dns_cache_entry&amp; ce = m_cache[hostname];
time_t now = time(NULL);
ptime now = time_now();
ce.last_seen = now;
ce.addresses.clear();
while (i != tcp::resolver::iterator())
@ -441,9 +441,9 @@ namespace libtorrent
}
h(ec, ce.addresses);
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(8)">../src/session_impl.cpp:5700</a></td><td>it would be really nice to update these counters as they are incremented. This depends on the session being ticked, which has a fairly coarse grained resolution</td></tr><tr id="8" style="display: none;" colspan="3"><td colspan="3"><h2>it would be really nice to update these counters
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(8)">../src/session_impl.cpp:5697</a></td><td>it would be really nice to update these counters as they are incremented. This depends on the session being ticked, which has a fairly coarse grained resolution</td></tr><tr id="8" style="display: none;" colspan="3"><td colspan="3"><h2>it would be really nice to update these counters
as they are incremented. This depends on the session
being ticked, which has a fairly coarse grained resolution</h2><h4>../src/session_impl.cpp:5700</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;status(&amp;alert-&gt;status.back(), ~torrent_handle::query_accurate_download_counters);
being ticked, which has a fairly coarse grained resolution</h2><h4>../src/session_impl.cpp:5697</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;status(&amp;alert-&gt;status.back(), ~torrent_handle::query_accurate_download_counters);
t-&gt;clear_in_state_update();
}
state_updates.clear();
@ -494,8 +494,8 @@ being ticked, which has a fairly coarse grained resolution</h2><h4>../src/sessio
for (int i = 0; i &lt; counters::num_counters; ++i)
values[i] = m_stats_counters[i];
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(9)">../src/session_impl.cpp:7152</a></td><td>If socket jobs could be higher level, to include RC4 encryption and decryption, we would offload the main thread even more</td></tr><tr id="9" style="display: none;" colspan="3"><td colspan="3"><h2>If socket jobs could be higher level, to include RC4 encryption and decryption,
we would offload the main thread even more</h2><h4>../src/session_impl.cpp:7152</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
</pre></td></tr><tr style="background: #fcc"><td>relevance&nbsp;3</td><td><a href="javascript:expand(9)">../src/session_impl.cpp:7156</a></td><td>If socket jobs could be higher level, to include RC4 encryption and decryption, we would offload the main thread even more</td></tr><tr id="9" style="display: none;" colspan="3"><td colspan="3"><h2>If socket jobs could be higher level, to include RC4 encryption and decryption,
we would offload the main thread even more</h2><h4>../src/session_impl.cpp:7156</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
int num_threads = m_settings.get_int(settings_pack::network_threads);
int num_pools = num_threads &gt; 0 ? num_threads : 1;
while (num_pools &gt; m_net_thread_pool.size())
@ -1117,8 +1117,8 @@ settings_pack be optional?</h2><h4>../include/libtorrent/session.hpp:210</h4><pr
}
if (m_settings.get_int(settings_pack::peer_tos) != 0) {
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(22)">../src/session_impl.cpp:4599</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="22" 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:4599</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(22)">../src/session_impl.cpp:4596</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="22" 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:4596</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (!m_dht_torrents.empty())
{
boost::shared_ptr&lt;torrent&gt; t;
do
@ -1427,9 +1427,9 @@ void purge_peers(std::set&lt;peer_entry&gt;&amp; peers)
void nop() {}
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(28)">../src/kademlia/node_id.cpp:135</a></td><td>this could be optimized if SSE 4.2 is available. It could also be optimized given that we have a fixed length</td></tr><tr id="28" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized if SSE 4.2 is
</pre></td></tr><tr style="background: #cfc"><td>relevance&nbsp;2</td><td><a href="javascript:expand(28)">../src/kademlia/node_id.cpp:133</a></td><td>this could be optimized if SSE 4.2 is available. It could also be optimized given that we have a fixed length</td></tr><tr id="28" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized if SSE 4.2 is
available. It could also be optimized given
that we have a fixed length</h2><h4>../src/kademlia/node_id.cpp:135</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> b6 = ip_.to_v6().to_bytes();
that we have a fixed length</h2><h4>../src/kademlia/node_id.cpp:133</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> b6 = ip_.to_v6().to_bytes();
ip = &amp;b6[0];
num_octets = 8;
mask = v6mask;
@ -1816,8 +1816,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(37)">../src/session_impl.cpp:6511</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="37" 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:6511</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(37)">../src/session_impl.cpp:6508</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="37" 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:6508</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());
@ -1868,9 +1868,9 @@ this understanding of our external address, instead of the empty address</h2><h4
{
// INVARIANT_CHECK;
TORRENT_ASSERT(is_single_thread());
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(38)">../src/session_impl.cpp:7664</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="38" 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(38)">../src/session_impl.cpp:7668</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="38" 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:7664</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:7668</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#endif
if (!m_external_ip.cast_vote(ip, source_type, source)) return;
@ -2028,9 +2028,9 @@ it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:6780</h4
// write have bitmask
// the pieces string has one byte per piece. Each
// byte is a bitmask representing different properties
</pre></td></tr><tr style="background: #ccf"><td>relevance&nbsp;1</td><td><a href="javascript:expand(41)">../src/torrent.cpp:7832</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="41" 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(41)">../src/torrent.cpp:7846</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="41" 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:7832</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(is_finished());
for all peers though</h2><h4>../src/torrent.cpp:7846</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(is_finished());
set_state(torrent_status::finished);
set_queue_position(-1);
@ -3169,7 +3169,7 @@ and flushing it, update the slot entries as we go</h2><h4>../src/part_file.cpp:3
for (int piece = 0; piece &lt; m_max_pieces; ++piece)
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(64)">../src/peer_connection.cpp:1109</a></td><td>this should be the global download rate</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>this should be the global download rate</h2><h4>../src/peer_connection.cpp:1109</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(64)">../src/peer_connection.cpp:1115</a></td><td>this should be the global download rate</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>this should be the global download rate</h2><h4>../src/peer_connection.cpp:1115</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
int rate = 0;
// if we haven't received any data recently, the current download rate
@ -3220,7 +3220,7 @@ and flushing it, update the slot entries as we go</h2><h4>../src/part_file.cpp:3
if (!t) return;
t-&gt;received_bytes(bytes_payload, bytes_protocol);
}
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(65)">../src/peer_connection.cpp:3278</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="65" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:3278</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_allowed_fast.push_back(index);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(65)">../src/peer_connection.cpp:3284</a></td><td>sort the allowed fast set in priority order</td></tr><tr id="65" style="display: none;" colspan="3"><td colspan="3"><h2>sort the allowed fast set in priority order</h2><h4>../src/peer_connection.cpp:3284</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> m_allowed_fast.push_back(index);
// if the peer has the piece and we want
// to download it, request it
@ -3428,7 +3428,7 @@ retry:
if (s.sock)
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(69)">../src/session_impl.cpp:3228</a></td><td>should this function take a shared_ptr instead?</td></tr><tr id="69" style="display: none;" colspan="3"><td colspan="3"><h2>should this function take a shared_ptr instead?</h2><h4>../src/session_impl.cpp:3228</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(69)">../src/session_impl.cpp:3225</a></td><td>should this function take a shared_ptr instead?</td></tr><tr id="69" style="display: none;" colspan="3"><td colspan="3"><h2>should this function take a shared_ptr instead?</h2><h4>../src/session_impl.cpp:3225</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
#if defined TORRENT_ASIO_DEBUGGING
complete_async("session_impl::on_socks_accept");
#endif
@ -3479,7 +3479,7 @@ retry:
TORRENT_ASSERT(p-&gt;is_disconnecting());
if (!p-&gt;is_choked() &amp;&amp; !p-&gt;ignore_unchoke_slots()) --m_num_unchoked;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(70)">../src/session_impl.cpp:3603</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="70" 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:3603</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(70)">../src/session_impl.cpp:3600</a></td><td>have a separate list for these connections, instead of having to loop through all of them</td></tr><tr id="70" 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:3600</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);
@ -3530,7 +3530,7 @@ retry:
#ifndef TORRENT_DISABLE_DHT
if (m_dht)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(71)">../src/session_impl.cpp:3644</a></td><td>this should apply to all bandwidth channels</td></tr><tr id="71" style="display: none;" colspan="3"><td colspan="3"><h2>this should apply to all bandwidth channels</h2><h4>../src/session_impl.cpp:3644</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t.second_tick(tick_interval_ms, m_tick_residual / 1000);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(71)">../src/session_impl.cpp:3641</a></td><td>this should apply to all bandwidth channels</td></tr><tr id="71" style="display: none;" colspan="3"><td colspan="3"><h2>this should apply to all bandwidth channels</h2><h4>../src/session_impl.cpp:3641</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t.second_tick(tick_interval_ms, m_tick_residual / 1000);
// if the call to second_tick caused the torrent
// to no longer want to be ticked (i.e. it was
@ -3581,7 +3581,7 @@ retry:
&amp;&amp; m_stat.upload_ip_overhead() &gt;= up_limit
&amp;&amp; m_alerts.should_post&lt;performance_alert&gt;())
{
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(72)">../src/session_impl.cpp:4707</a></td><td>these vectors could be copied from m_torrent_lists, if we would maintain them. That way the first pass over all torrents could be avoided. It would be especially efficient if most torrents are not auto-managed whenever we receive a scrape response (or anything that may change the rank of a torrent) that one torrent could re-sort itself in a list that's kept sorted at all times. That way, this pass over all torrents could be avoided alltogether.</td></tr><tr id="72" style="display: none;" colspan="3"><td colspan="3"><h2>these vectors could be copied from m_torrent_lists,
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(72)">../src/session_impl.cpp:4704</a></td><td>these vectors could be copied from m_torrent_lists, if we would maintain them. That way the first pass over all torrents could be avoided. It would be especially efficient if most torrents are not auto-managed whenever we receive a scrape response (or anything that may change the rank of a torrent) that one torrent could re-sort itself in a list that's kept sorted at all times. That way, this pass over all torrents could be avoided alltogether.</td></tr><tr id="72" style="display: none;" colspan="3"><td colspan="3"><h2>these vectors could be copied from m_torrent_lists,
if we would maintain them. That way the first pass over
all torrents could be avoided. It would be especially
efficient if most torrents are not auto-managed
@ -3589,7 +3589,7 @@ whenever we receive a scrape response (or anything
that may change the rank of a torrent) that one torrent
could re-sort itself in a list that's kept sorted at all
times. That way, this pass over all torrents could be
avoided alltogether.</h2><h4>../src/session_impl.cpp:4707</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
avoided alltogether.</h2><h4>../src/session_impl.cpp:4704</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING
if (t-&gt;allows_peers())
t-&gt;log_to_all_peers("AUTO MANAGER PAUSING TORRENT");
#endif
@ -3640,7 +3640,7 @@ avoided alltogether.</h2><h4>../src/session_impl.cpp:4707</h4><pre style="backgr
for (torrent_map::iterator i = m_torrents.begin()
, end(m_torrents.end()); i != end; ++i)
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(73)">../src/session_impl.cpp:4782</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="73" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4782</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (t-&gt;is_finished())
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(73)">../src/session_impl.cpp:4779</a></td><td>allow extensions to sort torrents for queuing</td></tr><tr id="73" style="display: none;" colspan="3"><td colspan="3"><h2>allow extensions to sort torrents for queuing</h2><h4>../src/session_impl.cpp:4779</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (t-&gt;is_finished())
seeds.push_back(t);
else
downloaders.push_back(t);
@ -3691,9 +3691,9 @@ avoided alltogether.</h2><h4>../src/session_impl.cpp:4707</h4><pre style="backgr
, hard_limit, num_downloaders);
auto_manage_torrents(seeds, checking_limit, dht_limit, tracker_limit, lsd_limit
, hard_limit, num_seeds);
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(74)">../src/session_impl.cpp:4960</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="74" 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(74)">../src/session_impl.cpp:4957</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="74" 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:4960</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // if we don't have any free slots, return
connections</h2><h4>../src/session_impl.cpp:4957</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // if we don't have any free slots, return
if (free_slots &lt;= -m_half_open.limit()) return;
// boost connections are connections made by torrent connection
@ -3744,8 +3744,8 @@ connections</h2><h4>../src/session_impl.cpp:4960</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(75)">../src/session_impl.cpp:5122</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><tr id="75" 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:5122</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(75)">../src/session_impl.cpp:5119</a></td><td>post a message to have this happen immediately instead of waiting for the next tick</td></tr><tr id="75" 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:5119</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
// we've unchoked this peer, and it hasn't reciprocated
// we may want to increase our estimated reciprocation rate
p-&gt;increase_est_reciprocation_rate();
@ -3796,7 +3796,7 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
prev = i;
}
#endif
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(76)">../src/session_impl.cpp:5156</a></td><td>make configurable</td></tr><tr id="76" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:5156</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(76)">../src/session_impl.cpp:5153</a></td><td>make configurable</td></tr><tr id="76" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:5153</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
#ifdef TORRENT_DEBUG
for (std::vector&lt;peer_connection*&gt;::const_iterator i = peers.begin()
, end(peers.end()), prev(peers.end()); i != end; ++i)
@ -3829,7 +3829,7 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
++m_allowed_upload_slots;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(77)">../src/session_impl.cpp:5170</a></td><td>make configurable</td></tr><tr id="77" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:5170</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> &gt;= (*i)-&gt;uploaded_in_last_round() * 1000
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(77)">../src/session_impl.cpp:5167</a></td><td>make configurable</td></tr><tr id="77" style="display: none;" colspan="3"><td colspan="3"><h2>make configurable</h2><h4>../src/session_impl.cpp:5167</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> &gt;= (*i)-&gt;uploaded_in_last_round() * 1000
* (1 + t2-&gt;priority()) / total_milliseconds(unchoke_interval));
}
prev = i;
@ -3880,7 +3880,7 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
{
// if our current upload rate is less than 90% of our
// limit
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(78)">../src/session_impl.cpp:5249</a></td><td>this should be called for all peers!</td></tr><tr id="78" style="display: none;" colspan="3"><td colspan="3"><h2>this should be called for all peers!</h2><h4>../src/session_impl.cpp:5249</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // measurement of the peak, use that + 10kB/s, otherwise
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(78)">../src/session_impl.cpp:5246</a></td><td>this should be called for all peers!</td></tr><tr id="78" style="display: none;" colspan="3"><td colspan="3"><h2>this should be called for all peers!</h2><h4>../src/session_impl.cpp:5246</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // measurement of the peak, use that + 10kB/s, otherwise
// assume 20 kB/s
upload_capacity_left = (std::max)(20000, m_peak_up_rate + 10000);
if (m_alerts.should_post&lt;performance_alert&gt;())
@ -3931,10 +3931,10 @@ immediately instead of waiting for the next tick</h2><h4>../src/session_impl.cpp
--unchoke_set_size;
++m_num_unchoked;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(79)">../src/session_impl.cpp:5666</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</td></tr><tr id="79" 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(79)">../src/session_impl.cpp:5663</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</td></tr><tr id="79" 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</h2><h4>../src/session_impl.cpp:5666</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;status(&amp;*i, flags);
pushed back</h2><h4>../src/session_impl.cpp:5663</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> t-&gt;status(&amp;*i, flags);
}
}
@ -4729,9 +4729,9 @@ using file_base</h2><h4>../src/torrent.cpp:6837</h4><pre style="background: #f6f
, end(m_policy-&gt;end_peer()); i != end; ++i)
{
error_code ec;
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(94)">../src/torrent.cpp:8751</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="94" 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(94)">../src/torrent.cpp:8765</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="94" 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:8751</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:8765</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_complete != 0xffffff) seeds = m_complete;
else seeds = m_policy ? m_policy-&gt;num_seeds() : 0;
if (m_incomplete != 0xffffff) downloaders = m_incomplete;
@ -4782,10 +4782,10 @@ just to save an empty resume data file</h2><h4>../src/torrent.cpp:8751</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(95)">../src/torrent.cpp:9694</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="95" 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&nbsp;0</td><td><a href="javascript:expand(95)">../src/torrent.cpp:9708</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="95" style="display: none;" colspan="3"><td colspan="3"><h2>go through the pieces we have and count the total number
of downloaders we have. Only count peers that are interested in us
since some peers might not send have messages for pieces we have
it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:9694</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:9708</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
rarest_pieces.clear();
rarest_rarity = pp.peer_count;
@ -4836,8 +4836,8 @@ it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:9
if (num_cache_pieces &gt; m_torrent_file-&gt;num_pieces())
num_cache_pieces = m_torrent_file-&gt;num_pieces();
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(96)">../src/torrent.cpp:10340</a></td><td>instead of resorting the whole list, insert the peers directly into the right place</td></tr><tr id="96" 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:10340</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(96)">../src/torrent.cpp:10354</a></td><td>instead of resorting the whole list, insert the peers directly into the right place</td></tr><tr id="96" 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:10354</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> printf("timed out [average-piece-time: %d ms ]\n"
, m_average_piece_time);
#endif
}
@ -5146,7 +5146,7 @@ while this buffer is still in the peer's send buffer</h2><h4>../src/ut_metadata.
#ifdef TORRENT_VERBOSE_LOGGING
m_pc.peer_log("&lt;== UT_METADATA [ not a dictionary ]");
#endif
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(102)">../src/utp_stream.cpp:1621</a></td><td>this loop may not be very efficient</td></tr><tr id="102" style="display: none;" colspan="3"><td colspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1621</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(102)">../src/utp_stream.cpp:1627</a></td><td>this loop may not be very efficient</td></tr><tr id="102" style="display: none;" colspan="3"><td colspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1627</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
char* m_buf;
};
@ -5662,8 +5662,8 @@ outlive their peers</h2><h4>../include/libtorrent/peer_connection.hpp:217</h4><p
// pick a piece to download, we could only find
// blocks that were already requested from other
// peers. In this case, we should not try to pick
</pre></td></tr><tr style="background: #ccc"><td>relevance&nbsp;0</td><td><a href="javascript:expand(112)">../include/libtorrent/peer_connection.hpp:1145</a></td><td>factor this out into its own class with a virtual interface torrent and session should implement this interface</td></tr><tr id="112" style="display: none;" colspan="3"><td colspan="3"><h2>factor this out into its own class with a virtual interface
torrent and session should implement this interface</h2><h4>../include/libtorrent/peer_connection.hpp:1145</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(112)">../include/libtorrent/peer_connection.hpp:1141</a></td><td>factor this out into its own class with a virtual interface torrent and session should implement this interface</td></tr><tr id="112" style="display: none;" colspan="3"><td colspan="3"><h2>factor this out into its own class with a virtual interface
torrent and session should implement this interface</h2><h4>../include/libtorrent/peer_connection.hpp:1141</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
// the local endpoint for this peer, i.e. our address
// and our port. If this is set for outgoing connections
// before the connection completes, it means we want to

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>libtorrent manual</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="libtorrent-manual">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>libtorrent manual</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="libtorrent-manual">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>Bittorrent udp-tracker protocol extension</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="bittorrent-udp-tracker-protocol-extension">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -6,8 +6,8 @@
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
<title>libtorrent manual</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
<link rel="stylesheet" type="text/css" href="base.css" />
<link rel="stylesheet" type="text/css" href="rst.css" />
<script type="text/javascript">
/* <![CDATA[ */
(function() {
@ -29,13 +29,6 @@
<body>
<div class="document" id="libtorrent-manual">
<div id="container">
<div id="headerNav">
<ul>
<li class="first"><a href="/">Home</a></li>
<li><a href="../../products.html">Products</a></li>
<li><a href="../../contact.html">Contact</a></li>
</ul>
</div>
<div id="header">
<div id="orange"></div>
<div id="logo"></div>

View File

@ -565,7 +565,7 @@ namespace libtorrent
{
// this peer is in end-game mode we only want
// one outstanding request
return m_endgame_mode ? 1: m_desired_queue_size;
return (m_endgame_mode || m_snubbed) ? 1 : m_desired_queue_size;
}
bool bittyrant_unchoke_compare(
@ -939,10 +939,6 @@ namespace libtorrent
// the start of the logical receive buffer
int m_recv_start:24;
// the number of request we should queue up
// at the remote end.
boost::uint8_t m_desired_queue_size;
// this is the limit on the number of outstanding requests
// we have to this peer. This is initialized to the settings
// in the session_settings structure. But it may be lowered
@ -1254,6 +1250,10 @@ namespace libtorrent
// us
int m_est_reciprocation_rate;
// the number of request we should queue up
// at the remote end.
boost::uint16_t m_desired_queue_size;
#ifndef TORRENT_DISABLE_RESOLVE_COUNTRIES
// in case the session settings is set
// to resolve countries, this is set to

View File

@ -133,7 +133,7 @@ variable to configure. See ``configure --help'' for reference.
# Check if you have distutils, else fail
#
AC_MSG_CHECKING([for the distutils Python package])
ac_distutils_result=`$PYTHON -c "import distutils" 2>&1`
ac_distutils_result=`$PYTHON -c "import distutils" >/dev/null 2>&1`
if test -z "$ac_distutils_result"; then
AC_MSG_RESULT([yes])
else

View File

@ -132,7 +132,6 @@ namespace libtorrent
, m_counters(*pack.stats_counters)
, m_num_pieces(0)
, m_recv_start(0)
, m_desired_queue_size(2)
, m_max_out_request_queue(m_settings.get_int(settings_pack::max_out_request_queue))
, m_remote(*pack.endp)
, m_disk_thread(*pack.disk_thread)
@ -174,6 +173,7 @@ namespace libtorrent
, m_outstanding_writing_bytes(0)
, m_download_rate_peak(0)
, m_upload_rate_peak(0)
, m_desired_queue_size(2)
, m_speed(slow)
, m_prefer_whole_pieces(0)
, m_disk_read_failures(0)