update and regenerate documentation
This commit is contained in:
parent
b16dc66df2
commit
46f309f8b9
12
AUTHORS
12
AUTHORS
|
@ -1,11 +1,11 @@
|
|||
|
||||
Written by Arvid Norberg. Copyright (c) 2003-2007
|
||||
|
||||
Lots of testing, suggestions and contributions by:
|
||||
Massaroddel
|
||||
Tianhao Qiu.
|
||||
Written by Arvid Norberg. Copyright (c) 2003-2014
|
||||
|
||||
Contributions by:
|
||||
Ajax16384
|
||||
Steven Siloti
|
||||
Thomas Fischer
|
||||
Massaroddel
|
||||
Tianhao Qiu.
|
||||
Shyam
|
||||
Magnus Jonsson
|
||||
Daniel Wallin
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>libtorrent manual</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: 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" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>libtorrent manual</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title></title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>BitTorrent DHT security extension</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>BitTorrent extension for arbitrary DHT store</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>libtorrent Examples</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title></title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com Ludvig Strigeus, ludde@utorrent.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>libtorrent manual</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>libtorrent hacking</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>projects using libtorrent</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/rst.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>libtorrent python binding</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -55,11 +55,11 @@
|
|||
<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="#invalid-encoding" id="id54">invalid_encoding</a></li>
|
||||
<li><a class="reference internal" href="#type-error" id="id55">type_error</a></li>
|
||||
<li><a class="reference internal" href="#entry" id="id56">entry</a></li>
|
||||
<li><a class="reference internal" href="#pascal-string" id="id57">pascal_string</a></li>
|
||||
<li><a class="reference internal" href="#lazy-entry" id="id58">lazy_entry</a></li>
|
||||
<li><a class="reference internal" href="#invalid-encoding" id="id55">invalid_encoding</a></li>
|
||||
<li><a class="reference internal" href="#type-error" id="id56">type_error</a></li>
|
||||
<li><a class="reference internal" href="#entry" id="id57">entry</a></li>
|
||||
<li><a class="reference internal" href="#pascal-string" id="id58">pascal_string</a></li>
|
||||
<li><a class="reference internal" href="#lazy-entry" id="id59">lazy_entry</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>Bencoding is a common representation in bittorrent used for
|
||||
|
@ -768,6 +768,16 @@ is a reference to an <tt class="docutils literal">error_code</tt> which is set t
|
|||
in case the function fails. <tt class="docutils literal">error_pos</tt> is an optional pointer to an int,
|
||||
which will be set to the byte offset into the buffer where an error occurred,
|
||||
in case the function fails.</p>
|
||||
<a name="print_entry()"></a></div>
|
||||
<div class="section" id="print-entry">
|
||||
<h2>print_entry()</h2>
|
||||
<p>Declared in "<a class="reference external" href="../include/libtorrent/lazy_entry.hpp">libtorrent/lazy_entry.hpp</a>"</p>
|
||||
<pre class="literal-block">
|
||||
std::string <strong>print_entry</strong> (lazy_entry const& e
|
||||
, bool single_line = false, int indent = 0);
|
||||
</pre>
|
||||
<p>print the bencoded structure in a human-readable format to a stting
|
||||
that's returned.</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -55,15 +55,16 @@
|
|||
<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="#disk-buffer-holder" id="id175">disk_buffer_holder</a></li>
|
||||
<li><a class="reference internal" href="#peer-info" id="id176">peer_info</a></li>
|
||||
<li><a class="reference internal" href="#peer-request" id="id177">peer_request</a></li>
|
||||
<li><a class="reference internal" href="#block-info" id="id178">block_info</a></li>
|
||||
<li><a class="reference internal" href="#partial-piece-info" id="id179">partial_piece_info</a></li>
|
||||
<li><a class="reference internal" href="#torrent-handle" id="id180">torrent_handle</a></li>
|
||||
<li><a class="reference internal" href="#torrent-status" id="id181">torrent_status</a></li>
|
||||
<li><a class="reference internal" href="#announce-entry" id="id182">announce_entry</a></li>
|
||||
<li><a class="reference internal" href="#torrent-info" id="id183">torrent_info</a></li>
|
||||
<li><a class="reference internal" href="#disk-buffer-holder" id="id186">disk_buffer_holder</a></li>
|
||||
<li><a class="reference internal" href="#hasher" id="id187">hasher</a></li>
|
||||
<li><a class="reference internal" href="#peer-info" id="id188">peer_info</a></li>
|
||||
<li><a class="reference internal" href="#peer-request" id="id189">peer_request</a></li>
|
||||
<li><a class="reference internal" href="#block-info" id="id190">block_info</a></li>
|
||||
<li><a class="reference internal" href="#partial-piece-info" id="id191">partial_piece_info</a></li>
|
||||
<li><a class="reference internal" href="#torrent-handle" id="id192">torrent_handle</a></li>
|
||||
<li><a class="reference internal" href="#torrent-status" id="id193">torrent_status</a></li>
|
||||
<li><a class="reference internal" href="#announce-entry" id="id194">announce_entry</a></li>
|
||||
<li><a class="reference internal" href="#torrent-info" id="id195">torrent_info</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<a name="disk_buffer_holder"></a><div class="section" id="disk-buffer-holder">
|
||||
|
@ -133,6 +134,68 @@ disk buffer, it will first be freed.</p>
|
|||
void <strong>swap</strong> (disk_buffer_holder& h);
|
||||
</pre>
|
||||
<p>swap pointers of two disk buffer holders.</p>
|
||||
<a name="hasher"></a></div>
|
||||
</div>
|
||||
<div class="section" id="hasher">
|
||||
<h1>hasher</h1>
|
||||
<p>Declared in "<a class="reference external" href="../include/libtorrent/hasher.hpp">libtorrent/hasher.hpp</a>"</p>
|
||||
<p>this is a SHA-1 hash class.</p>
|
||||
<p>You use it by first instantiating it, then call <tt class="docutils literal">update()</tt> to feed it
|
||||
with data. i.e. you don't have to keep the entire buffer of which you want to
|
||||
create the hash in memory. You can feed the <a class="reference external" href="reference-Core.html#hasher">hasher</a> parts of it at a time. When
|
||||
You have fed the <a class="reference external" href="reference-Core.html#hasher">hasher</a> with all the data, you call <tt class="docutils literal">final()</tt> and it
|
||||
will return the sha1-hash of the data.</p>
|
||||
<p>The constructor that takes a <tt class="docutils literal">char const*</tt> and an integer will construct the
|
||||
sha1 context and feed it the data passed in.</p>
|
||||
<p>If you want to reuse the <a class="reference external" href="reference-Core.html#hasher">hasher</a> object once you have created a hash, you have to
|
||||
call <tt class="docutils literal">reset()</tt> to reinitialize it.</p>
|
||||
<p>The sha1-algorithm used was implemented by Steve Reid and released as public domain.
|
||||
For more info, see <tt class="docutils literal">src/sha1.cpp</tt>.</p>
|
||||
<pre class="literal-block">
|
||||
class hasher
|
||||
{
|
||||
<strong>hasher</strong> ();
|
||||
<strong>hasher</strong> (const char* data, int len);
|
||||
hasher& <strong>operator=</strong> (hasher const& h);
|
||||
<strong>hasher</strong> (hasher const& h);
|
||||
hasher& <strong>update</strong> (std::string const& data);
|
||||
hasher& <strong>update</strong> (const char* data, int len);
|
||||
sha1_hash <strong>final</strong> ();
|
||||
void <strong>reset</strong> ();
|
||||
<strong>~hasher</strong> ();
|
||||
};
|
||||
</pre>
|
||||
<a name="hasher()"></a><div class="section" id="id9">
|
||||
<h2>hasher()</h2>
|
||||
<pre class="literal-block">
|
||||
<strong>hasher</strong> (const char* data, int len);
|
||||
</pre>
|
||||
<p>this is the same as default constructing followed by a call to
|
||||
<tt class="docutils literal">update(data, len)</tt>.</p>
|
||||
<a name="update()"></a></div>
|
||||
<div class="section" id="update">
|
||||
<h2>update()</h2>
|
||||
<pre class="literal-block">
|
||||
hasher& <strong>update</strong> (std::string const& data);
|
||||
hasher& <strong>update</strong> (const char* data, int len);
|
||||
</pre>
|
||||
<p>append the following bytes to what is being hashed</p>
|
||||
<a name="final()"></a></div>
|
||||
<div class="section" id="final">
|
||||
<h2>final()</h2>
|
||||
<pre class="literal-block">
|
||||
sha1_hash <strong>final</strong> ();
|
||||
</pre>
|
||||
<p>returns the SHA-1 digest of the buffers previously passed to
|
||||
<a class="reference external" href="reference-Core.html#update()">update()</a> and the <a class="reference external" href="reference-Core.html#hasher">hasher</a> constructor.</p>
|
||||
<a name="reset()"></a></div>
|
||||
<div class="section" id="id12">
|
||||
<h2>reset()</h2>
|
||||
<pre class="literal-block">
|
||||
void <strong>reset</strong> ();
|
||||
</pre>
|
||||
<p>restore the <a class="reference external" href="reference-Core.html#hasher">hasher</a> state to be as if the <a class="reference external" href="reference-Core.html#hasher">hasher</a> has just been
|
||||
default constructed.</p>
|
||||
<a name="peer_info"></a></div>
|
||||
</div>
|
||||
<div class="section" id="peer-info">
|
||||
|
@ -1049,6 +1112,9 @@ struct torrent_handle
|
|||
, std::string const& private_key
|
||||
, std::string const& dh_params
|
||||
, std::string const& passphrase = "");
|
||||
void <strong>set_ssl_certificate_buffer</strong> (std::string const& certificate
|
||||
, std::string const& private_key
|
||||
, std::string const& dh_params);
|
||||
storage_interface* <strong>get_storage_impl</strong> () const;
|
||||
boost::intrusive_ptr<torrent_info const> <strong>torrent_file</strong> () const;
|
||||
void <strong>use_interface</strong> (const char* net_interface) const;
|
||||
|
@ -1124,7 +1190,7 @@ struct torrent_handle
|
|||
};
|
||||
};
|
||||
</pre>
|
||||
<a name="torrent_handle()"></a><div class="section" id="id26">
|
||||
<a name="torrent_handle()"></a><div class="section" id="id36">
|
||||
<h2>torrent_handle()</h2>
|
||||
<pre class="literal-block">
|
||||
<strong>torrent_handle</strong> ();
|
||||
|
@ -1668,18 +1734,26 @@ for the peers of this torrent. It defaults to false. If it is set to
|
|||
true, the <a class="reference external" href="reference-Core.html#peer_info">peer_info</a> structure for the peers in this torrent will have
|
||||
their <tt class="docutils literal">country</tt> member set. See <a class="reference external" href="reference-Core.html#peer_info">peer_info</a> for more information on
|
||||
how to interpret this field.</p>
|
||||
<a name="set_ssl_certificate_buffer()"></a>
|
||||
<a name="set_ssl_certificate()"></a></div>
|
||||
<div class="section" id="set-ssl-certificate">
|
||||
<h2>set_ssl_certificate()</h2>
|
||||
<div class="section" id="set-ssl-certificate-buffer-set-ssl-certificate">
|
||||
<h2>set_ssl_certificate_buffer() set_ssl_certificate()</h2>
|
||||
<pre class="literal-block">
|
||||
void <strong>set_ssl_certificate</strong> (std::string const& certificate
|
||||
, std::string const& private_key
|
||||
, std::string const& dh_params
|
||||
, std::string const& passphrase = "");
|
||||
void <strong>set_ssl_certificate_buffer</strong> (std::string const& certificate
|
||||
, std::string const& private_key
|
||||
, std::string const& dh_params);
|
||||
</pre>
|
||||
<p>For SSL torrents, use this to specify a path to a .pem file to use as
|
||||
this client's certificate. The certificate must be signed by the
|
||||
certificate in the .torrent file to be valid.</p>
|
||||
<p>The <a class="reference external" href="reference-Core.html#set_ssl_certificate_buffer()">set_ssl_certificate_buffer()</a> overload takes the actual certificate,
|
||||
private key and DH params as strings, rather than paths to files. This
|
||||
overload is only available when libtorrent is built against boost
|
||||
1.54 or later.</p>
|
||||
<p><tt class="docutils literal">cert</tt> is a path to the (signed) certificate in .pem format
|
||||
corresponding to this torrent.</p>
|
||||
<p><tt class="docutils literal">private_key</tt> is a path to the private key for the specified
|
||||
|
@ -2317,7 +2391,7 @@ struct torrent_status
|
|||
sha1_hash info_hash;
|
||||
};
|
||||
</pre>
|
||||
<a name="operator==()"></a><div class="section" id="id110">
|
||||
<a name="operator==()"></a><div class="section" id="id121">
|
||||
<h2>operator==()</h2>
|
||||
<pre class="literal-block">
|
||||
bool <strong>operator==</strong> (torrent_status const& st) const;
|
||||
|
@ -2325,7 +2399,7 @@ bool <strong>operator==</strong> (torrent_status const& st) const;
|
|||
<p>compres if the torrent status objects come from the same torrent. i.e.
|
||||
only the <a class="reference external" href="reference-Core.html#torrent_handle">torrent_handle</a> field is compared.</p>
|
||||
<a name="state_t"></a></div>
|
||||
<div class="section" id="id112">
|
||||
<div class="section" id="id123">
|
||||
<h2>enum state_t</h2>
|
||||
<p>Declared in "<a class="reference external" href="../include/libtorrent/torrent_handle.hpp">libtorrent/torrent_handle.hpp</a>"</p>
|
||||
<table border="1" class="docutils">
|
||||
|
@ -2875,7 +2949,7 @@ allowed to force another tracker update with this tracker.</p>
|
|||
<p>If the last time this tracker was contacted failed, <tt class="docutils literal">last_error</tt> is the error
|
||||
code describing what error occurred.</p>
|
||||
<a name="reset()"></a></div>
|
||||
<div class="section" id="id133">
|
||||
<div class="section" id="id144">
|
||||
<h2>reset()</h2>
|
||||
<pre class="literal-block">
|
||||
void <strong>reset</strong> ();
|
||||
|
@ -3091,7 +3165,7 @@ class torrent_info : public intrusive_ptr_base<torrent_info>
|
|||
bool <strong>is_merkle_torrent</strong> () const;
|
||||
};
|
||||
</pre>
|
||||
<a name="torrent_info()"></a><div class="section" id="id137">
|
||||
<a name="torrent_info()"></a><div class="section" id="id148">
|
||||
<h2>torrent_info()</h2>
|
||||
<pre class="literal-block">
|
||||
<strong>torrent_info</strong> (std::string const& filename, int flags = 0);
|
||||
|
@ -3123,7 +3197,7 @@ always throw if an error occurs. These overloads are not available when building
|
|||
exception support.</p>
|
||||
<p>The <tt class="docutils literal">flags</tt> argument is currently unused.</p>
|
||||
<a name="~torrent_info()"></a></div>
|
||||
<div class="section" id="id145">
|
||||
<div class="section" id="id156">
|
||||
<h2>~torrent_info()</h2>
|
||||
<pre class="literal-block">
|
||||
<strong>~torrent_info</strong> ();
|
||||
|
@ -3148,7 +3222,7 @@ names. Filename may be chaged using <tt class="docutils literal"><span class="pr
|
|||
<p>For more information on the <a class="reference external" href="reference-Storage.html#file_storage">file_storage</a> object, see the separate document on how
|
||||
to create torrents.</p>
|
||||
<a name="rename_file()"></a></div>
|
||||
<div class="section" id="id151">
|
||||
<div class="section" id="id162">
|
||||
<h2>rename_file()</h2>
|
||||
<pre class="literal-block">
|
||||
void <strong>rename_file</strong> (int index, std::string const& new_filename);
|
||||
|
@ -3233,7 +3307,7 @@ the piece index as argument and gives you the exact size of that piece. It will
|
|||
be the same as <tt class="docutils literal">piece_length()</tt> except in the case of the last piece, which may
|
||||
be smaller.</p>
|
||||
<a name="info_hash()"></a></div>
|
||||
<div class="section" id="id158">
|
||||
<div class="section" id="id169">
|
||||
<h2>info_hash()</h2>
|
||||
<pre class="literal-block">
|
||||
const sha1_hash& <strong>info_hash</strong> () const;
|
||||
|
@ -3280,7 +3354,7 @@ std::string <strong>ssl_cert</strong> () const;
|
|||
torrent. Otherwise returns an empty string. The certificate is
|
||||
the the public certificate in x509 format.</p>
|
||||
<a name="is_valid()"></a></div>
|
||||
<div class="section" id="id161">
|
||||
<div class="section" id="id172">
|
||||
<h2>is_valid()</h2>
|
||||
<pre class="literal-block">
|
||||
bool <strong>is_valid</strong> () const;
|
||||
|
@ -3393,7 +3467,7 @@ lazy_entry const* <strong>info</strong> (char const* key) const;
|
|||
It can be used to access extension values put in the .torrent file. If the specified
|
||||
key cannot be found, it returns NULL.</p>
|
||||
<a name="swap()"></a></div>
|
||||
<div class="section" id="id166">
|
||||
<div class="section" id="id177">
|
||||
<h2>swap()</h2>
|
||||
<pre class="literal-block">
|
||||
void <strong>swap</strong> (torrent_info& ti);
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
<h1>Core</h1>
|
||||
<div class="line-block">
|
||||
<div class="line"><a class="reference external" href="reference-Core.html#disk_buffer_holder">disk_buffer_holder</a></div>
|
||||
<div class="line"><a class="reference external" href="reference-Core.html#hasher">hasher</a></div>
|
||||
<div class="line"><a class="reference external" href="reference-Core.html#peer_info">peer_info</a></div>
|
||||
<div class="line"><a class="reference external" href="reference-Core.html#peer_request">peer_request</a></div>
|
||||
<div class="line"><a class="reference external" href="reference-Core.html#block_info">block_info</a></div>
|
||||
|
@ -113,6 +114,7 @@
|
|||
<div class="line"><a class="reference external" href="reference-Bencoding.html#bencode()">bencode()</a></div>
|
||||
<div class="line"><a class="reference external" href="reference-Utility.html#operator<<()">operator<<()</a></div>
|
||||
<div class="line"><a class="reference external" href="reference-Bencoding.html#lazy_bdecode()">lazy_bdecode()</a></div>
|
||||
<div class="line"><a class="reference external" href="reference-Bencoding.html#print_entry()">print_entry()</a></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="string">
|
||||
|
|
115
docs/todo.html
115
docs/todo.html
|
@ -24,7 +24,7 @@
|
|||
<span style="color: #f77">2 important</span>
|
||||
<span style="color: #3c3">6 relevant</span>
|
||||
<span style="color: #77f">13 feasible</span>
|
||||
<span style="color: #999">45 notes</span>
|
||||
<span style="color: #999">46 notes</span>
|
||||
<table width="100%" border="1" style="border-collapse: collapse;"><tr style="background: #fdd"><td>relevance 4</td><td><a href="javascript:expand(0)">../src/session_impl.cpp:666</a></td><td>in order to support SSL over uTP, the utp_socket manager either needs to be able to receive packets on multiple ports, or we need to peek into the first few bytes the payload stream of a socket to determine whether or not it's an SSL connection. (The former is simpler but won't do as well with NATs)</td></tr><tr id="0" style="display: none;" colspan="3"><td colspan="3"><h2>in order to support SSL over uTP, the utp_socket manager either
|
||||
needs to be able to receive packets on multiple ports, or we need to
|
||||
peek into the first few bytes the payload stream of a socket to determine
|
||||
|
@ -131,7 +131,7 @@ namespace libtorrent
|
|||
case integer16: *((boost::uint16_t*)dest) = boost::uint16_t(val); break;
|
||||
case integer: *((int*)dest) = int(val); break;
|
||||
case size_integer: *((size_type*)dest) = size_type(val); break;
|
||||
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(2)">../src/torrent.cpp:6111</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="2" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it</h2><h4>../src/torrent.cpp:6111</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
|
||||
</pre></td></tr><tr style="background: #fcc"><td>relevance 3</td><td><a href="javascript:expand(2)">../src/torrent.cpp:6151</a></td><td>if peer is a really good peer, maybe we shouldn't disconnect it</td></tr><tr id="2" style="display: none;" colspan="3"><td colspan="3"><h2>if peer is a really good peer, maybe we shouldn't disconnect it</h2><h4>../src/torrent.cpp:6151</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> return false;
|
||||
}
|
||||
TORRENT_ASSERT(m_connections.find(p) == m_connections.end());
|
||||
m_connections.insert(p);
|
||||
|
@ -283,9 +283,9 @@ when it doesn't have any of the file do the following</h2><h4>../src/web_peer_co
|
|||
TORRENT_TRY {
|
||||
buffer.resize(destlen);
|
||||
} TORRENT_CATCH(std::exception& e) {
|
||||
error = "out of memory";
|
||||
error = "out of memory: ";
|
||||
error += e.what();
|
||||
return true;
|
||||
}
|
||||
</pre></td></tr><tr style="background: #cfc"><td>relevance 2</td><td><a href="javascript:expand(5)">../src/policy.cpp:155</a></td><td>this could be optimized if SSE 4.2 is available. It could also be optimized given that we have a fixed length</td></tr><tr id="5" style="display: none;" colspan="3"><td colspan="3"><h2>this could be optimized if SSE 4.2 is
|
||||
available. It could also be optimized given
|
||||
that we have a fixed length</h2><h4>../src/policy.cpp:155</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // 4. if IPs are not in the same /16, mask the IPs by 0xffff5555, hash them
|
||||
|
@ -809,8 +809,8 @@ up to the highest written piece in each file</h2><h4>../src/torrent.cpp:1030</h4
|
|||
{
|
||||
int size = m_torrent_file->piece_size(r.piece);
|
||||
if (rp->fail)
|
||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(15)">../src/torrent.cpp:5372</a></td><td>save the send_stats state instead of throwing them away it may pose an issue when downgrading though</td></tr><tr id="15" style="display: none;" colspan="3"><td colspan="3"><h2>save the send_stats state instead of throwing them away
|
||||
it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:5372</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> ? (1 << k) : 0;
|
||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(15)">../src/torrent.cpp:5412</a></td><td>save the send_stats state instead of throwing them away it may pose an issue when downgrading though</td></tr><tr id="15" style="display: none;" colspan="3"><td colspan="3"><h2>save the send_stats state instead of throwing them away
|
||||
it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:5412</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> ? (1 << k) : 0;
|
||||
bitmask.append(1, v);
|
||||
TORRENT_ASSERT(bits == 8 || j == num_bitmask_bytes - 1);
|
||||
}
|
||||
|
@ -861,9 +861,9 @@ it may pose an issue when downgrading though</h2><h4>../src/torrent.cpp:5372</h4
|
|||
|
||||
// write have bitmask
|
||||
// the pieces string has one byte per piece. Each
|
||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(16)">../src/torrent.cpp:6279</a></td><td>should disconnect all peers that have the pieces we have not just seeds. It would be pretty expensive to check all pieces for all peers though</td></tr><tr id="16" style="display: none;" colspan="3"><td colspan="3"><h2>should disconnect all peers that have the pieces we have
|
||||
</pre></td></tr><tr style="background: #ccf"><td>relevance 1</td><td><a href="javascript:expand(16)">../src/torrent.cpp:6319</a></td><td>should disconnect all peers that have the pieces we have not just seeds. It would be pretty expensive to check all pieces for all peers though</td></tr><tr id="16" style="display: none;" colspan="3"><td colspan="3"><h2>should disconnect all peers that have the pieces we have
|
||||
not just seeds. It would be pretty expensive to check all pieces
|
||||
for all peers though</h2><h4>../src/torrent.cpp:6279</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(m_state != torrent_status::finished && m_state != torrent_status::seeding);
|
||||
for all peers though</h2><h4>../src/torrent.cpp:6319</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> TORRENT_ASSERT(m_state != torrent_status::finished && m_state != torrent_status::seeding);
|
||||
|
||||
set_state(torrent_status::finished);
|
||||
set_queue_position(-1);
|
||||
|
@ -1355,7 +1355,7 @@ remove all payload ranges that has been sent</h2><h4>../src/bt_peer_connection.c
|
|||
TORRENT_ASSERT(m_sent_handshake);
|
||||
}
|
||||
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(26)">../src/file.cpp:1400</a></td><td>is there any way to pre-fetch data from a file on windows?</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>is there any way to pre-fetch data from a file on windows?</h2><h4>../src/file.cpp:1400</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(26)">../src/file.cpp:1404</a></td><td>is there any way to pre-fetch data from a file on windows?</td></tr><tr id="26" style="display: none;" colspan="3"><td colspan="3"><h2>is there any way to pre-fetch data from a file on windows?</h2><h4>../src/file.cpp:1404</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
void file::init_file()
|
||||
{
|
||||
if (m_page_size != 0) return;
|
||||
|
@ -2475,12 +2475,12 @@ need to be verified to make sure its DN matches the info-hash</h2><h4>../src/tor
|
|||
{
|
||||
#if defined(TORRENT_VERBOSE_LOGGING) || defined(TORRENT_LOGGING)
|
||||
match = true;
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(49)">../src/torrent.cpp:5105</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info The mapped_files needs to be read both in the network thread and in the disk thread, since they both have their own mapped files structures which are kept in sync</td></tr><tr id="49" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(49)">../src/torrent.cpp:5145</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance maybe use the same format as .torrent files and reuse some code from torrent_info The mapped_files needs to be read both in the network thread and in the disk thread, since they both have their own mapped files structures which are kept in sync</td></tr><tr id="49" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
||||
renamed, but also if they have been merged into a single file for instance
|
||||
maybe use the same format as .torrent files and reuse some code from torrent_info
|
||||
The mapped_files needs to be read both in the network thread
|
||||
and in the disk thread, since they both have their own mapped files structures
|
||||
which are kept in sync</h2><h4>../src/torrent.cpp:5105</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_seed_mode) m_verified.resize(m_torrent_file->num_pieces(), false);
|
||||
which are kept in sync</h2><h4>../src/torrent.cpp:5145</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> if (m_seed_mode) m_verified.resize(m_torrent_file->num_pieces(), false);
|
||||
super_seeding(rd.dict_find_int_value("super_seeding", 0));
|
||||
|
||||
m_last_scrape = rd.dict_find_int_value("last_scrape", 0);
|
||||
|
@ -2531,12 +2531,12 @@ which are kept in sync</h2><h4>../src/torrent.cpp:5105</h4><pre style="backgroun
|
|||
{
|
||||
char const* p = piece_priority->string_ptr();
|
||||
for (int i = 0; i < piece_priority->string_length(); ++i)
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(50)">../src/torrent.cpp:5241</a></td><td>if this is a merkle torrent and we can't restore the tree, we need to wipe all the bits in the have array, but not necessarily we might want to do a full check to see if we have all the pieces. This is low priority since almost no one uses merkle torrents</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>if this is a merkle torrent and we can't
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(50)">../src/torrent.cpp:5281</a></td><td>if this is a merkle torrent and we can't restore the tree, we need to wipe all the bits in the have array, but not necessarily we might want to do a full check to see if we have all the pieces. This is low priority since almost no one uses merkle torrents</td></tr><tr id="50" style="display: none;" colspan="3"><td colspan="3"><h2>if this is a merkle torrent and we can't
|
||||
restore the tree, we need to wipe all the
|
||||
bits in the have array, but not necessarily
|
||||
we might want to do a full check to see if we have
|
||||
all the pieces. This is low priority since almost
|
||||
no one uses merkle torrents</h2><h4>../src/torrent.cpp:5241</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
|
||||
no one uses merkle torrents</h2><h4>../src/torrent.cpp:5281</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> add_web_seed(url, web_seed_entry::http_seed);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2587,9 +2587,9 @@ no one uses merkle torrents</h2><h4>../src/torrent.cpp:5241</h4><pre style="back
|
|||
ret["num_complete"] = m_complete;
|
||||
ret["num_incomplete"] = m_incomplete;
|
||||
ret["num_downloaded"] = m_downloaded;
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(51)">../src/torrent.cpp:5429</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance. using file_base</td></tr><tr id="51" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(51)">../src/torrent.cpp:5469</a></td><td>make this more generic to not just work if files have been renamed, but also if they have been merged into a single file for instance. using file_base</td></tr><tr id="51" style="display: none;" colspan="3"><td colspan="3"><h2>make this more generic to not just work if files have been
|
||||
renamed, but also if they have been merged into a single file for instance.
|
||||
using file_base</h2><h4>../src/torrent.cpp:5429</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> entry::string_type& pieces = ret["pieces"].string();
|
||||
using file_base</h2><h4>../src/torrent.cpp:5469</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> entry::string_type& pieces = ret["pieces"].string();
|
||||
pieces.resize(m_torrent_file->num_pieces());
|
||||
if (is_seed())
|
||||
{
|
||||
|
@ -2640,10 +2640,10 @@ using file_base</h2><h4>../src/torrent.cpp:5429</h4><pre style="background: #f6f
|
|||
error_code ec;
|
||||
policy::peer const* p = *i;
|
||||
address addr = p->address();
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(52)">../src/torrent.cpp:7965</a></td><td>go through the pieces we have and count the total number of downloaders we have. Only count peers that are interested in us since some peers might not send have messages for pieces we have it num_interested == 0, we need to pick a new piece</td></tr><tr id="52" style="display: none;" colspan="3"><td colspan="3"><h2>go through the pieces we have and count the total number
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(52)">../src/torrent.cpp:8005</a></td><td>go through the pieces we have and count the total number of downloaders we have. Only count peers that are interested in us since some peers might not send have messages for pieces we have it num_interested == 0, we need to pick a new piece</td></tr><tr id="52" style="display: none;" colspan="3"><td colspan="3"><h2>go through the pieces we have and count the total number
|
||||
of downloaders we have. Only count peers that are interested in us
|
||||
since some peers might not send have messages for pieces we have
|
||||
it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:7965</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||
it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:8005</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||
|
||||
rarest_pieces.clear();
|
||||
rarest_rarity = pp.peer_count;
|
||||
|
@ -2694,7 +2694,58 @@ it num_interested == 0, we need to pick a new piece</h2><h4>../src/torrent.cpp:7
|
|||
{
|
||||
m_picker->get_availability(avail_vec);
|
||||
}
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(53)">../src/udp_tracker_connection.cpp:550</a></td><td>it would be more efficient to not use a string here. however, the problem is that some trackers will respond with actual strings. For example i2p trackers</td></tr><tr id="53" style="display: none;" colspan="3"><td colspan="3"><h2>it would be more efficient to not use a string here.
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(53)">../src/udp_socket.cpp:292</a></td><td>it would be nice to detect this on posix systems also</td></tr><tr id="53" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to detect this on posix systems also</h2><h4>../src/udp_socket.cpp:292</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> --m_v6_outstanding;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
TORRENT_ASSERT(m_v4_outstanding > 0);
|
||||
--m_v4_outstanding;
|
||||
}
|
||||
|
||||
if (ec == asio::error::operation_aborted) return;
|
||||
if (m_abort) return;
|
||||
|
||||
CHECK_MAGIC;
|
||||
|
||||
for (;;)
|
||||
{
|
||||
error_code ec;
|
||||
udp::endpoint ep;
|
||||
size_t bytes_transferred = s->receive_from(asio::buffer(m_buf, m_buf_size), ep, 0, ec);
|
||||
|
||||
<div style="background: #ffff00" width="100%">#ifdef TORRENT_WINDOWS
|
||||
</div> if ((ec == error_code(ERROR_MORE_DATA, get_system_category())
|
||||
|| ec == error_code(WSAEMSGSIZE, get_system_category()))
|
||||
&& m_buf_size < 65536)
|
||||
{
|
||||
// if this function fails to allocate memory, m_buf_size
|
||||
// is set to 0. In that case, don't issue the async_read().
|
||||
set_buf_size(m_buf_size * 2);
|
||||
if (m_buf_size == 0) return;
|
||||
continue;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ec == asio::error::would_block || ec == asio::error::try_again) break;
|
||||
on_read_impl(s, ep, ec, bytes_transferred);
|
||||
}
|
||||
call_drained_handler();
|
||||
setup_read(s);
|
||||
}
|
||||
|
||||
void udp_socket::call_handler(error_code const& ec, udp::endpoint const& ep, char const* buf, int size)
|
||||
{
|
||||
m_observers_locked = true;
|
||||
for (std::vector<udp_socket_observer*>::iterator i = m_observers.begin();
|
||||
i != m_observers.end();)
|
||||
{
|
||||
bool ret = false;
|
||||
TORRENT_TRY {
|
||||
ret = (*i)->incoming_packet(ec, ep, buf, size);
|
||||
} TORRENT_CATCH (std::exception&) {}
|
||||
if (*i == NULL) i = m_observers.erase(i);
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(54)">../src/udp_tracker_connection.cpp:550</a></td><td>it would be more efficient to not use a string here. however, the problem is that some trackers will respond with actual strings. For example i2p trackers</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>it would be more efficient to not use a string here.
|
||||
however, the problem is that some trackers will respond
|
||||
with actual strings. For example i2p trackers</h2><h4>../src/udp_tracker_connection.cpp:550</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> }
|
||||
|
||||
|
@ -2747,7 +2798,7 @@ with actual strings. For example i2p trackers</h2><h4>../src/udp_tracker_connect
|
|||
{
|
||||
restart_read_timeout();
|
||||
int action = detail::read_int32(buf);
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(54)">../src/upnp.cpp:65</a></td><td>listen_interface is not used. It's meant to bind the broadcast socket</td></tr><tr id="54" style="display: none;" colspan="3"><td colspan="3"><h2>listen_interface is not used. It's meant to bind the broadcast socket</h2><h4>../src/upnp.cpp:65</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(55)">../src/upnp.cpp:65</a></td><td>listen_interface is not used. It's meant to bind the broadcast socket</td></tr><tr id="55" style="display: none;" colspan="3"><td colspan="3"><h2>listen_interface is not used. It's meant to bind the broadcast socket</h2><h4>../src/upnp.cpp:65</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
#if defined TORRENT_ASIO_DEBUGGING
|
||||
#include "libtorrent/debug.hpp"
|
||||
#endif
|
||||
|
@ -2798,7 +2849,7 @@ static error_code ec;
|
|||
m_mappings.swap(s->mappings);
|
||||
delete s;
|
||||
}
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(55)">../src/utp_stream.cpp:1606</a></td><td>this loop may not be very efficient</td></tr><tr id="55" style="display: none;" colspan="3"><td colspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1606</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(56)">../src/utp_stream.cpp:1606</a></td><td>this loop may not be very efficient</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>this loop may not be very efficient</h2><h4>../src/utp_stream.cpp:1606</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
char* m_buf;
|
||||
};
|
||||
|
||||
|
@ -2849,7 +2900,7 @@ bool utp_socket_impl::send_pkt(int flags)
|
|||
if (sack > 32) sack = 32;
|
||||
}
|
||||
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(56)">../src/kademlia/dht_tracker.cpp:428</a></td><td>ideally this function would be called when the put completes</td></tr><tr id="56" style="display: none;" colspan="3"><td colspan="3"><h2>ideally this function would be called when the
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(57)">../src/kademlia/dht_tracker.cpp:428</a></td><td>ideally this function would be called when the put completes</td></tr><tr id="57" style="display: none;" colspan="3"><td colspan="3"><h2>ideally this function would be called when the
|
||||
put completes</h2><h4>../src/kademlia/dht_tracker.cpp:428</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // since it controls whether we re-put the content
|
||||
TORRENT_ASSERT(!it.is_mutable());
|
||||
f(it);
|
||||
|
@ -2901,7 +2952,7 @@ put completes</h2><h4>../src/kademlia/dht_tracker.cpp:428</h4><pre style="backgr
|
|||
std::string flat_data;
|
||||
bencode(std::back_inserter(flat_data), data);
|
||||
sha1_hash target = item_target_id(
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(57)">../src/kademlia/routing_table.cpp:293</a></td><td>instad of refreshing a bucket by using find_nodes, ping each node periodically</td></tr><tr id="57" style="display: none;" colspan="3"><td colspan="3"><h2>instad of refreshing a bucket by using find_nodes,
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(58)">../src/kademlia/routing_table.cpp:293</a></td><td>instad of refreshing a bucket by using find_nodes, ping each node periodically</td></tr><tr id="58" style="display: none;" colspan="3"><td colspan="3"><h2>instad of refreshing a bucket by using find_nodes,
|
||||
ping each node periodically</h2><h4>../src/kademlia/routing_table.cpp:293</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> os << "]\n";
|
||||
}
|
||||
}
|
||||
|
@ -2953,7 +3004,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
|||
node_id mask = generate_prefix_mask(num_bits);
|
||||
|
||||
// target = (target & ~mask) | (root & mask)
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(58)">../include/libtorrent/config.hpp:327</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="58" style="display: none;" colspan="3"><td colspan="3"><h2>Make this count Unicode characters instead of bytes on windows</h2><h4>../include/libtorrent/config.hpp:327</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(59)">../include/libtorrent/config.hpp:327</a></td><td>Make this count Unicode characters instead of bytes on windows</td></tr><tr id="59" style="display: none;" colspan="3"><td colspan="3"><h2>Make this count Unicode characters instead of bytes on windows</h2><h4>../include/libtorrent/config.hpp:327</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
// ==== eCS(OS/2) ===
|
||||
#elif defined __OS2__
|
||||
#define TORRENT_OS2
|
||||
|
@ -3004,7 +3055,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
|||
#include <stdarg.h>
|
||||
|
||||
// internal
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(59)">../include/libtorrent/peer_connection.hpp:725</a></td><td>make this private</td></tr><tr id="59" style="display: none;" colspan="3"><td colspan="3"><h2>make this private</h2><h4>../include/libtorrent/peer_connection.hpp:725</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void set_soft_packet_size(int size) { m_soft_packet_size = size; }
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(60)">../include/libtorrent/peer_connection.hpp:725</a></td><td>make this private</td></tr><tr id="60" style="display: none;" colspan="3"><td colspan="3"><h2>make this private</h2><h4>../include/libtorrent/peer_connection.hpp:725</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> void set_soft_packet_size(int size) { m_soft_packet_size = size; }
|
||||
|
||||
// if allow_encrypted is false, and the torrent 'ih' turns out
|
||||
// to be an encrypted torrent (AES-256 encrypted) the peer will
|
||||
|
@ -3055,7 +3106,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
|||
// we have choked the upload to the peer
|
||||
bool m_choked:1;
|
||||
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(60)">../include/libtorrent/peer_connection.hpp:806</a></td><td>make these private as well</td></tr><tr id="60" style="display: none;" colspan="3"><td colspan="3"><h2>make these private as well</h2><h4>../include/libtorrent/peer_connection.hpp:806</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(61)">../include/libtorrent/peer_connection.hpp:806</a></td><td>make these private as well</td></tr><tr id="61" style="display: none;" colspan="3"><td colspan="3"><h2>make these private as well</h2><h4>../include/libtorrent/peer_connection.hpp:806</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
// when this is set, the peer_connection socket is
|
||||
// corked, similar to the linux TCP feature TCP_CORK.
|
||||
// we won't send anything to the actual socket, just
|
||||
|
@ -3106,7 +3157,7 @@ bool compare_bucket_refresh(routing_table_node const& lhs, routing_table_nod
|
|||
sliding_average<20> m_send_rate;
|
||||
|
||||
private:
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(61)">../include/libtorrent/proxy_base.hpp:166</a></td><td>it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);</td></tr><tr id="61" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to remember the bind port and bind once we know where the proxy is
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(62)">../include/libtorrent/proxy_base.hpp:166</a></td><td>it would be nice to remember the bind port and bind once we know where the proxy is m_sock.bind(endpoint, ec);</td></tr><tr id="62" style="display: none;" colspan="3"><td colspan="3"><h2>it would be nice to remember the bind port and bind once we know where the proxy is
|
||||
m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> {
|
||||
return m_sock.get_option(opt, ec);
|
||||
}
|
||||
|
@ -3158,7 +3209,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
|
|||
m_sock.close(ec);
|
||||
m_resolver.cancel();
|
||||
}
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(62)">../include/libtorrent/stat.hpp:113</a></td><td>this is 4 bytes of padding!</td></tr><tr id="62" style="display: none;" colspan="3"><td colspan="3"><h2>this is 4 bytes of padding!</h2><h4>../include/libtorrent/stat.hpp:113</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(63)">../include/libtorrent/stat.hpp:113</a></td><td>this is 4 bytes of padding!</td></tr><tr id="63" style="display: none;" colspan="3"><td colspan="3"><h2>this is 4 bytes of padding!</h2><h4>../include/libtorrent/stat.hpp:113</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
int counter() const { return m_counter; }
|
||||
|
||||
void clear()
|
||||
|
@ -3209,7 +3260,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
|
|||
#endif
|
||||
}
|
||||
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(63)">../include/libtorrent/torrent.hpp:1333</a></td><td>there's space for another bit here</td></tr><tr id="63" style="display: none;" colspan="3"><td colspan="3"><h2>there's space for another bit here</h2><h4>../include/libtorrent/torrent.hpp:1333</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(64)">../include/libtorrent/torrent.hpp:1336</a></td><td>there's space for another bit here</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>there's space for another bit here</h2><h4>../include/libtorrent/torrent.hpp:1336</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
// these represent whether or not this torrent is counted
|
||||
// in the total counters of active seeds and downloads
|
||||
// in the session.
|
||||
|
@ -3260,7 +3311,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
|
|||
|
||||
// if this is true, libtorrent may pause and resume
|
||||
// this torrent depending on queuing rules. Torrents
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(64)">../include/libtorrent/torrent_info.hpp:123</a></td><td>include the number of peers received from this tracker, at last announce</td></tr><tr id="64" style="display: none;" colspan="3"><td colspan="3"><h2>include the number of peers received from this tracker, at last announce</h2><h4>../include/libtorrent/torrent_info.hpp:123</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(65)">../include/libtorrent/torrent_info.hpp:123</a></td><td>include the number of peers received from this tracker, at last announce</td></tr><tr id="65" style="display: none;" colspan="3"><td colspan="3"><h2>include the number of peers received from this tracker, at last announce</h2><h4>../include/libtorrent/torrent_info.hpp:123</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">
|
||||
// if this tracker failed the last time it was contacted
|
||||
// this error code specifies what error occurred
|
||||
error_code last_error;
|
||||
|
@ -3311,7 +3362,7 @@ m_sock.bind(endpoint, ec);</h2><h4>../include/libtorrent/proxy_base.hpp:166</h4>
|
|||
// flags for the source bitmask, each indicating where
|
||||
// we heard about this tracker
|
||||
enum tracker_source
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(65)">../include/libtorrent/upnp.hpp:108</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="65" style="display: none;" colspan="3"><td colspan="3"><h2>support using the windows API for UPnP operations as well</h2><h4>../include/libtorrent/upnp.hpp:108</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // specific IP addres or DNS name
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(66)">../include/libtorrent/upnp.hpp:108</a></td><td>support using the windows API for UPnP operations as well</td></tr><tr id="66" style="display: none;" colspan="3"><td colspan="3"><h2>support using the windows API for UPnP operations as well</h2><h4>../include/libtorrent/upnp.hpp:108</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> // specific IP addres or DNS name
|
||||
remote_host_must_be_wildcard = 726,
|
||||
// ExternalPort must be a wildcard and cannot be a
|
||||
// specific port
|
||||
|
@ -3362,7 +3413,7 @@ public:
|
|||
// is -1, which means failure. There will not be any error alert notification for
|
||||
// mappings that fail with a -1 return value.
|
||||
int add_mapping(protocol_type p, int external_port, int local_port);
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(66)">../include/libtorrent/utp_stream.hpp:378</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="66" style="display: none;" colspan="3"><td colspan="3"><h2>implement blocking write. Low priority since it's not used (yet)</h2><h4>../include/libtorrent/utp_stream.hpp:378</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (typename Mutable_Buffers::const_iterator i = buffers.begin()
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(67)">../include/libtorrent/utp_stream.hpp:378</a></td><td>implement blocking write. Low priority since it's not used (yet)</td></tr><tr id="67" style="display: none;" colspan="3"><td colspan="3"><h2>implement blocking write. Low priority since it's not used (yet)</h2><h4>../include/libtorrent/utp_stream.hpp:378</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;"> for (typename Mutable_Buffers::const_iterator i = buffers.begin()
|
||||
, end(buffers.end()); i != end; ++i)
|
||||
{
|
||||
using asio::buffer_cast;
|
||||
|
@ -3413,7 +3464,7 @@ public:
|
|||
TORRENT_ASSERT(false);
|
||||
}
|
||||
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(67)">../include/libtorrent/kademlia/item.hpp:61</a></td><td>since this is a public function, it should probably be moved out of this header and into one with other public functions.</td></tr><tr id="67" style="display: none;" colspan="3"><td colspan="3"><h2>since this is a public function, it should probably be moved
|
||||
</pre></td></tr><tr style="background: #ccc"><td>relevance 0</td><td><a href="javascript:expand(68)">../include/libtorrent/kademlia/item.hpp:61</a></td><td>since this is a public function, it should probably be moved out of this header and into one with other public functions.</td></tr><tr id="68" style="display: none;" colspan="3"><td colspan="3"><h2>since this is a public function, it should probably be moved
|
||||
out of this header and into one with other public functions.</h2><h4>../include/libtorrent/kademlia/item.hpp:61</h4><pre style="background: #f6f6f6; border: solid 1px #ddd;">#include <boost/array.hpp>
|
||||
|
||||
namespace libtorrent { namespace dht
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>libtorrent manual</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>libtorrent manual</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>Bittorrent udp-tracker protocol extension</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
|
@ -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.10: http://docutils.sourceforge.net/" />
|
||||
<meta name="generator" content="Docutils 0.11: http://docutils.sourceforge.net/" />
|
||||
<title>libtorrent manual</title>
|
||||
<meta name="author" content="Arvid Norberg, arvid@rasterbar.com" />
|
||||
<link rel="stylesheet" type="text/css" href="../../css/base.css" />
|
||||
|
|
Loading…
Reference in New Issue