regenerated html

This commit is contained in:
Arvid Norberg 2009-03-21 04:36:46 +00:00
parent 1ed7e222f8
commit bff043da06
12 changed files with 541 additions and 346 deletions

View File

@ -3,7 +3,7 @@
<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.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: 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" />

View File

@ -3,7 +3,7 @@
<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.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
<title>client_test example program</title>
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />

View File

@ -3,7 +3,7 @@
<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.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: 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" />
@ -36,7 +36,7 @@
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>Arvid Norberg, <a class="last reference" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
<td>Arvid Norberg, <a class="last reference external" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
</tbody>
</table>
<div class="section" id="mainline-dht-extensions">

View File

@ -3,7 +3,7 @@
<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.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: 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" />
@ -36,16 +36,16 @@
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>Arvid Norberg, <a class="last reference" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
<td>Arvid Norberg, <a class="last reference external" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
</tbody>
</table>
<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of contents</p>
<ul class="simple">
<li><a class="reference" href="#examples" id="id2">examples</a><ul>
<li><a class="reference" href="#dump-torrent" id="id3">dump_torrent</a></li>
<li><a class="reference" href="#simple-client" id="id4">simple client</a></li>
<li><a class="reference" href="#make-torrent" id="id5">make_torrent</a></li>
<li><a class="reference internal" href="#examples" id="id2">examples</a><ul>
<li><a class="reference internal" href="#dump-torrent" id="id3">dump_torrent</a></li>
<li><a class="reference internal" href="#simple-client" id="id4">simple client</a></li>
<li><a class="reference internal" href="#make-torrent" id="id5">make_torrent</a></li>
</ul>
</li>
</ul>
@ -54,7 +54,7 @@
<h1>examples</h1>
<p>Except for the example programs in this manual, there's also a bigger example
of a (little bit) more complete client, <tt class="docutils literal"><span class="pre">client_test</span></tt>. There are separate
instructions for how to use it <a class="reference" href="client_test.html">here</a> if you'd like to try it. Note that building
instructions for how to use it <a class="reference external" href="client_test.html">here</a> if you'd like to try it. Note that building
<tt class="docutils literal"><span class="pre">client_test</span></tt> also requires boost.regex and boost.program_options library.</p>
<div class="section" id="dump-torrent">
<h2>dump_torrent</h2>

View File

@ -3,7 +3,7 @@
<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.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: 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" />
@ -36,8 +36,8 @@
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>Arvid Norberg, <a class="reference" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a>
Ludvig Strigeus, <a class="last reference" href="mailto:ludde&#64;utorrent.com">ludde&#64;utorrent.com</a></td></tr>
<td>Arvid Norberg, <a class="reference external" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a>
Ludvig Strigeus, <a class="last reference external" href="mailto:ludde&#64;utorrent.com">ludde&#64;utorrent.com</a></td></tr>
</tbody>
</table>
<div class="section" id="extension-protocol-for-bittorrent">

View File

@ -55,9 +55,10 @@
<li><a class="reference internal" href="#disk-caching" id="id8">disk caching</a></li>
<li><a class="reference internal" href="#network-buffers" id="id9">network buffers</a></li>
<li><a class="reference internal" href="#piece-picker" id="id10">piece picker</a></li>
<li><a class="reference internal" href="#merkle-hash-tree-torrents" id="id11">merkle hash tree torrents</a></li>
</ul>
</li>
<li><a class="reference internal" href="#portability" id="id11">portability</a></li>
<li><a class="reference internal" href="#portability" id="id12">portability</a></li>
</ul>
</div>
<div class="section" id="introduction">
@ -94,6 +95,8 @@ uTorrent interpretation).</li>
<li>super seeding/initial seeding (<a class="reference external" href="http://bittorrent.org/beps/bep_0016.html">BEP 16</a>).</li>
<li>private torrents (<a class="reference external" href="http://bittorrent.org/beps/bep_0027.html">BEP 27</a>).</li>
<li>support for IPv6, including <a class="reference external" href="http://bittorrent.org/beps/bep_0007.html">BEP 7</a> and <a class="reference external" href="http://bittorrent.org/beps/bep_0024.html">BEP 24</a>.</li>
<li>support for merkle hash tree torrents. This makes the size of torrent files
scale well with the size of the content.</li>
</ul>
</div>
<div class="section" id="disk-management">
@ -202,6 +205,32 @@ makes slow peers pick blocks from the same piece, and fast peers pick from the s
and hence decreasing the likelihood of slow peers blocking the completion of pieces.</p>
<p>The piece picker can also be set to download pieces in sequential order.</p>
</div>
<div class="section" id="merkle-hash-tree-torrents">
<h2>merkle hash tree torrents</h2>
<p>Merkle hash tree torrents is an extension that lets a torrent file only contain the
root hash of the hash tree forming the piece hashes. The main benefit of this feature
is that regardless of how many pieces there is in a torrent, the .torrent file will
always be the same size. It will only grow with the number of files (since it still
has to contain the file names).</p>
<p>With regular torrents, clients have to request multiple blocks for pieces, typically
from different peers, before the data can be verified against the piece hash. The
larger the pieces are, the longer it will take to download a complete piece and verify
it. Before the piece is verified, it cannot be shared with the swarm, which means the
larger piece sizes, the slower turnaround data has when it is downloaded by peers.
Since on average the data has to sit around, waiting, in client buffers before it has
been verified and can be uploaded again.</p>
<p>Another problem with large piece sizes is that it is harder for a client to pinpoint
the malicious or buggy peer when a piece fails, and it will take longer to re-download
it and take more tries before the piece succeeds the larger the pieces are.</p>
<p>The piece size in regular torrents is a tradeoff between the size of the .torrent file
itself and the piece size. Often, for files that are 4 GB, the piece size is 2 or 4 MB,
just to avoid making the .torrent file too big.</p>
<p>Merkle torrents solves these problems by removing the tradeoff between .torrent size and
piece size. With merkle torrents, the piece size can be the minimum block size (16 kB),
which lets peers verify every block of data received from peers, immediately. This
gives a minimum turnaround time and completely removes the problem of identifying malicious
peers.</p>
</div>
</div>
<div class="section" id="portability">
<h1>portability</h1>

View File

@ -3,7 +3,7 @@
<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.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: 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" />
@ -36,7 +36,7 @@
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>Arvid Norberg, <a class="last reference" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
<td>Arvid Norberg, <a class="last reference external" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
</tbody>
</table>
<div class="section" id="libtorrent-plugins">
@ -44,21 +44,21 @@
<div class="contents topic" id="contents">
<p class="topic-title first">Contents</p>
<ul class="simple">
<li><a class="reference" href="#libtorrent-plugins" id="id1">libtorrent plugins</a><ul>
<li><a class="reference" href="#a-word-of-caution" id="id2">a word of caution</a></li>
<li><a class="reference internal" href="#libtorrent-plugins" id="id1">libtorrent plugins</a><ul>
<li><a class="reference internal" href="#a-word-of-caution" id="id2">a word of caution</a></li>
</ul>
</li>
<li><a class="reference" href="#plugin-interface" id="id3">plugin interface</a></li>
<li><a class="reference" href="#torrent-plugin" id="id4">torrent_plugin</a><ul>
<li><a class="reference" href="#new-connection" id="id5">new_connection()</a></li>
<li><a class="reference" href="#on-piece-pass-on-piece-fail" id="id6">on_piece_pass() on_piece_fail()</a></li>
<li><a class="reference" href="#tick" id="id7">tick()</a></li>
<li><a class="reference" href="#on-pause-on-resume" id="id8">on_pause() on_resume()</a></li>
<li><a class="reference" href="#on-files-checked" id="id9">on_files_checked()</a></li>
<li><a class="reference internal" href="#plugin-interface" id="id3">plugin interface</a></li>
<li><a class="reference internal" href="#torrent-plugin" id="id4">torrent_plugin</a><ul>
<li><a class="reference internal" href="#new-connection" id="id5">new_connection()</a></li>
<li><a class="reference internal" href="#on-piece-pass-on-piece-fail" id="id6">on_piece_pass() on_piece_fail()</a></li>
<li><a class="reference internal" href="#tick" id="id7">tick()</a></li>
<li><a class="reference internal" href="#on-pause-on-resume" id="id8">on_pause() on_resume()</a></li>
<li><a class="reference internal" href="#on-files-checked" id="id9">on_files_checked()</a></li>
</ul>
</li>
<li><a class="reference" href="#peer-plugin" id="id10">peer_plugin</a></li>
<li><a class="reference" href="#disk-buffer-holder" id="id11">disk_buffer_holder</a></li>
<li><a class="reference internal" href="#peer-plugin" id="id10">peer_plugin</a></li>
<li><a class="reference internal" href="#disk-buffer-holder" id="id11">disk_buffer_holder</a></li>
</ul>
</div>
<p>libtorrent has a plugin interface for implementing extensions to the protocol.
@ -68,7 +68,7 @@ to fit a particular (closed) network.</p>
<p>In short, the plugin interface makes it possible to:</p>
<ul class="simple">
<li>register extension messages (sent in the extension handshake), see
<a class="reference" href="extension_protocol.html">extensions</a>.</li>
<a class="reference external" href="extension_protocol.html">extensions</a>.</li>
<li>add data and parse data from the extension handshake.</li>
<li>send extension messages and standard bittorrent messages.</li>
<li>override or block the handling of standard bittorrent messages.</li>
@ -85,7 +85,7 @@ thread, you cannot use any of the member functions on the internal structures
in libtorrent, since those require the mutex to be locked. Futhermore, you would
also need to have a mutex on your own shared data within the plugin, to make
sure it is not accessed at the same time from the libtorrent thread (through a
callback). See <a class="reference" href="http://www.boost.org/doc/html/mutex.html">boost thread's mutex</a>. If you need to send out a message from
callback). See <a class="reference external" href="http://www.boost.org/doc/html/mutex.html">boost thread's mutex</a>. If you need to send out a message from
another thread, use an internal queue, and do the actual sending in <tt class="docutils literal"><span class="pre">tick()</span></tt>.</p>
</div>
</div>

View File

@ -3,7 +3,7 @@
<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.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: http://docutils.sourceforge.net/" />
<title>creating torrents</title>
<meta name="author" content="Arvid Norberg, arvid&#64;rasterbar.com" />
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
@ -36,30 +36,30 @@
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>Arvid Norberg, <a class="last reference" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
<td>Arvid Norberg, <a class="last reference external" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
</tbody>
</table>
<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of contents</p>
<ul class="simple">
<li><a class="reference" href="#overview" id="id2">overview</a></li>
<li><a class="reference" href="#high-level-example" id="id3">high level example</a></li>
<li><a class="reference" href="#add-files" id="id4">add_files</a></li>
<li><a class="reference" href="#set-piece-hashes" id="id5">set_piece_hashes()</a></li>
<li><a class="reference" href="#file-storage" id="id6">file_storage</a><ul>
<li><a class="reference" href="#add-file" id="id7">add_file()</a></li>
<li><a class="reference internal" href="#overview" id="id2">overview</a></li>
<li><a class="reference internal" href="#high-level-example" id="id3">high level example</a></li>
<li><a class="reference internal" href="#add-files" id="id4">add_files</a></li>
<li><a class="reference internal" href="#set-piece-hashes" id="id5">set_piece_hashes()</a></li>
<li><a class="reference internal" href="#file-storage" id="id6">file_storage</a><ul>
<li><a class="reference internal" href="#add-file" id="id7">add_file()</a></li>
</ul>
</li>
<li><a class="reference" href="#create-torrent" id="id8">create_torrent</a><ul>
<li><a class="reference" href="#id1" id="id9">create_torrent()</a></li>
<li><a class="reference" href="#generate" id="id10">generate()</a></li>
<li><a class="reference" href="#set-comment" id="id11">set_comment()</a></li>
<li><a class="reference" href="#set-creator" id="id12">set_creator()</a></li>
<li><a class="reference" href="#set-hash" id="id13">set_hash()</a></li>
<li><a class="reference" href="#add-url-seed" id="id14">add_url_seed()</a></li>
<li><a class="reference" href="#add-node" id="id15">add_node()</a></li>
<li><a class="reference" href="#add-tracker" id="id16">add_tracker()</a></li>
<li><a class="reference" href="#set-priv-priv" id="id17">set_priv() priv()</a></li>
<li><a class="reference internal" href="#create-torrent" id="id8">create_torrent</a><ul>
<li><a class="reference internal" href="#id1" id="id9">create_torrent()</a></li>
<li><a class="reference internal" href="#generate" id="id10">generate()</a></li>
<li><a class="reference internal" href="#set-comment" id="id11">set_comment()</a></li>
<li><a class="reference internal" href="#set-creator" id="id12">set_creator()</a></li>
<li><a class="reference internal" href="#set-hash" id="id13">set_hash()</a></li>
<li><a class="reference internal" href="#add-url-seed" id="id14">add_url_seed()</a></li>
<li><a class="reference internal" href="#add-node" id="id15">add_node()</a></li>
<li><a class="reference internal" href="#add-tracker" id="id16">add_tracker()</a></li>
<li><a class="reference internal" href="#set-priv-priv" id="id17">set_priv() priv()</a></li>
</ul>
</li>
</ul>
@ -142,9 +142,19 @@ template &lt;class Fun&gt;
void set_piece_hashes(create_torrent&amp; t, boost::filesystem::path const&amp; p, Fun f);
template &lt;class Fun&gt;
void set_piece_hashes(create_torrent&amp; t, boost::filesystem::wpath const&amp; p, Fun f);
template &lt;class Fun&gt;
void set_piece_hashes(create_torrent&amp; t, boost::filesystem::path const&amp; p, Fun f
, error_code&amp; ec);
template &lt;class Fun&gt;
void set_piece_hashes(create_torrent&amp; t, boost::filesystem::wpath const&amp; p, Fun f
, error_code&amp; ec);
void set_piece_hashes(create_torrent&amp; t, boost::filesystem::path const&amp; p);
void set_piece_hashes(create_torrent&amp; t, boost::filesystem::wpath const&amp; p);
void set_piece_hashes(create_torrent&amp; t, boost::filesystem::path const&amp; p
, error_code&amp; ec);
void set_piece_hashes(create_torrent&amp; t, boost::filesystem::wpath const&amp; p
, error_code&amp; ec);
</pre>
</blockquote>
<p>This function will assume that the files added to the torrent file exists at path
@ -154,6 +164,8 @@ must have the following signature:</p>
<pre class="literal-block">
void Fun(int);
</pre>
<p>The overloads that don't take an <tt class="docutils literal"><span class="pre">error_code&amp;</span></tt> may throw an exception in case of a
file error, the other overloads sets the error code to reflect the error, if any.</p>
</div>
<div class="section" id="file-storage">
<h1>file_storage</h1>
@ -234,7 +246,8 @@ attribute_executable
<pre class="literal-block">
struct create_torrent
{
create_torrent(file_storage&amp; fs, int piece_size = 0, int pad_size_limit = -1);
enum { optimize = 1, merkle = 2 };
create_torrent(file_storage&amp; fs, int piece_size = 0, int pad_size_limit = -1, int flags = optimize);
create_torrent(torrent_info const&amp; ti);
entry generate() const;
@ -259,7 +272,8 @@ struct create_torrent
<h2>create_torrent()</h2>
<blockquote>
<pre class="literal-block">
create_torrent(file_storage&amp; fs, int piece_size = 0, int pad_size_limit = -1);
enum { optimize = 1, merkle = 2 };
create_torrent(file_storage&amp; fs, int piece_size = 0, int pad_size_limit = -1, int flags = optimize);
create_torrent(torrent_info const&amp; ti);
</pre>
</blockquote>
@ -268,13 +282,27 @@ be a multiple of 16 kiB. If a piece size of 0 is specified, a
piece_size will becalculated such that the torrent file is roughly 40 kB.</p>
<p>If a <tt class="docutils literal"><span class="pre">pad_size_limit</span></tt> is specified (other than -1), any file larger than
the specified number of bytes will be preceeded by a pad file to align it
with the start od a piece.</p>
<p>The overlad that takes a <tt class="docutils literal"><span class="pre">torrent_info</span></tt> object will make a verbatim
with the start od a piece. The pad_file_limit is ignored unless the
<tt class="docutils literal"><span class="pre">optimize</span></tt> flag is passed.</p>
<p>The overload that takes a <tt class="docutils literal"><span class="pre">torrent_info</span></tt> object will make a verbatim
copy of its info dictionary (to preserve the info-hash). The copy of
the info dictionary will be used by <tt class="docutils literal"><span class="pre">generate()</span></tt>. This means
that none of the member functions of create_torrent that affects
the content of the info dictionary (such as <tt class="docutils literal"><span class="pre">set_hash()</span></tt>), will
have any affect.</p>
<p>The <tt class="docutils literal"><span class="pre">flags</span></tt> arguments specifies options for the torrent creation. It can
be any combination of the following flags:</p>
<dl class="docutils">
<dt>optimize</dt>
<dd>This will insert pad files to align the files to piece boundaries, for
optimized disk-I/O.</dd>
<dt>merkle</dt>
<dd>This will create a merkle hash tree torrent. A merkle torrent cannot
be opened in clients that don't specifically support merkle torrents.
The benefit is that the resulting torrent file will be much smaller and
not grow with more pieces. When this option is specified, it is
recommended to have a 16 kiB piece size.</dd>
</dl>
</div>
<div class="section" id="generate">
<h2>generate()</h2>
@ -318,7 +346,7 @@ void set_hash(int index, sha1_hash const&amp; h);
<p>This sets the SHA-1 hash for the specified piece (<tt class="docutils literal"><span class="pre">index</span></tt>). You are required
to set the hash for every piece in the torrent before generating it. If you have
the files on disk, you can use the high level convenience function to do this.
See <a class="reference" href="#set-piece-hashes">set_piece_hashes()</a>.</p>
See <a class="reference internal" href="#set-piece-hashes">set_piece_hashes()</a>.</p>
</div>
<div class="section" id="add-url-seed">
<h2>add_url_seed()</h2>
@ -353,7 +381,7 @@ void add_tracker(std::string const&amp; url, int tier = 0);
</pre>
</blockquote>
<p>Adds a tracker to the torrent. This is not strictly required, but most torrents
use a tracker as their main source of peers. The url should be an <a class="reference" href="http://">http://</a> or udp://
use a tracker as their main source of peers. The url should be an <a class="reference external" href="http://">http://</a> or udp://
url to a machine running a bittorrent tracker that accepts announces for this torrent's
info-hash. The tier is the fallback priority of the tracker. All trackers with tier 0 are
tried first (in any order). If all fail, trackers with tier 1 are tried. If all of those

View File

@ -44,222 +44,220 @@
<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of contents</p>
<ul class="simple">
<li><a class="reference internal" href="#overview" id="id16">overview</a></li>
<li><a class="reference internal" href="#network-primitives" id="id17">network primitives</a></li>
<li><a class="reference internal" href="#session" id="id18">session</a><ul>
<li><a class="reference internal" href="#id1" id="id19">session()</a></li>
<li><a class="reference internal" href="#id2" id="id20">~session()</a></li>
<li><a class="reference internal" href="#pause-resume-is-paused" id="id21">pause() resume() is_paused()</a></li>
<li><a class="reference internal" href="#abort" id="id22">abort()</a></li>
<li><a class="reference internal" href="#add-torrent" id="id23">add_torrent()</a></li>
<li><a class="reference internal" href="#remove-torrent" id="id24">remove_torrent()</a></li>
<li><a class="reference internal" href="#find-torrent-get-torrents" id="id25">find_torrent() get_torrents()</a></li>
<li><a class="reference internal" href="#set-upload-rate-limit-set-download-rate-limit-upload-rate-limit-download-rate-limit" id="id26">set_upload_rate_limit() set_download_rate_limit() upload_rate_limit() download_rate_limit()</a></li>
<li><a class="reference internal" href="#set-max-uploads-set-max-connections-max-connections" id="id27">set_max_uploads() set_max_connections() max_connections()</a></li>
<li><a class="reference internal" href="#num-uploads-num-connections" id="id28">num_uploads() num_connections()</a></li>
<li><a class="reference internal" href="#set-max-half-open-connections-max-half-open-connections" id="id29">set_max_half_open_connections() max_half_open_connections()</a></li>
<li><a class="reference internal" href="#load-asnum-db-load-country-db-int-as-for-ip" id="id30">load_asnum_db() load_country_db() int as_for_ip()</a></li>
<li><a class="reference internal" href="#load-state-state" id="id31">load_state() state()</a></li>
<li><a class="reference internal" href="#set-ip-filter" id="id32">set_ip_filter()</a></li>
<li><a class="reference internal" href="#status" id="id33">status()</a></li>
<li><a class="reference internal" href="#get-cache-status" id="id34">get_cache_status()</a></li>
<li><a class="reference internal" href="#get-cache-info" id="id35">get_cache_info()</a></li>
<li><a class="reference internal" href="#is-listening-listen-port-listen-on" id="id36">is_listening() listen_port() listen_on()</a></li>
<li><a class="reference internal" href="#set-alert-mask" id="id37">set_alert_mask()</a></li>
<li><a class="reference internal" href="#pop-alert-wait-for-alert-set-alert-queue-size-limit" id="id38">pop_alert() wait_for_alert() set_alert_queue_size_limit()</a></li>
<li><a class="reference internal" href="#add-extension" id="id39">add_extension()</a></li>
<li><a class="reference internal" href="#set-settings-set-pe-settings" id="id40">set_settings() set_pe_settings()</a></li>
<li><a class="reference internal" href="#set-peer-proxy-set-web-seed-proxy-set-tracker-proxy-set-dht-proxy" id="id41">set_peer_proxy() set_web_seed_proxy() set_tracker_proxy() set_dht_proxy()</a></li>
<li><a class="reference internal" href="#peer-proxy-web-seed-proxy-tracker-proxy-dht-proxy" id="id42">peer_proxy() web_seed_proxy() tracker_proxy() dht_proxy()</a></li>
<li><a class="reference internal" href="#start-dht-stop-dht-set-dht-settings-dht-state" id="id43">start_dht() stop_dht() set_dht_settings() dht_state()</a></li>
<li><a class="reference internal" href="#add-dht-node-add-dht-router" id="id44">add_dht_node() add_dht_router()</a></li>
<li><a class="reference internal" href="#start-lsd-stop-lsd" id="id45">start_lsd() stop_lsd()</a></li>
<li><a class="reference internal" href="#start-upnp-stop-upnp" id="id46">start_upnp() stop_upnp()</a></li>
<li><a class="reference internal" href="#start-natpmp-stop-natpmp" id="id47">start_natpmp() stop_natpmp()</a></li>
<li><a class="reference internal" href="#overview" id="id17">overview</a></li>
<li><a class="reference internal" href="#network-primitives" id="id18">network primitives</a></li>
<li><a class="reference internal" href="#session" id="id19">session</a><ul>
<li><a class="reference internal" href="#id1" id="id20">session()</a></li>
<li><a class="reference internal" href="#id2" id="id21">~session()</a></li>
<li><a class="reference internal" href="#pause-resume-is-paused" id="id22">pause() resume() is_paused()</a></li>
<li><a class="reference internal" href="#abort" id="id23">abort()</a></li>
<li><a class="reference internal" href="#add-torrent" id="id24">add_torrent()</a></li>
<li><a class="reference internal" href="#remove-torrent" id="id25">remove_torrent()</a></li>
<li><a class="reference internal" href="#find-torrent-get-torrents" id="id26">find_torrent() get_torrents()</a></li>
<li><a class="reference internal" href="#set-upload-rate-limit-set-download-rate-limit-upload-rate-limit-download-rate-limit" id="id27">set_upload_rate_limit() set_download_rate_limit() upload_rate_limit() download_rate_limit()</a></li>
<li><a class="reference internal" href="#set-max-uploads-set-max-connections-max-connections" id="id28">set_max_uploads() set_max_connections() max_connections()</a></li>
<li><a class="reference internal" href="#num-uploads-num-connections" id="id29">num_uploads() num_connections()</a></li>
<li><a class="reference internal" href="#set-max-half-open-connections-max-half-open-connections" id="id30">set_max_half_open_connections() max_half_open_connections()</a></li>
<li><a class="reference internal" href="#load-asnum-db-load-country-db-int-as-for-ip" id="id31">load_asnum_db() load_country_db() int as_for_ip()</a></li>
<li><a class="reference internal" href="#load-state-state" id="id32">load_state() state()</a></li>
<li><a class="reference internal" href="#set-ip-filter" id="id33">set_ip_filter()</a></li>
<li><a class="reference internal" href="#status" id="id34">status()</a></li>
<li><a class="reference internal" href="#get-cache-status" id="id35">get_cache_status()</a></li>
<li><a class="reference internal" href="#get-cache-info" id="id36">get_cache_info()</a></li>
<li><a class="reference internal" href="#is-listening-listen-port-listen-on" id="id37">is_listening() listen_port() listen_on()</a></li>
<li><a class="reference internal" href="#set-alert-mask" id="id38">set_alert_mask()</a></li>
<li><a class="reference internal" href="#pop-alert-wait-for-alert-set-alert-queue-size-limit" id="id39">pop_alert() wait_for_alert() set_alert_queue_size_limit()</a></li>
<li><a class="reference internal" href="#add-extension" id="id40">add_extension()</a></li>
<li><a class="reference internal" href="#set-settings-set-pe-settings" id="id41">set_settings() set_pe_settings()</a></li>
<li><a class="reference internal" href="#set-peer-proxy-set-web-seed-proxy-set-tracker-proxy-set-dht-proxy" id="id42">set_peer_proxy() set_web_seed_proxy() set_tracker_proxy() set_dht_proxy()</a></li>
<li><a class="reference internal" href="#peer-proxy-web-seed-proxy-tracker-proxy-dht-proxy" id="id43">peer_proxy() web_seed_proxy() tracker_proxy() dht_proxy()</a></li>
<li><a class="reference internal" href="#start-dht-stop-dht-set-dht-settings-dht-state" id="id44">start_dht() stop_dht() set_dht_settings() dht_state()</a></li>
<li><a class="reference internal" href="#add-dht-node-add-dht-router" id="id45">add_dht_node() add_dht_router()</a></li>
<li><a class="reference internal" href="#start-lsd-stop-lsd" id="id46">start_lsd() stop_lsd()</a></li>
<li><a class="reference internal" href="#start-upnp-stop-upnp" id="id47">start_upnp() stop_upnp()</a></li>
<li><a class="reference internal" href="#start-natpmp-stop-natpmp" id="id48">start_natpmp() stop_natpmp()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#entry" id="id48">entry</a><ul>
<li><a class="reference internal" href="#integer-string-list-dict-type" id="id49">integer() string() list() dict() type()</a></li>
<li><a class="reference internal" href="#operator" id="id50">operator[]</a></li>
<li><a class="reference internal" href="#find-key" id="id51">find_key()</a></li>
<li><a class="reference internal" href="#entry" id="id49">entry</a><ul>
<li><a class="reference internal" href="#integer-string-list-dict-type" id="id50">integer() string() list() dict() type()</a></li>
<li><a class="reference internal" href="#operator" id="id51">operator[]</a></li>
<li><a class="reference internal" href="#find-key" id="id52">find_key()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#torrent-info" id="id52">torrent_info</a><ul>
<li><a class="reference internal" href="#id3" id="id53">torrent_info()</a></li>
<li><a class="reference internal" href="#add-tracker" id="id54">add_tracker()</a></li>
<li><a class="reference internal" href="#files-orig-files" id="id55">files() orig_files()</a></li>
<li><a class="reference internal" href="#begin-files-end-files-rbegin-files-rend-files" id="id56">begin_files() end_files() rbegin_files() rend_files()</a></li>
<li><a class="reference internal" href="#num-files-file-at" id="id57">num_files() file_at()</a></li>
<li><a class="reference internal" href="#map-block" id="id58">map_block()</a></li>
<li><a class="reference internal" href="#map-file" id="id59">map_file()</a></li>
<li><a class="reference internal" href="#url-seeds-add-url-seed-http-seeds-add-http-seed" id="id60">url_seeds() add_url_seed() http_seeds() add_http_seed()</a></li>
<li><a class="reference internal" href="#trackers" id="id61">trackers()</a></li>
<li><a class="reference internal" href="#total-size-piece-length-piece-size-num-pieces" id="id62">total_size() piece_length() piece_size() num_pieces()</a></li>
<li><a class="reference internal" href="#hash-for-piece-hash-for-piece-ptr-info-hash" id="id63">hash_for_piece() hash_for_piece_ptr() info_hash()</a></li>
<li><a class="reference internal" href="#name-comment-creation-date-creator" id="id64">name() comment() creation_date() creator()</a></li>
<li><a class="reference internal" href="#priv" id="id65">priv()</a></li>
<li><a class="reference internal" href="#nodes" id="id66">nodes()</a></li>
<li><a class="reference internal" href="#add-node" id="id67">add_node()</a></li>
<li><a class="reference internal" href="#metadata-metadata-size" id="id68">metadata() metadata_size()</a></li>
<li><a class="reference internal" href="#torrent-info" id="id53">torrent_info</a><ul>
<li><a class="reference internal" href="#id3" id="id54">torrent_info()</a></li>
<li><a class="reference internal" href="#add-tracker" id="id55">add_tracker()</a></li>
<li><a class="reference internal" href="#files-orig-files" id="id56">files() orig_files()</a></li>
<li><a class="reference internal" href="#rename-file" id="id57">rename_file()</a></li>
<li><a class="reference internal" href="#begin-files-end-files-rbegin-files-rend-files" id="id58">begin_files() end_files() rbegin_files() rend_files()</a></li>
<li><a class="reference internal" href="#num-files-file-at" id="id59">num_files() file_at()</a></li>
<li><a class="reference internal" href="#map-block" id="id60">map_block()</a></li>
<li><a class="reference internal" href="#map-file" id="id61">map_file()</a></li>
<li><a class="reference internal" href="#url-seeds-add-url-seed-http-seeds-add-http-seed" id="id62">url_seeds() add_url_seed() http_seeds() add_http_seed()</a></li>
<li><a class="reference internal" href="#trackers" id="id63">trackers()</a></li>
<li><a class="reference internal" href="#total-size-piece-length-piece-size-num-pieces" id="id64">total_size() piece_length() piece_size() num_pieces()</a></li>
<li><a class="reference internal" href="#hash-for-piece-hash-for-piece-ptr-info-hash" id="id65">hash_for_piece() hash_for_piece_ptr() info_hash()</a></li>
<li><a class="reference internal" href="#name-comment-creation-date-creator" id="id66">name() comment() creation_date() creator()</a></li>
<li><a class="reference internal" href="#priv" id="id67">priv()</a></li>
<li><a class="reference internal" href="#nodes" id="id68">nodes()</a></li>
<li><a class="reference internal" href="#add-node" id="id69">add_node()</a></li>
<li><a class="reference internal" href="#metadata-metadata-size" id="id70">metadata() metadata_size()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#torrent-handle" id="id69">torrent_handle</a><ul>
<li><a class="reference internal" href="#piece-priority-prioritize-pieces-piece-priorities" id="id70">piece_priority() prioritize_pieces() piece_priorities()</a></li>
<li><a class="reference internal" href="#file-priority-prioritize-files-file-priorities" id="id71">file_priority() prioritize_files() file_priorities()</a></li>
<li><a class="reference internal" href="#file-progress" id="id72">file_progress()</a></li>
<li><a class="reference internal" href="#save-path" id="id73">save_path()</a></li>
<li><a class="reference internal" href="#move-storage" id="id74">move_storage()</a></li>
<li><a class="reference internal" href="#rename-file" id="id75">rename_file()</a></li>
<li><a class="reference internal" href="#get-storage-impl" id="id76">get_storage_impl()</a></li>
<li><a class="reference internal" href="#super-seeding" id="id77">super_seeding()</a></li>
<li><a class="reference internal" href="#add-piece" id="id78">add_piece()</a></li>
<li><a class="reference internal" href="#read-piece" id="id79">read_piece()</a></li>
<li><a class="reference internal" href="#force-reannounce" id="id80">force_reannounce()</a></li>
<li><a class="reference internal" href="#scrape-tracker" id="id81">scrape_tracker()</a></li>
<li><a class="reference internal" href="#connect-peer" id="id82">connect_peer()</a></li>
<li><a class="reference internal" href="#name" id="id83">name()</a></li>
<li><a class="reference internal" href="#set-ratio" id="id84">set_ratio()</a></li>
<li><a class="reference internal" href="#set-upload-limit-set-download-limit-upload-limit-download-limit" id="id85">set_upload_limit() set_download_limit() upload_limit() download_limit()</a></li>
<li><a class="reference internal" href="#set-sequential-download-is-sequential-download" id="id86">set_sequential_download() is_sequential_download()</a></li>
<li><a class="reference internal" href="#set-peer-upload-limit-set-peer-download-limit" id="id87">set_peer_upload_limit() set_peer_download_limit()</a></li>
<li><a class="reference internal" href="#id5" id="id88">pause() resume() is_paused()</a></li>
<li><a class="reference internal" href="#force-recheck" id="id89">force_recheck()</a></li>
<li><a class="reference internal" href="#clear-error" id="id90">clear_error()</a></li>
<li><a class="reference internal" href="#resolve-countries" id="id91">resolve_countries()</a></li>
<li><a class="reference internal" href="#is-seed" id="id92">is_seed()</a></li>
<li><a class="reference internal" href="#is-auto-managed-auto-managed" id="id93">is_auto_managed() auto_managed()</a></li>
<li><a class="reference internal" href="#has-metadata-set-metadata" id="id94">has_metadata() set_metadata()</a></li>
<li><a class="reference internal" href="#set-tracker-login" id="id95">set_tracker_login()</a></li>
<li><a class="reference internal" href="#trackers-replace-trackers-add-tracker" id="id96">trackers() replace_trackers() add_tracker()</a></li>
<li><a class="reference internal" href="#add-url-seed-remove-url-seed-url-seeds" id="id97">add_url_seed() remove_url_seed() url_seeds()</a></li>
<li><a class="reference internal" href="#add-http-seed-remove-http-seed-http-seeds" id="id98">add_http_seed() remove_http_seed() http_seeds()</a></li>
<li><a class="reference internal" href="#queue-position-queue-position-up-queue-position-down-queue-position-top-queue-position-bottom" id="id99">queue_position() queue_position_up() queue_position_down() queue_position_top() queue_position_bottom()</a></li>
<li><a class="reference internal" href="#use-interface" id="id100">use_interface()</a></li>
<li><a class="reference internal" href="#info-hash" id="id101">info_hash()</a></li>
<li><a class="reference internal" href="#id6" id="id102">set_max_uploads() set_max_connections() max_connections()</a></li>
<li><a class="reference internal" href="#save-resume-data" id="id103">save_resume_data()</a></li>
<li><a class="reference internal" href="#id7" id="id104">status()</a></li>
<li><a class="reference internal" href="#get-download-queue" id="id105">get_download_queue()</a></li>
<li><a class="reference internal" href="#get-peer-info" id="id106">get_peer_info()</a></li>
<li><a class="reference internal" href="#get-torrent-info" id="id107">get_torrent_info()</a></li>
<li><a class="reference internal" href="#is-valid" id="id108">is_valid()</a></li>
<li><a class="reference internal" href="#torrent-handle" id="id71">torrent_handle</a><ul>
<li><a class="reference internal" href="#set-piece-deadline" id="id72">set_piece_deadline()</a></li>
<li><a class="reference internal" href="#piece-priority-prioritize-pieces-piece-priorities" id="id73">piece_priority() prioritize_pieces() piece_priorities()</a></li>
<li><a class="reference internal" href="#file-priority-prioritize-files-file-priorities" id="id74">file_priority() prioritize_files() file_priorities()</a></li>
<li><a class="reference internal" href="#file-progress" id="id75">file_progress()</a></li>
<li><a class="reference internal" href="#save-path" id="id76">save_path()</a></li>
<li><a class="reference internal" href="#move-storage" id="id77">move_storage()</a></li>
<li><a class="reference internal" href="#id5" id="id78">rename_file()</a></li>
<li><a class="reference internal" href="#get-storage-impl" id="id79">get_storage_impl()</a></li>
<li><a class="reference internal" href="#super-seeding" id="id80">super_seeding()</a></li>
<li><a class="reference internal" href="#add-piece" id="id81">add_piece()</a></li>
<li><a class="reference internal" href="#read-piece" id="id82">read_piece()</a></li>
<li><a class="reference internal" href="#force-reannounce" id="id83">force_reannounce()</a></li>
<li><a class="reference internal" href="#scrape-tracker" id="id84">scrape_tracker()</a></li>
<li><a class="reference internal" href="#connect-peer" id="id85">connect_peer()</a></li>
<li><a class="reference internal" href="#name" id="id86">name()</a></li>
<li><a class="reference internal" href="#set-ratio" id="id87">set_ratio()</a></li>
<li><a class="reference internal" href="#set-upload-limit-set-download-limit-upload-limit-download-limit" id="id88">set_upload_limit() set_download_limit() upload_limit() download_limit()</a></li>
<li><a class="reference internal" href="#set-sequential-download-is-sequential-download" id="id89">set_sequential_download() is_sequential_download()</a></li>
<li><a class="reference internal" href="#set-peer-upload-limit-set-peer-download-limit" id="id90">set_peer_upload_limit() set_peer_download_limit()</a></li>
<li><a class="reference internal" href="#id6" id="id91">pause() resume() is_paused()</a></li>
<li><a class="reference internal" href="#force-recheck" id="id92">force_recheck()</a></li>
<li><a class="reference internal" href="#clear-error" id="id93">clear_error()</a></li>
<li><a class="reference internal" href="#resolve-countries" id="id94">resolve_countries()</a></li>
<li><a class="reference internal" href="#is-seed" id="id95">is_seed()</a></li>
<li><a class="reference internal" href="#is-auto-managed-auto-managed" id="id96">is_auto_managed() auto_managed()</a></li>
<li><a class="reference internal" href="#has-metadata-set-metadata" id="id97">has_metadata() set_metadata()</a></li>
<li><a class="reference internal" href="#set-tracker-login" id="id98">set_tracker_login()</a></li>
<li><a class="reference internal" href="#trackers-replace-trackers-add-tracker" id="id99">trackers() replace_trackers() add_tracker()</a></li>
<li><a class="reference internal" href="#add-url-seed-remove-url-seed-url-seeds" id="id100">add_url_seed() remove_url_seed() url_seeds()</a></li>
<li><a class="reference internal" href="#add-http-seed-remove-http-seed-http-seeds" id="id101">add_http_seed() remove_http_seed() http_seeds()</a></li>
<li><a class="reference internal" href="#queue-position-queue-position-up-queue-position-down-queue-position-top-queue-position-bottom" id="id102">queue_position() queue_position_up() queue_position_down() queue_position_top() queue_position_bottom()</a></li>
<li><a class="reference internal" href="#use-interface" id="id103">use_interface()</a></li>
<li><a class="reference internal" href="#info-hash" id="id104">info_hash()</a></li>
<li><a class="reference internal" href="#id7" id="id105">set_max_uploads() set_max_connections() max_connections()</a></li>
<li><a class="reference internal" href="#save-resume-data" id="id106">save_resume_data()</a></li>
<li><a class="reference internal" href="#id8" id="id107">status()</a></li>
<li><a class="reference internal" href="#get-download-queue" id="id108">get_download_queue()</a></li>
<li><a class="reference internal" href="#get-peer-info" id="id109">get_peer_info()</a></li>
<li><a class="reference internal" href="#get-torrent-info" id="id110">get_torrent_info()</a></li>
<li><a class="reference internal" href="#is-valid" id="id111">is_valid()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#torrent-status" id="id109">torrent_status</a></li>
<li><a class="reference internal" href="#peer-info" id="id110">peer_info</a></li>
<li><a class="reference internal" href="#session-settings" id="id111">session_settings</a></li>
<li><a class="reference internal" href="#pe-settings" id="id112">pe_settings</a></li>
<li><a class="reference internal" href="#proxy-settings" id="id113">proxy_settings</a></li>
<li><a class="reference internal" href="#ip-filter" id="id114">ip_filter</a><ul>
<li><a class="reference internal" href="#id10" id="id115">ip_filter()</a></li>
<li><a class="reference internal" href="#add-rule" id="id116">add_rule()</a></li>
<li><a class="reference internal" href="#access" id="id117">access()</a></li>
<li><a class="reference internal" href="#export-filter" id="id118">export_filter()</a></li>
<li><a class="reference internal" href="#torrent-status" id="id112">torrent_status</a></li>
<li><a class="reference internal" href="#peer-info" id="id113">peer_info</a></li>
<li><a class="reference internal" href="#session-settings" id="id114">session_settings</a></li>
<li><a class="reference internal" href="#pe-settings" id="id115">pe_settings</a></li>
<li><a class="reference internal" href="#proxy-settings" id="id116">proxy_settings</a></li>
<li><a class="reference internal" href="#ip-filter" id="id117">ip_filter</a><ul>
<li><a class="reference internal" href="#id11" id="id118">ip_filter()</a></li>
<li><a class="reference internal" href="#add-rule" id="id119">add_rule()</a></li>
<li><a class="reference internal" href="#access" id="id120">access()</a></li>
<li><a class="reference internal" href="#export-filter" id="id121">export_filter()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#big-number" id="id119">big_number</a></li>
<li><a class="reference internal" href="#bitfield" id="id120">bitfield</a></li>
<li><a class="reference internal" href="#hasher" id="id121">hasher</a></li>
<li><a class="reference internal" href="#fingerprint" id="id122">fingerprint</a></li>
<li><a class="reference internal" href="#upnp-and-nat-pmp" id="id123">UPnP and NAT-PMP</a><ul>
<li><a class="reference internal" href="#add-mapping" id="id124">add_mapping</a></li>
<li><a class="reference internal" href="#delete-mapping" id="id125">delete_mapping</a></li>
<li><a class="reference internal" href="#router-model" id="id126">router_model()</a></li>
<li><a class="reference internal" href="#big-number" id="id122">big_number</a></li>
<li><a class="reference internal" href="#bitfield" id="id123">bitfield</a></li>
<li><a class="reference internal" href="#hasher" id="id124">hasher</a></li>
<li><a class="reference internal" href="#fingerprint" id="id125">fingerprint</a></li>
<li><a class="reference internal" href="#upnp-and-nat-pmp" id="id126">UPnP and NAT-PMP</a><ul>
<li><a class="reference internal" href="#add-mapping" id="id127">add_mapping</a></li>
<li><a class="reference internal" href="#delete-mapping" id="id128">delete_mapping</a></li>
<li><a class="reference internal" href="#router-model" id="id129">router_model()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#free-functions" id="id127">free functions</a><ul>
<li><a class="reference internal" href="#identify-client" id="id128">identify_client()</a></li>
<li><a class="reference internal" href="#client-fingerprint" id="id129">client_fingerprint()</a></li>
<li><a class="reference internal" href="#bdecode-bencode" id="id130">bdecode() bencode()</a></li>
<li><a class="reference internal" href="#add-magnet-uri" id="id131">add_magnet_uri()</a></li>
<li><a class="reference internal" href="#make-magnet-uri" id="id132">make_magnet_uri()</a></li>
<li><a class="reference internal" href="#free-functions" id="id130">free functions</a><ul>
<li><a class="reference internal" href="#identify-client" id="id131">identify_client()</a></li>
<li><a class="reference internal" href="#client-fingerprint" id="id132">client_fingerprint()</a></li>
<li><a class="reference internal" href="#bdecode-bencode" id="id133">bdecode() bencode()</a></li>
<li><a class="reference internal" href="#add-magnet-uri" id="id134">add_magnet_uri()</a></li>
<li><a class="reference internal" href="#make-magnet-uri" id="id135">make_magnet_uri()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#alerts" id="id133">alerts</a><ul>
<li><a class="reference internal" href="#read-piece-alert" id="id134">read_piece_alert</a></li>
<li><a class="reference internal" href="#external-ip-alert" id="id135">external_ip_alert</a></li>
<li><a class="reference internal" href="#listen-failed-alert" id="id136">listen_failed_alert</a></li>
<li><a class="reference internal" href="#portmap-error-alert" id="id137">portmap_error_alert</a></li>
<li><a class="reference internal" href="#portmap-alert" id="id138">portmap_alert</a></li>
<li><a class="reference internal" href="#portmap-log-alert" id="id139">portmap_log_alert</a></li>
<li><a class="reference internal" href="#file-error-alert" id="id140">file_error_alert</a></li>
<li><a class="reference internal" href="#tracker-announce-alert" id="id141">tracker_announce_alert</a></li>
<li><a class="reference internal" href="#tracker-error-alert" id="id142">tracker_error_alert</a></li>
<li><a class="reference internal" href="#tracker-reply-alert" id="id143">tracker_reply_alert</a></li>
<li><a class="reference internal" href="#dht-reply-alert" id="id144">dht_reply_alert</a></li>
<li><a class="reference internal" href="#tracker-warning-alert" id="id145">tracker_warning_alert</a></li>
<li><a class="reference internal" href="#scrape-reply-alert" id="id146">scrape_reply_alert</a></li>
<li><a class="reference internal" href="#scrape-failed-alert" id="id147">scrape_failed_alert</a></li>
<li><a class="reference internal" href="#url-seed-alert" id="id148">url_seed_alert</a></li>
<li><a class="reference internal" href="#hash-failed-alert" id="id149">hash_failed_alert</a></li>
<li><a class="reference internal" href="#peer-ban-alert" id="id150">peer_ban_alert</a></li>
<li><a class="reference internal" href="#peer-error-alert" id="id151">peer_error_alert</a></li>
<li><a class="reference internal" href="#invalid-request-alert" id="id152">invalid_request_alert</a></li>
<li><a class="reference internal" href="#torrent-finished-alert" id="id153">torrent_finished_alert</a></li>
<li><a class="reference internal" href="#performance-alert" id="id154">performance_alert</a></li>
<li><a class="reference internal" href="#state-changed-alert" id="id155">state_changed_alert</a></li>
<li><a class="reference internal" href="#metadata-failed-alert" id="id156">metadata_failed_alert</a></li>
<li><a class="reference internal" href="#metadata-received-alert" id="id157">metadata_received_alert</a></li>
<li><a class="reference internal" href="#fastresume-rejected-alert" id="id158">fastresume_rejected_alert</a></li>
<li><a class="reference internal" href="#peer-blocked-alert" id="id159">peer_blocked_alert</a></li>
<li><a class="reference internal" href="#storage-moved-alert" id="id160">storage_moved_alert</a></li>
<li><a class="reference internal" href="#torrent-paused-alert" id="id161">torrent_paused_alert</a></li>
<li><a class="reference internal" href="#torrent-resumed-alert" id="id162">torrent_resumed_alert</a></li>
<li><a class="reference internal" href="#save-resume-data-alert" id="id163">save_resume_data_alert</a></li>
<li><a class="reference internal" href="#save-resume-data-failed-alert" id="id164">save_resume_data_failed_alert</a></li>
<li><a class="reference internal" href="#dht-announce-alert" id="id165">dht_announce_alert</a></li>
<li><a class="reference internal" href="#dht-get-peers-alert" id="id166">dht_get_peers_alert</a></li>
<li><a class="reference internal" href="#dispatcher" id="id167">dispatcher</a></li>
<li><a class="reference internal" href="#alerts" id="id136">alerts</a><ul>
<li><a class="reference internal" href="#read-piece-alert" id="id137">read_piece_alert</a></li>
<li><a class="reference internal" href="#external-ip-alert" id="id138">external_ip_alert</a></li>
<li><a class="reference internal" href="#listen-failed-alert" id="id139">listen_failed_alert</a></li>
<li><a class="reference internal" href="#portmap-error-alert" id="id140">portmap_error_alert</a></li>
<li><a class="reference internal" href="#portmap-alert" id="id141">portmap_alert</a></li>
<li><a class="reference internal" href="#portmap-log-alert" id="id142">portmap_log_alert</a></li>
<li><a class="reference internal" href="#file-error-alert" id="id143">file_error_alert</a></li>
<li><a class="reference internal" href="#tracker-announce-alert" id="id144">tracker_announce_alert</a></li>
<li><a class="reference internal" href="#tracker-error-alert" id="id145">tracker_error_alert</a></li>
<li><a class="reference internal" href="#tracker-reply-alert" id="id146">tracker_reply_alert</a></li>
<li><a class="reference internal" href="#dht-reply-alert" id="id147">dht_reply_alert</a></li>
<li><a class="reference internal" href="#tracker-warning-alert" id="id148">tracker_warning_alert</a></li>
<li><a class="reference internal" href="#scrape-reply-alert" id="id149">scrape_reply_alert</a></li>
<li><a class="reference internal" href="#scrape-failed-alert" id="id150">scrape_failed_alert</a></li>
<li><a class="reference internal" href="#url-seed-alert" id="id151">url_seed_alert</a></li>
<li><a class="reference internal" href="#hash-failed-alert" id="id152">hash_failed_alert</a></li>
<li><a class="reference internal" href="#peer-ban-alert" id="id153">peer_ban_alert</a></li>
<li><a class="reference internal" href="#peer-error-alert" id="id154">peer_error_alert</a></li>
<li><a class="reference internal" href="#invalid-request-alert" id="id155">invalid_request_alert</a></li>
<li><a class="reference internal" href="#torrent-finished-alert" id="id156">torrent_finished_alert</a></li>
<li><a class="reference internal" href="#performance-alert" id="id157">performance_alert</a></li>
<li><a class="reference internal" href="#state-changed-alert" id="id158">state_changed_alert</a></li>
<li><a class="reference internal" href="#metadata-failed-alert" id="id159">metadata_failed_alert</a></li>
<li><a class="reference internal" href="#metadata-received-alert" id="id160">metadata_received_alert</a></li>
<li><a class="reference internal" href="#fastresume-rejected-alert" id="id161">fastresume_rejected_alert</a></li>
<li><a class="reference internal" href="#peer-blocked-alert" id="id162">peer_blocked_alert</a></li>
<li><a class="reference internal" href="#storage-moved-alert" id="id163">storage_moved_alert</a></li>
<li><a class="reference internal" href="#torrent-paused-alert" id="id164">torrent_paused_alert</a></li>
<li><a class="reference internal" href="#torrent-resumed-alert" id="id165">torrent_resumed_alert</a></li>
<li><a class="reference internal" href="#save-resume-data-alert" id="id166">save_resume_data_alert</a></li>
<li><a class="reference internal" href="#save-resume-data-failed-alert" id="id167">save_resume_data_failed_alert</a></li>
<li><a class="reference internal" href="#dht-announce-alert" id="id168">dht_announce_alert</a></li>
<li><a class="reference internal" href="#dht-get-peers-alert" id="id169">dht_get_peers_alert</a></li>
<li><a class="reference internal" href="#dispatcher" id="id170">dispatcher</a></li>
</ul>
</li>
<li><a class="reference internal" href="#exceptions" id="id168">exceptions</a><ul>
<li><a class="reference internal" href="#invalid-handle" id="id169">invalid_handle</a></li>
<li><a class="reference internal" href="#duplicate-torrent" id="id170">duplicate_torrent</a></li>
<li><a class="reference internal" href="#invalid-encoding" id="id171">invalid_encoding</a></li>
<li><a class="reference internal" href="#type-error" id="id172">type_error</a></li>
<li><a class="reference internal" href="#invalid-torrent-file" id="id173">invalid_torrent_file</a></li>
<li><a class="reference internal" href="#exceptions" id="id171">exceptions</a><ul>
<li><a class="reference internal" href="#libtorrent-exception" id="id172">libtorrent_exception</a></li>
</ul>
</li>
<li><a class="reference internal" href="#error-code" id="id174">error_code</a></li>
<li><a class="reference internal" href="#storage-interface" id="id175">storage_interface</a><ul>
<li><a class="reference internal" href="#initialize" id="id176">initialize()</a></li>
<li><a class="reference internal" href="#readv-writev" id="id177">readv() writev()</a></li>
<li><a class="reference internal" href="#sparse-end" id="id178">sparse_end()</a></li>
<li><a class="reference internal" href="#id12" id="id179">move_storage()</a></li>
<li><a class="reference internal" href="#verify-resume-data" id="id180">verify_resume_data()</a></li>
<li><a class="reference internal" href="#write-resume-data" id="id181">write_resume_data()</a></li>
<li><a class="reference internal" href="#move-slot" id="id182">move_slot()</a></li>
<li><a class="reference internal" href="#swap-slots" id="id183">swap_slots()</a></li>
<li><a class="reference internal" href="#swap-slots3" id="id184">swap_slots3()</a></li>
<li><a class="reference internal" href="#hash-for-slot" id="id185">hash_for_slot()</a></li>
<li><a class="reference internal" href="#id13" id="id186">rename_file()</a></li>
<li><a class="reference internal" href="#release-files" id="id187">release_files()</a></li>
<li><a class="reference internal" href="#delete-files" id="id188">delete_files()</a></li>
<li><a class="reference internal" href="#error-code" id="id173">error_code</a></li>
<li><a class="reference internal" href="#storage-interface" id="id174">storage_interface</a><ul>
<li><a class="reference internal" href="#initialize" id="id175">initialize()</a></li>
<li><a class="reference internal" href="#readv-writev" id="id176">readv() writev()</a></li>
<li><a class="reference internal" href="#sparse-end" id="id177">sparse_end()</a></li>
<li><a class="reference internal" href="#id13" id="id178">move_storage()</a></li>
<li><a class="reference internal" href="#verify-resume-data" id="id179">verify_resume_data()</a></li>
<li><a class="reference internal" href="#write-resume-data" id="id180">write_resume_data()</a></li>
<li><a class="reference internal" href="#move-slot" id="id181">move_slot()</a></li>
<li><a class="reference internal" href="#swap-slots" id="id182">swap_slots()</a></li>
<li><a class="reference internal" href="#swap-slots3" id="id183">swap_slots3()</a></li>
<li><a class="reference internal" href="#hash-for-slot" id="id184">hash_for_slot()</a></li>
<li><a class="reference internal" href="#id14" id="id185">rename_file()</a></li>
<li><a class="reference internal" href="#release-files" id="id186">release_files()</a></li>
<li><a class="reference internal" href="#delete-files" id="id187">delete_files()</a></li>
</ul>
</li>
<li><a class="reference internal" href="#magnet-links" id="id189">magnet links</a></li>
<li><a class="reference internal" href="#queuing" id="id190">queuing</a><ul>
<li><a class="reference internal" href="#downloading" id="id191">downloading</a></li>
<li><a class="reference internal" href="#seeding" id="id192">seeding</a></li>
<li><a class="reference internal" href="#magnet-links" id="id188">magnet links</a></li>
<li><a class="reference internal" href="#queuing" id="id189">queuing</a><ul>
<li><a class="reference internal" href="#downloading" id="id190">downloading</a></li>
<li><a class="reference internal" href="#seeding" id="id191">seeding</a></li>
</ul>
</li>
<li><a class="reference internal" href="#fast-resume" id="id193">fast resume</a><ul>
<li><a class="reference internal" href="#file-format" id="id194">file format</a></li>
<li><a class="reference internal" href="#fast-resume" id="id192">fast resume</a><ul>
<li><a class="reference internal" href="#file-format" id="id193">file format</a></li>
</ul>
</li>
<li><a class="reference internal" href="#threads" id="id195">threads</a></li>
<li><a class="reference internal" href="#storage-allocation" id="id196">storage allocation</a><ul>
<li><a class="reference internal" href="#sparse-allocation" id="id197">sparse allocation</a></li>
<li><a class="reference internal" href="#full-allocation" id="id198">full allocation</a></li>
<li><a class="reference internal" href="#compact-allocation" id="id199">compact allocation</a></li>
<li><a class="reference internal" href="#threads" id="id194">threads</a></li>
<li><a class="reference internal" href="#storage-allocation" id="id195">storage allocation</a><ul>
<li><a class="reference internal" href="#sparse-allocation" id="id196">sparse allocation</a></li>
<li><a class="reference internal" href="#full-allocation" id="id197">full allocation</a></li>
<li><a class="reference internal" href="#compact-allocation" id="id198">compact allocation</a></li>
</ul>
</li>
<li><a class="reference internal" href="#extensions" id="id200">extensions</a><ul>
<li><a class="reference internal" href="#metadata-from-peers" id="id201">metadata from peers</a></li>
<li><a class="reference internal" href="#http-seeding" id="id202">HTTP seeding</a></li>
<li><a class="reference internal" href="#extensions" id="id199">extensions</a><ul>
<li><a class="reference internal" href="#metadata-from-peers" id="id200">metadata from peers</a></li>
<li><a class="reference internal" href="#http-seeding" id="id201">HTTP seeding</a></li>
</ul>
</li>
<li><a class="reference internal" href="#filename-checks" id="id203">filename checks</a></li>
<li><a class="reference internal" href="#filename-checks" id="id202">filename checks</a></li>
</ul>
</div>
<div class="section" id="overview">
@ -340,6 +338,9 @@ class session: public boost::noncopyable
torrent_handle add_torrent(
add_torrent_params const&amp; params);
torrent_handle add_torrent(
add_torrent_params const&amp; params
, error_code&amp; ec);
void pause();
void resume();
@ -542,13 +543,18 @@ struct add_torrent_params
storage_constructor_type storage;
void* userdata;
bool seed_mode;
bool override_resume_data;
};
torrent_handle add_torrent(add_torrent_params const&amp; params);
torrent_handle add_torrent(add_torrent_params const&amp; params
, error_code&amp; ec);
</pre>
</blockquote>
<p>You add torrents through the <tt class="docutils literal"><span class="pre">add_torrent()</span></tt> function where you give an
object with all the parameters.</p>
<p>The overload that does not take an <tt class="docutils literal"><span class="pre">error_code</span></tt> throws an exception on
error and is not available when building without exception support.</p>
<p>The only mandatory parameter is <tt class="docutils literal"><span class="pre">save_path</span></tt> which is the directory where you
want the files to be saved. You also need to specify either the <tt class="docutils literal"><span class="pre">ti</span></tt> (the
torrent file) or <tt class="docutils literal"><span class="pre">info_hash</span></tt> (the info hash of the torrent). If you specify the
@ -563,7 +569,7 @@ the torrent as long as it doesn't have metadata. See <tt class="docutils literal
torrent.</p>
<p>If the torrent you are trying to add already exists in the session (is either queued
for checking, being checked or downloading) <tt class="docutils literal"><span class="pre">add_torrent()</span></tt> will throw
<a class="reference internal" href="#duplicate-torrent">duplicate_torrent</a> which derives from <tt class="docutils literal"><span class="pre">std::exception</span></tt> unless <tt class="docutils literal"><span class="pre">duplicate_is_error</span></tt>
<a class="reference internal" href="#libtorrent-exception">libtorrent_exception</a> which derives from <tt class="docutils literal"><span class="pre">std::exception</span></tt> unless <tt class="docutils literal"><span class="pre">duplicate_is_error</span></tt>
is set to false. In that case, <tt class="docutils literal"><span class="pre">add_torrent</span></tt> will return the handle to the existing
torrent.</p>
<p>The optional parameter, <tt class="docutils literal"><span class="pre">resume_data</span></tt> can be given if up to date fast-resume data
@ -593,10 +599,16 @@ downloaded.</dd>
a paused state. I.e. it won't connect to the tracker or any of the peers until it's
resumed. This is typically a good way of avoiding race conditions when setting
configuration options on torrents before starting them.</p>
<p>If you pass in resume data, the paused state of the torrent when the resume data
was saved will override the paused state you pass in here. You can override this
by setting <tt class="docutils literal"><span class="pre">override_resume_data</span></tt>.</p>
<p>If <tt class="docutils literal"><span class="pre">auto_managed</span></tt> is true, this torrent will be queued, started and seeded
automatically by libtorrent. When this is set, the torrent should also be started
as paused. The default queue order is the order the torrents were added. They
are all downloaded in that order. For more details, see <a class="reference internal" href="#queuing">queuing</a>.</p>
<p>If you pass in resume data, the auto_managed state of the torrent when the resume data
was saved will override the auto_managed state you pass in here. You can override this
by setting <tt class="docutils literal"><span class="pre">override_resume_data</span></tt>.</p>
<p><tt class="docutils literal"><span class="pre">storage</span></tt> can be used to customize how the data is stored. The default
storage will simply write the data to the files it belongs to, but it could be
overridden to save everything to a single file at a specific location or encrypt the
@ -613,8 +625,13 @@ is created and seeded, or if the user already know that the files are complete,
is a way to avoid the initial file checks, and significantly reduce the startup time.</p>
<p>Setting <tt class="docutils literal"><span class="pre">seed_mode</span></tt> on a torrent without metadata (a .torrent file) is a no-op
and will be ignored.</p>
<p>If resume data is passed in with this torrent, the seed mode saved in there will
override the seed mode you set here.</p>
<p>The <a class="reference internal" href="#torrent-handle">torrent_handle</a> returned by <tt class="docutils literal"><span class="pre">add_torrent()</span></tt> can be used to retrieve information
about the torrent's progress, its peers etc. It is also used to abort a torrent.</p>
<p>If <tt class="docutils literal"><span class="pre">override_resume_data</span></tt> is set to true, the <tt class="docutils literal"><span class="pre">paused</span></tt> and <tt class="docutils literal"><span class="pre">auto_managed</span></tt>
state of the torrent are not loaded from the resume data, but the states requested
by this <tt class="docutils literal"><span class="pre">add_torrent_params</span></tt> will override it.</p>
</div>
<div class="section" id="remove-torrent">
<h2>remove_torrent()</h2>
@ -628,7 +645,7 @@ the tracker that we've stopped participating in the swarm. The optional second a
<tt class="docutils literal"><span class="pre">options</span></tt> can be used to delete all the files downloaded by this torrent. To do this, pass
in the value <tt class="docutils literal"><span class="pre">session::delete_files</span></tt>. The removal of the torrent is asyncronous, there is
no guarantee that adding the same torrent immediately after it was removed will not throw
a <a class="reference internal" href="#duplicate-torrent">duplicate_torrent</a> exception.</p>
a <a class="reference internal" href="#libtorrent-exception">libtorrent_exception</a> exception.</p>
</div>
<div class="section" id="find-torrent-get-torrents">
<h2>find_torrent() get_torrents()</h2>
@ -1314,7 +1331,7 @@ dictionary_type const&amp; dict() const;
</blockquote>
<p>The <tt class="docutils literal"><span class="pre">integer()</span></tt>, <tt class="docutils literal"><span class="pre">string()</span></tt>, <tt class="docutils literal"><span class="pre">list()</span></tt> and <tt class="docutils literal"><span class="pre">dict()</span></tt> functions
are accessors that return the respective type. If the <tt class="docutils literal"><span class="pre">entry</span></tt> object isn't of the
type you request, the accessor will throw <a class="reference internal" href="#type-error">type_error</a> (which derives from
type you request, the accessor will throw <a class="reference internal" href="#libtorrent-exception">libtorrent_exception</a> (which derives from
<tt class="docutils literal"><span class="pre">std::runtime_error</span></tt>). You can ask an <tt class="docutils literal"><span class="pre">entry</span></tt> for its type through the
<tt class="docutils literal"><span class="pre">type()</span></tt> function.</p>
<p>The <tt class="docutils literal"><span class="pre">print()</span></tt> function is there for debug purposes only.</p>
@ -1525,10 +1542,22 @@ in a storage, the storage needs to make its own copy of the <tt class="docutils
to make its mapping differ from the one in the torrent file.</p>
<p><tt class="docutils literal"><span class="pre">orig_files()</span></tt> returns the original (unmodified) file storage for this torrent. This
is used by the web server connection, which needs to request files with the original
names.</p>
names. Filename may be chaged using <tt class="docutils literal"><span class="pre">torrent_info::rename_file()</span></tt>.</p>
<p>For more information on the <tt class="docutils literal"><span class="pre">file_storage</span></tt> object, see the separate document on how
to create torrents.</p>
</div>
<div class="section" id="rename-file">
<h2>rename_file()</h2>
<blockquote>
<pre class="literal-block">
void rename_file(int index, std::string const&amp; new_filename);
void rename_file(int index, std::wstring const&amp; new_filename);
</pre>
</blockquote>
<p>Renames a the file with the specified index to the new name. The new filename is
reflected by the <tt class="docutils literal"><span class="pre">file_storage</span></tt> returned by <tt class="docutils literal"><span class="pre">files()</span></tt> but not by the one
returned by <tt class="docutils literal"><span class="pre">orig_files()</span></tt>.</p>
</div>
<div class="section" id="begin-files-end-files-rbegin-files-rend-files">
<h2>begin_files() end_files() rbegin_files() rend_files()</h2>
<blockquote>
@ -1867,6 +1896,9 @@ struct torrent_handle
void resolve_countries(bool r);
bool resolve_countries() const;
enum deadline_flags { alert_when_available = 1 };
void set_piece_deadline(int index, time_duration deadline, int flags = 0) const;
void piece_priority(int index, int priority) const;
int piece_priority(int index) const;
void prioritize_pieces(std::vector&lt;int&gt; const&amp; pieces) const;
@ -1910,12 +1942,33 @@ valid handle. If you try to perform any operation on an uninitialized handle,
it will throw <tt class="docutils literal"><span class="pre">invalid_handle</span></tt>.</p>
<div class="warning">
<p class="first admonition-title">Warning</p>
<p class="last">All operations on a <tt class="docutils literal"><span class="pre">torrent_handle</span></tt> may throw <a class="reference internal" href="#invalid-handle">invalid_handle</a>
<p class="last">All operations on a <tt class="docutils literal"><span class="pre">torrent_handle</span></tt> may throw <a class="reference internal" href="#libtorrent-exception">libtorrent_exception</a>
exception, in case the handle is no longer refering to a torrent. There is
one exception <tt class="docutils literal"><span class="pre">is_valid()</span></tt> will never throw.
Since the torrents are processed by a background thread, there is no
guarantee that a handle will remain valid between two calls.</p>
</div>
<div class="section" id="set-piece-deadline">
<h2>set_piece_deadline()</h2>
<blockquote>
<pre class="literal-block">
enum deadline_flags { alert_when_available = 1 };
void set_piece_deadline(int index, time_duration deadline, int flags = 0) const;
</pre>
</blockquote>
<p>This function sets or resets the deadline associated with a specific piece
index (<tt class="docutils literal"><span class="pre">index</span></tt>). libtorrent will attempt to download this entire piece before
the deadline expires. This is not necessarily possible, but pieces with a more
recent deadline will always be prioritized over pieces with a deadline further
ahead in time. The deadline (and flags) of a piece can be changed by calling this
function again.</p>
<p>The <tt class="docutils literal"><span class="pre">flags</span></tt> parameter can be used to ask libtorrent to send an alert once the
piece has been downloaded, by passing <tt class="docutils literal"><span class="pre">alert_when_available</span></tt>. When set, the
<a class="reference internal" href="#read-piece-alert">read_piece_alert</a> alert will be delivered, with the piece data, when it's downloaded.</p>
<p>If the piece is already downloaded when this call is made, nothing happens, unless
the <tt class="docutils literal"><span class="pre">alert_when_available</span></tt> flag is set, in which case it will do the same thing
as calling <a class="reference internal" href="#read-piece">read_piece()</a> for <tt class="docutils literal"><span class="pre">index</span></tt>.</p>
</div>
<div class="section" id="piece-priority-prioritize-pieces-piece-priorities">
<h2>piece_priority() prioritize_pieces() piece_priorities()</h2>
<blockquote>
@ -2018,7 +2071,7 @@ drop while copying the file.</p>
Once the operation completes, the <tt class="docutils literal"><span class="pre">storage_moved_alert</span></tt> is generated, with the new
path as the message.</p>
</div>
<div class="section" id="rename-file">
<div class="section" id="id5">
<h2>rename_file()</h2>
<blockquote>
<pre class="literal-block">
@ -2123,7 +2176,7 @@ void connect_peer(asio::ip::tcp::endpoint const&amp; adr, int source = 0) const;
torrent. If the peer does not respond, or is not a member of this torrent, it will simply
be disconnected. No harm can be done by using this other than an unnecessary connection
attempt is made. If the torrent is uninitialized or in queued or checking mode, this
will throw <a class="reference internal" href="#invalid-handle">invalid_handle</a>. The second (optional) argument will be bitwised ORed into
will throw <a class="reference internal" href="#libtorrent-exception">libtorrent_exception</a>. The second (optional) argument will be bitwised ORed into
the source mask of this peer. Typically this is one of the source flags in <a class="reference internal" href="#peer-info">peer_info</a>.
i.e. <tt class="docutils literal"><span class="pre">tracker</span></tt>, <tt class="docutils literal"><span class="pre">pex</span></tt>, <tt class="docutils literal"><span class="pre">dht</span></tt> etc.</p>
</div>
@ -2198,7 +2251,7 @@ void set_peer_download_limit(asio::ip::tcp::endpoint ip, int limit) const;
<p>Works like <tt class="docutils literal"><span class="pre">set_upload_limit</span></tt> and <tt class="docutils literal"><span class="pre">set_download_limit</span></tt> respectively, but controls individual
peer instead of the whole torrent.</p>
</div>
<div class="section" id="id5">
<div class="section" id="id6">
<h2>pause() resume() is_paused()</h2>
<blockquote>
<pre class="literal-block">
@ -2403,7 +2456,7 @@ sha1_hash info_hash() const;
</blockquote>
<p><tt class="docutils literal"><span class="pre">info_hash()</span></tt> returns the info-hash for the torrent.</p>
</div>
<div class="section" id="id6">
<div class="section" id="id7">
<h2>set_max_uploads() set_max_connections() max_connections()</h2>
<blockquote>
<pre class="literal-block">
@ -2515,7 +2568,7 @@ while (num_resume_data &gt; 0)
}
</pre>
</div>
<div class="section" id="id7">
<div class="section" id="id8">
<h2>status()</h2>
<blockquote>
<pre class="literal-block">
@ -2523,7 +2576,7 @@ torrent_status status() const;
</pre>
</blockquote>
<p><tt class="docutils literal"><span class="pre">status()</span></tt> will return a structure with information about the status of this
torrent. If the <a class="reference internal" href="#torrent-handle">torrent_handle</a> is invalid, it will throw <a class="reference internal" href="#invalid-handle">invalid_handle</a> exception.
torrent. If the <a class="reference internal" href="#torrent-handle">torrent_handle</a> is invalid, it will throw <a class="reference internal" href="#libtorrent-exception">libtorrent_exception</a> exception.
See <a class="reference internal" href="#torrent-status">torrent_status</a>.</p>
</div>
<div class="section" id="get-download-queue">
@ -2588,7 +2641,7 @@ void get_peer_info(std::vector&lt;peer_info&gt;&amp;) const;
</blockquote>
<p><tt class="docutils literal"><span class="pre">get_peer_info()</span></tt> takes a reference to a vector that will be cleared and filled
with one entry for each peer connected to this torrent, given the handle is valid. If the
<a class="reference internal" href="#torrent-handle">torrent_handle</a> is invalid, it will throw <a class="reference internal" href="#invalid-handle">invalid_handle</a> exception. Each entry in
<a class="reference internal" href="#torrent-handle">torrent_handle</a> is invalid, it will throw <a class="reference internal" href="#libtorrent-exception">libtorrent_exception</a> exception. Each entry in
the vector contains information about that particular peer. See <a class="reference internal" href="#peer-info">peer_info</a>.</p>
</div>
<div class="section" id="get-torrent-info">
@ -2600,7 +2653,7 @@ torrent_info const&amp; get_torrent_info() const;
</blockquote>
<p>Returns a const reference to the <a class="reference internal" href="#torrent-info">torrent_info</a> object associated with this torrent.
This reference is valid as long as the <a class="reference internal" href="#torrent-handle">torrent_handle</a> is valid, no longer. If the
<a class="reference internal" href="#torrent-handle">torrent_handle</a> is invalid or if it doesn't have any metadata, <a class="reference internal" href="#invalid-handle">invalid_handle</a>
<a class="reference internal" href="#torrent-handle">torrent_handle</a> is invalid or if it doesn't have any metadata, <a class="reference internal" href="#libtorrent-exception">libtorrent_exception</a>
exception will be thrown. The torrent may be in a state without metadata only if
it was started without a .torrent file, i.e. by using the libtorrent extension of
just supplying a tracker and info-hash.</p>
@ -3301,6 +3354,8 @@ struct session_settings
int max_sparse_regions;
bool lock_disk_cache;
int max_rejects;
};
</pre>
<p><tt class="docutils literal"><span class="pre">user_agent</span></tt> this is the client identification to the tracker.
@ -3569,6 +3624,9 @@ to 0 on all platforms except windows.</p>
<p><tt class="docutils literal"><span class="pre">lock_disk_cache</span></tt> if lock disk cache is set to true the disk cache
that's in use, will be locked in physical memory, preventing it from
being swapped out.</p>
<p><tt class="docutils literal"><span class="pre">max_rejects</span></tt> 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.</p>
</div>
<div class="section" id="pe-settings">
<h1>pe_settings</h1>
@ -3716,7 +3774,7 @@ public:
};
</pre>
</blockquote>
<div class="section" id="id10">
<div class="section" id="id11">
<h2>ip_filter()</h2>
<blockquote>
<pre class="literal-block">
@ -4068,7 +4126,7 @@ entry e = bdecode(buf, buf + data_size);
</pre>
<p>Now we just need to know how to retrieve information from the <a class="reference internal" href="#entry">entry</a>.</p>
<p>If <tt class="docutils literal"><span class="pre">bdecode()</span></tt> encounters invalid encoded data in the range given to it
it will throw <a class="reference internal" href="#invalid-encoding">invalid_encoding</a>.</p>
it will throw <a class="reference internal" href="#libtorrent-exception">libtorrent_exception</a>.</p>
</div>
<div class="section" id="add-magnet-uri">
<h2>add_magnet_uri()</h2>
@ -4076,6 +4134,8 @@ it will throw <a class="reference internal" href="#invalid-encoding">invalid_enc
<pre class="literal-block">
torrent_handle add_magnet_uri(session&amp; ses, std::string const&amp; uri
add_torrent_params p);
torrent_handle add_magnet_uri(session&amp; ses, std::string const&amp; uri
add_torrent_params p, error_code&amp; ec);
</pre>
</blockquote>
<p>This function parses the magnet URI (<tt class="docutils literal"><span class="pre">uri</span></tt>) as a bittorrent magnet link,
@ -4083,6 +4143,8 @@ and adds the torrent to the specified session (<tt class="docutils literal"><spa
handle to the newly added torrent, or an invalid handle in case parsing
failed. To control some initial settings of the torrent, sepcify those in
the <tt class="docutils literal"><span class="pre">add_torrent_params</span></tt>, <tt class="docutils literal"><span class="pre">p</span></tt>. See <a class="reference internal" href="#add-torrent">add_torrent()</a>.</p>
<p>The overload that does not take an <tt class="docutils literal"><span class="pre">error_code</span></tt> throws an exception on
error and is not available when building without exception support.</p>
<p>For more information about magnet links, see <a class="reference internal" href="#magnet-links">magnet links</a>.</p>
</div>
<div class="section" id="make-magnet-uri">
@ -4741,60 +4803,19 @@ including <tt class="docutils literal"><span class="pre">&lt;libtorrent/alert.hp
</div>
<div class="section" id="exceptions">
<h1>exceptions</h1>
<p>There are a number of exceptions that can be thrown from different places in libtorrent,
here's a complete list with description.</p>
<div class="section" id="invalid-handle">
<h2>invalid_handle</h2>
<p>This exception is thrown when querying information from a <a class="reference internal" href="#torrent-handle">torrent_handle</a> that hasn't
been initialized or that has become invalid.</p>
<p>Many functions in libtorrent have two versions, one that throws exceptions on
errors and one that takes an <tt class="docutils literal"><span class="pre">error_code</span></tt> reference which is filled with the
error code on errors.</p>
<p>There is one exception class that is used for errors in libtorrent, it is based
on boost.system's <tt class="docutils literal"><span class="pre">error_code</span></tt> class to carry the error code.</p>
<div class="section" id="libtorrent-exception">
<h2>libtorrent_exception</h2>
<pre class="literal-block">
struct invalid_handle: std::exception
struct libtorrent_exception: std::exception
{
const char* what() const throw();
};
</pre>
</div>
<div class="section" id="duplicate-torrent">
<h2>duplicate_torrent</h2>
<p>This is thrown by <a class="reference internal" href="#add-torrent">add_torrent()</a> if the torrent already has been added to
the session. Since <a class="reference internal" href="#remove-torrent">remove_torrent()</a> is asynchronous, this exception may
be thrown if the torrent is removed and then immediately added again.</p>
<pre class="literal-block">
struct duplicate_torrent: std::exception
{
const char* what() const throw();
};
</pre>
</div>
<div class="section" id="invalid-encoding">
<h2>invalid_encoding</h2>
<p>This is thrown by <tt class="docutils literal"><span class="pre">bdecode()</span></tt> if the input data is not a valid bencoding.</p>
<pre class="literal-block">
struct invalid_encoding: std::exception
{
const char* what() const throw();
};
</pre>
</div>
<div class="section" id="type-error">
<h2>type_error</h2>
<p>This is thrown from the accessors of <tt class="docutils literal"><span class="pre">entry</span></tt> if the data type of the <tt class="docutils literal"><span class="pre">entry</span></tt> doesn't
match the type you want to extract from it.</p>
<pre class="literal-block">
struct type_error: std::runtime_error
{
type_error(const char* error);
};
</pre>
</div>
<div class="section" id="invalid-torrent-file">
<h2>invalid_torrent_file</h2>
<p>This exception is thrown from the constructor of <tt class="docutils literal"><span class="pre">torrent_info</span></tt> if the given bencoded information
doesn't meet the requirements on what information has to be present in a torrent file.</p>
<pre class="literal-block">
struct invalid_torrent_file: std::exception
{
const char* what() const throw();
libtorrent_exception(error_code const&amp; s);
virtual const char* what() const throw();
virtual ~libtorrent_exception() throw() {}
boost::system::error_code error() const;
};
</pre>
@ -4885,6 +4906,35 @@ matched the info-hash, but failed to be parsed</td>
<td>invalid_bencoding</td>
<td>The file or buffer is not correctly bencoded</td>
</tr>
<tr><td>16</td>
<td>no_files_in_torrent</td>
<td>The .torrent file does not contain any files</td>
</tr>
<tr><td>17</td>
<td>invalid_escaped_string</td>
<td>The string was not properly url-encoded as expected</td>
</tr>
<tr><td>18</td>
<td>session_is_closing</td>
<td>Operation is not permitted since the session is shutting down</td>
</tr>
<tr><td>19</td>
<td>duplicate_torrent</td>
<td>There's already a torrent with that info-hash added to the
session</td>
</tr>
<tr><td>20</td>
<td>invalid_torrent_handle</td>
<td>The supplied torrent_handle is not referring to a valid torrent</td>
</tr>
<tr><td>21</td>
<td>invalid_entry_type</td>
<td>The type requested from the entry did not match its type</td>
</tr>
<tr><td>22</td>
<td>missing_info_hash_in_uri</td>
<td>The specified URI does not contain a valid info-hash</td>
</tr>
</tbody>
</table>
<p>The names of these error codes are declared in then <tt class="docutils literal"><span class="pre">libtorrent::errors</span></tt> namespace.</p>
@ -4975,7 +5025,7 @@ int sparse_end(int start) const;
region). The purpose of this is to skip parts of files that can be known to contain
zeros when checking files.</p>
</div>
<div class="section" id="id12">
<div class="section" id="id13">
<h2>move_storage()</h2>
<blockquote>
<pre class="literal-block">
@ -5074,7 +5124,7 @@ struct partial_hash
that is stored in the given slot.</p>
<p>The function should return the hash of the piece stored in the slot.</p>
</div>
<div class="section" id="id13">
<div class="section" id="id14">
<h2>rename_file()</h2>
<blockquote>
<pre class="literal-block">
@ -5196,8 +5246,8 @@ then it will not trust the fast-resume data and just do the checking.</p>
<p>The file format is a bencoded dictionary containing the following fields:</p>
<table border="1" class="docutils">
<colgroup>
<col width="26%" />
<col width="74%" />
<col width="30%" />
<col width="70%" />
</colgroup>
<tbody valign="top">
<tr><td><tt class="docutils literal"><span class="pre">file-format</span></tt></td>
@ -5218,7 +5268,9 @@ greater than 4 megabytes, the block size will increase.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">pieces</span></tt></td>
<td>A string with piece flags, one character per piece.
Bit 1 means we have that piece.</td>
Bit 1 means we have that piece.
Bit 2 means we have verified that this piece is correct.
This only applies when the torrent is in seed_mode.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">slots</span></tt></td>
<td><p class="first">list of integers. The list maps slots to piece indices. It
@ -5230,6 +5282,92 @@ to meet the following requirement:</p>
the piece must be located in that slot.</p>
</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">total_uploaded</span></tt></td>
<td>integer. The number of bytes that have been uploaded in
total for this torrent.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">total_downloaded</span></tt></td>
<td>integer. The number of bytes that have been downloaded in
total for this torrent.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">active_time</span></tt></td>
<td>integer. The number of seconds this torrent has been active.
i.e. not paused.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">seeding_time</span></tt></td>
<td>integer. The number of seconds this torrent has been active
and seeding.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">num_seeds</span></tt></td>
<td>integer. An estimate of the number of seeds on this torrent
when the resume data was saved. This is scrape data or based
on the peer list if scrape data is unavailable.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">num_downloaders</span></tt></td>
<td>integer. An estimate of the number of downloaders on this
torrent when the resume data was last saved. This is used as
an initial estimate until we acquire up-to-date scrape info.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">upload_rate_limit</span></tt></td>
<td>integer. In case this torrent has a per-torrent upload rate
limit, this is that limit. In bytes per second.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">download_rate_limit</span></tt></td>
<td>integer. The download rate limit for this torrent in case
one is set, in bytes per second.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">max_connections</span></tt></td>
<td>integer. The max number of peer connections this torrent
may have, if a limit is set.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">max_uploads</span></tt></td>
<td>integer. The max number of unchoked peers this torrent may
have, if a limit is set.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">seed_mode</span></tt></td>
<td>integer. 1 if the torrent is in seed mode, 0 otherwise.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">file_priority</span></tt></td>
<td>list of integers. One entry per file in the torrent. Each
entry is the priority of the file with the same index.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">piece_priority</span></tt></td>
<td>string of bytes. Each byte is interpreted as an integer and
is the priority of that piece.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">auto_managed</span></tt></td>
<td>integer. 1 if the torrent is auto managed, otherwise 0.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">sequential_download</span></tt></td>
<td>integer. 1 if the torrent is in sequential download mode,
0 otherwise.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">paused</span></tt></td>
<td>integer. 1 if the torrent is paused, 0 otherwise.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">trackers</span></tt></td>
<td>list of lists of strings. The top level list lists all
tracker tiers. Each second level list is one tier of
trackers.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">mapped_files</span></tt></td>
<td>list of strings. If any file in the torrent has been
renamed, this entry contains a list of all the filenames.
In the same order as in the torrent file.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">url-list</span></tt></td>
<td>list of strings. List of url-seed URLs used by this torrent.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">httpseeds</span></tt></td>
<td>list of strings. List of httpseed URLs used by this torrent.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">merkle</span> <span class="pre">tree</span></tt></td>
<td>string. In case this torrent is a merkle torrent, this is a
string containing the entire merkle tree, all nodes,
including the root and all leaves. The tree is not
necessarily complete, but complete enough to be able to send
any piece that we have, indicated by the have bitmask.</td>
</tr>
<tr><td><tt class="docutils literal"><span class="pre">peers</span></tt></td>
<td><p class="first">list of dictionaries. Each dictionary has the following
layout:</p>

View File

@ -3,7 +3,7 @@
<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.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: 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" />

View File

@ -3,7 +3,7 @@
<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.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: 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" />
@ -36,18 +36,18 @@
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>Arvid Norberg, <a class="last reference" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
<td>Arvid Norberg, <a class="last reference external" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
</tbody>
</table>
<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of contents</p>
<ul class="simple">
<li><a class="reference" href="#building" id="id2">building</a><ul>
<li><a class="reference" href="#building-using-setup-py" id="id3">building using setup.py</a></li>
<li><a class="reference" href="#building-using-boost-build" id="id4">building using boost build</a></li>
<li><a class="reference internal" href="#building" id="id2">building</a><ul>
<li><a class="reference internal" href="#building-using-setup-py" id="id3">building using setup.py</a></li>
<li><a class="reference internal" href="#building-using-boost-build" id="id4">building using boost build</a></li>
</ul>
</li>
<li><a class="reference" href="#using-libtorrent-in-python" id="id5">using libtorrent in python</a></li>
<li><a class="reference internal" href="#using-libtorrent-in-python" id="id5">using libtorrent in python</a></li>
</ul>
</div>
<div class="section" id="building">
@ -92,10 +92,10 @@ using python : 2.3 : /usr ;
</pre>
<p>The bindings require <em>at least</em> python version 2.2.</p>
<p>For more information on how to install and set up boost-build, see the
<a class="reference" href="building.html#step-2-setup-bbv2">building libtorrent</a> section.</p>
<a class="reference external" href="building.html#step-2-setup-bbv2">building libtorrent</a> section.</p>
<p>Once you have boost-build set up, you cd to the <tt class="docutils literal"><span class="pre">bindings/python</span></tt>
directory and invoke <tt class="docutils literal"><span class="pre">bjam</span></tt> with the apropriate settings. For the available
build variants, see <a class="reference" href="building.html#step-3-building-libtorrent">libtorrent build options</a>.</p>
build variants, see <a class="reference external" href="building.html#step-3-building-libtorrent">libtorrent build options</a>.</p>
<p>For example:</p>
<pre class="literal-block">
$ bjam dht-support=on boost=source release link=static
@ -109,7 +109,7 @@ bin/darwin-4.0/release/dht-support-on/link-static/logging-none/threading-multi/l
<div class="section" id="using-libtorrent-in-python">
<h1>using libtorrent in python</h1>
<p>The python interface is nearly identical to the C++ interface. Please refer to
the <a class="reference" href="manual.html">main library reference</a>. The main differences are:</p>
the <a class="reference external" href="manual.html">main library reference</a>. The main differences are:</p>
<dl class="docutils">
<dt>asio::tcp::endpoint</dt>
<dd>The endpoint type is represented as a tuple of a string (as the address) and an int for

View File

@ -3,7 +3,7 @@
<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.5: http://docutils.sourceforge.net/" />
<meta name="generator" content="Docutils 0.6: 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" />
@ -36,23 +36,23 @@
<col class="docinfo-content" />
<tbody valign="top">
<tr><th class="docinfo-name">Author:</th>
<td>Arvid Norberg, <a class="last reference" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
<td>Arvid Norberg, <a class="last reference external" href="mailto:arvid&#64;rasterbar.com">arvid&#64;rasterbar.com</a></td></tr>
</tbody>
</table>
<div class="contents topic" id="table-of-contents">
<p class="topic-title first">Table of contents</p>
<ul class="simple">
<li><a class="reference" href="#introduction" id="id2">introduction</a></li>
<li><a class="reference" href="#connecting" id="id3">connecting</a></li>
<li><a class="reference" href="#announcing" id="id4">announcing</a></li>
<li><a class="reference" href="#scraping" id="id5">scraping</a></li>
<li><a class="reference" href="#errors" id="id6">errors</a></li>
<li><a class="reference" href="#actions" id="id7">actions</a></li>
<li><a class="reference" href="#extensions" id="id8">extensions</a><ul>
<li><a class="reference" href="#authentication" id="id9">authentication</a></li>
<li><a class="reference internal" href="#introduction" id="id2">introduction</a></li>
<li><a class="reference internal" href="#connecting" id="id3">connecting</a></li>
<li><a class="reference internal" href="#announcing" id="id4">announcing</a></li>
<li><a class="reference internal" href="#scraping" id="id5">scraping</a></li>
<li><a class="reference internal" href="#errors" id="id6">errors</a></li>
<li><a class="reference internal" href="#actions" id="id7">actions</a></li>
<li><a class="reference internal" href="#extensions" id="id8">extensions</a><ul>
<li><a class="reference internal" href="#authentication" id="id9">authentication</a></li>
</ul>
</li>
<li><a class="reference" href="#credits" id="id10">credits</a></li>
<li><a class="reference internal" href="#credits" id="id10">credits</a></li>
</ul>
</div>
<div class="section" id="introduction">
@ -60,10 +60,10 @@
<p>A tracker with the protocol &quot;udp://&quot; in its URI
is supposed to be contacted using this protocol.</p>
<p>This protocol is supported by
<a class="reference" href="http://xbtt.sourceforge.net">xbt-tracker</a>.</p>
<a class="reference external" href="http://xbtt.sourceforge.net">xbt-tracker</a>.</p>
<p>For additional information and descritptions of
the terminology used in this document, see
the <a class="reference" href="http://wiki.theory.org/index.php/BitTorrentSpecification">protocol specification</a></p>
the <a class="reference external" href="http://wiki.theory.org/index.php/BitTorrentSpecification">protocol specification</a></p>
<p>All values are sent in network byte order (big endian). The sizes
are specified with ANSI-C standard types.</p>
<p>If no response to a request is received within 15 seconds, resend
@ -120,7 +120,7 @@ identify the protocol.</td>
<td>action</td>
<td>Describes the type of packet, in this
case it should be 0, for connect.
If 3 (for error) see <a class="reference" href="#errors">errors</a>.</td>
If 3 (for error) see <a class="reference internal" href="#errors">errors</a>.</td>
</tr>
<tr><td>int32_t</td>
<td>transaction_id</td>
@ -164,7 +164,7 @@ establishing the connection.</td>
<tr><td>int32_t</td>
<td>action</td>
<td>Action. in this case, 1 for announce.
See <a class="reference" href="#actions">actions</a>.</td>
See <a class="reference internal" href="#actions">actions</a>.</td>
</tr>
<tr><td>int32_t</td>
<td>transaction_id</td>
@ -229,7 +229,7 @@ in the reply. Use -1 for default.</td>
</tr>
<tr><td>uint16_t</td>
<td>extensions</td>
<td>See <a class="reference" href="#extensions">extensions</a></td>
<td>See <a class="reference internal" href="#extensions">extensions</a></td>
</tr>
</tbody>
</table>
@ -251,8 +251,8 @@ in the reply. Use -1 for default.</td>
<td>action</td>
<td>The action this is a reply to. Should
in this case be 1 for announce.
If 3 (for error) see <a class="reference" href="#errors">errors</a>.
See <a class="reference" href="#actions">actions</a>.</td>
If 3 (for error) see <a class="reference internal" href="#errors">errors</a>.
See <a class="reference internal" href="#actions">actions</a>.</td>
</tr>
<tr><td>int32_t</td>
<td>transaction_id</td>
@ -326,7 +326,7 @@ establishing of the connection.</td>
<tr><td>int32_t</td>
<td>action</td>
<td>The action, in this case, 2 for
scrape. See <a class="reference" href="#actions">actions</a>.</td>
scrape. See <a class="reference internal" href="#actions">actions</a>.</td>
</tr>
<tr><td>int32_t</td>
<td>transaction_id</td>
@ -373,7 +373,7 @@ the MTU.</p>
<td>action</td>
<td>The action, should in this case be
2 for scrape.
If 3 (for error) see <a class="reference" href="#errors">errors</a>.</td>
If 3 (for error) see <a class="reference internal" href="#errors">errors</a>.</td>
</tr>
<tr><td>int32_t</td>
<td>transaction_id</td>
@ -433,7 +433,7 @@ leechers.</td>
<tr><td>int32_t</td>
<td>action</td>
<td>The action, in this case 3, for error.
See <a class="reference" href="#actions">actions</a>.</td>
See <a class="reference internal" href="#actions">actions</a>.</td>
</tr>
<tr><td>int32_t</td>
<td>transaction_id</td>
@ -466,7 +466,7 @@ describing the error.</td>
bits are assigned:</p>
<blockquote>
<ul class="simple">
<li>1 = <a class="reference" href="#authentication">authentication</a>.</li>
<li>1 = <a class="reference internal" href="#authentication">authentication</a>.</li>
</ul>
</blockquote>
<div class="section" id="authentication">