forked from premiere/premiere-libtorrent
*** empty log message ***
This commit is contained in:
parent
9154e37e3a
commit
953d4fb600
121
docs/manual.html
121
docs/manual.html
|
@ -56,70 +56,69 @@
|
||||||
<li><a class="reference" href="#set-upload-limit-set-download-limit" id="id49" name="id49">set_upload_limit() set_download_limit()</a></li>
|
<li><a class="reference" href="#set-upload-limit-set-download-limit" id="id49" name="id49">set_upload_limit() set_download_limit()</a></li>
|
||||||
<li><a class="reference" href="#pause-resume-is-paused" id="id50" name="id50">pause() resume() is_paused()</a></li>
|
<li><a class="reference" href="#pause-resume-is-paused" id="id50" name="id50">pause() resume() is_paused()</a></li>
|
||||||
<li><a class="reference" href="#is-seed" id="id51" name="id51">is_seed()</a></li>
|
<li><a class="reference" href="#is-seed" id="id51" name="id51">is_seed()</a></li>
|
||||||
<li><a class="reference" href="#num-complete-num-incomplete" id="id52" name="id52">num_complete() num_incomplete()</a></li>
|
<li><a class="reference" href="#has-metadata" id="id52" name="id52">has_metadata()</a></li>
|
||||||
<li><a class="reference" href="#has-metadata" id="id53" name="id53">has_metadata()</a></li>
|
<li><a class="reference" href="#set-tracker-login" id="id53" name="id53">set_tracker_login()</a></li>
|
||||||
<li><a class="reference" href="#set-tracker-login" id="id54" name="id54">set_tracker_login()</a></li>
|
<li><a class="reference" href="#use-interface" id="id54" name="id54">use_interface()</a></li>
|
||||||
<li><a class="reference" href="#use-interface" id="id55" name="id55">use_interface()</a></li>
|
<li><a class="reference" href="#info-hash" id="id55" name="id55">info_hash()</a></li>
|
||||||
<li><a class="reference" href="#info-hash" id="id56" name="id56">info_hash()</a></li>
|
<li><a class="reference" href="#id10" id="id56" name="id56">set_max_uploads() set_max_connections()</a></li>
|
||||||
<li><a class="reference" href="#id10" id="id57" name="id57">set_max_uploads() set_max_connections()</a></li>
|
<li><a class="reference" href="#write-resume-data" id="id57" name="id57">write_resume_data()</a></li>
|
||||||
<li><a class="reference" href="#write-resume-data" id="id58" name="id58">write_resume_data()</a></li>
|
<li><a class="reference" href="#metadata" id="id58" name="id58">metadata()</a></li>
|
||||||
<li><a class="reference" href="#metadata" id="id59" name="id59">metadata()</a></li>
|
<li><a class="reference" href="#id11" id="id59" name="id59">status()</a></li>
|
||||||
<li><a class="reference" href="#id11" id="id60" name="id60">status()</a></li>
|
<li><a class="reference" href="#get-download-queue" id="id60" name="id60">get_download_queue()</a></li>
|
||||||
<li><a class="reference" href="#get-download-queue" id="id61" name="id61">get_download_queue()</a></li>
|
<li><a class="reference" href="#get-peer-info" id="id61" name="id61">get_peer_info()</a></li>
|
||||||
<li><a class="reference" href="#get-peer-info" id="id62" name="id62">get_peer_info()</a></li>
|
<li><a class="reference" href="#get-torrent-info" id="id62" name="id62">get_torrent_info()</a></li>
|
||||||
<li><a class="reference" href="#get-torrent-info" id="id63" name="id63">get_torrent_info()</a></li>
|
<li><a class="reference" href="#is-valid" id="id63" name="id63">is_valid()</a></li>
|
||||||
<li><a class="reference" href="#is-valid" id="id64" name="id64">is_valid()</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a class="reference" href="#torrent-status" id="id65" name="id65">torrent_status</a></li>
|
<li><a class="reference" href="#torrent-status" id="id64" name="id64">torrent_status</a></li>
|
||||||
<li><a class="reference" href="#peer-info" id="id66" name="id66">peer_info</a></li>
|
<li><a class="reference" href="#peer-info" id="id65" name="id65">peer_info</a></li>
|
||||||
<li><a class="reference" href="#address" id="id67" name="id67">address</a></li>
|
<li><a class="reference" href="#address" id="id66" name="id66">address</a></li>
|
||||||
<li><a class="reference" href="#http-settings" id="id68" name="id68">http_settings</a></li>
|
<li><a class="reference" href="#http-settings" id="id67" name="id67">http_settings</a></li>
|
||||||
<li><a class="reference" href="#big-number" id="id69" name="id69">big_number</a></li>
|
<li><a class="reference" href="#big-number" id="id68" name="id68">big_number</a></li>
|
||||||
<li><a class="reference" href="#hasher" id="id70" name="id70">hasher</a></li>
|
<li><a class="reference" href="#hasher" id="id69" name="id69">hasher</a></li>
|
||||||
<li><a class="reference" href="#fingerprint" id="id71" name="id71">fingerprint</a></li>
|
<li><a class="reference" href="#fingerprint" id="id70" name="id70">fingerprint</a></li>
|
||||||
<li><a class="reference" href="#free-functions" id="id72" name="id72">free functions</a><ul>
|
<li><a class="reference" href="#free-functions" id="id71" name="id71">free functions</a><ul>
|
||||||
<li><a class="reference" href="#identify-client" id="id73" name="id73">identify_client()</a></li>
|
<li><a class="reference" href="#identify-client" id="id72" name="id72">identify_client()</a></li>
|
||||||
<li><a class="reference" href="#bdecode-bencode" id="id74" name="id74">bdecode() bencode()</a></li>
|
<li><a class="reference" href="#bdecode-bencode" id="id73" name="id73">bdecode() bencode()</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a class="reference" href="#alerts" id="id75" name="id75">alerts</a><ul>
|
<li><a class="reference" href="#alerts" id="id74" name="id74">alerts</a><ul>
|
||||||
<li><a class="reference" href="#listen-failed-alert" id="id76" name="id76">listen_failed_alert</a></li>
|
<li><a class="reference" href="#listen-failed-alert" id="id75" name="id75">listen_failed_alert</a></li>
|
||||||
<li><a class="reference" href="#file-error-alert" id="id77" name="id77">file_error_alert</a></li>
|
<li><a class="reference" href="#file-error-alert" id="id76" name="id76">file_error_alert</a></li>
|
||||||
<li><a class="reference" href="#tracker-alert" id="id78" name="id78">tracker_alert</a></li>
|
<li><a class="reference" href="#tracker-alert" id="id77" name="id77">tracker_alert</a></li>
|
||||||
<li><a class="reference" href="#hash-failed-alert" id="id79" name="id79">hash_failed_alert</a></li>
|
<li><a class="reference" href="#hash-failed-alert" id="id78" name="id78">hash_failed_alert</a></li>
|
||||||
<li><a class="reference" href="#peer-ban-alert" id="id80" name="id80">peer_ban_alert</a></li>
|
<li><a class="reference" href="#peer-ban-alert" id="id79" name="id79">peer_ban_alert</a></li>
|
||||||
<li><a class="reference" href="#peer-error-alert" id="id81" name="id81">peer_error_alert</a></li>
|
<li><a class="reference" href="#peer-error-alert" id="id80" name="id80">peer_error_alert</a></li>
|
||||||
<li><a class="reference" href="#invalid-request-alert" id="id82" name="id82">invalid_request_alert</a></li>
|
<li><a class="reference" href="#invalid-request-alert" id="id81" name="id81">invalid_request_alert</a></li>
|
||||||
<li><a class="reference" href="#torrent-finished-alert" id="id83" name="id83">torrent_finished_alert</a></li>
|
<li><a class="reference" href="#torrent-finished-alert" id="id82" name="id82">torrent_finished_alert</a></li>
|
||||||
<li><a class="reference" href="#metadata-received-alert" id="id84" name="id84">metadata_received_alert</a></li>
|
<li><a class="reference" href="#metadata-received-alert" id="id83" name="id83">metadata_received_alert</a></li>
|
||||||
<li><a class="reference" href="#dispatcher" id="id85" name="id85">dispatcher</a></li>
|
<li><a class="reference" href="#dispatcher" id="id84" name="id84">dispatcher</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a class="reference" href="#exceptions" id="id86" name="id86">exceptions</a><ul>
|
<li><a class="reference" href="#exceptions" id="id85" name="id85">exceptions</a><ul>
|
||||||
<li><a class="reference" href="#invalid-handle" id="id87" name="id87">invalid_handle</a></li>
|
<li><a class="reference" href="#invalid-handle" id="id86" name="id86">invalid_handle</a></li>
|
||||||
<li><a class="reference" href="#duplicate-torrent" id="id88" name="id88">duplicate_torrent</a></li>
|
<li><a class="reference" href="#duplicate-torrent" id="id87" name="id87">duplicate_torrent</a></li>
|
||||||
<li><a class="reference" href="#invalid-encoding" id="id89" name="id89">invalid_encoding</a></li>
|
<li><a class="reference" href="#invalid-encoding" id="id88" name="id88">invalid_encoding</a></li>
|
||||||
<li><a class="reference" href="#type-error" id="id90" name="id90">type_error</a></li>
|
<li><a class="reference" href="#type-error" id="id89" name="id89">type_error</a></li>
|
||||||
<li><a class="reference" href="#invalid-torrent-file" id="id91" name="id91">invalid_torrent_file</a></li>
|
<li><a class="reference" href="#invalid-torrent-file" id="id90" name="id90">invalid_torrent_file</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a class="reference" href="#examples" id="id92" name="id92">examples</a><ul>
|
<li><a class="reference" href="#examples" id="id91" name="id91">examples</a><ul>
|
||||||
<li><a class="reference" href="#dump-torrent" id="id93" name="id93">dump_torrent</a></li>
|
<li><a class="reference" href="#dump-torrent" id="id92" name="id92">dump_torrent</a></li>
|
||||||
<li><a class="reference" href="#simple-client" id="id94" name="id94">simple client</a></li>
|
<li><a class="reference" href="#simple-client" id="id93" name="id93">simple client</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a class="reference" href="#fast-resume" id="id95" name="id95">fast resume</a><ul>
|
<li><a class="reference" href="#fast-resume" id="id94" name="id94">fast resume</a><ul>
|
||||||
<li><a class="reference" href="#file-format" id="id96" name="id96">file format</a></li>
|
<li><a class="reference" href="#file-format" id="id95" name="id95">file format</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a class="reference" href="#extensions" id="id97" name="id97">extensions</a><ul>
|
<li><a class="reference" href="#extensions" id="id96" name="id96">extensions</a><ul>
|
||||||
<li><a class="reference" href="#chat-messages" id="id98" name="id98">chat messages</a></li>
|
<li><a class="reference" href="#chat-messages" id="id97" name="id97">chat messages</a></li>
|
||||||
<li><a class="reference" href="#metadata-from-peers" id="id99" name="id99">metadata from peers</a></li>
|
<li><a class="reference" href="#metadata-from-peers" id="id98" name="id98">metadata from peers</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><a class="reference" href="#filename-checks" id="id100" name="id100">filename checks</a></li>
|
<li><a class="reference" href="#filename-checks" id="id99" name="id99">filename checks</a></li>
|
||||||
<li><a class="reference" href="#acknowledgements" id="id101" name="id101">acknowledgements</a></li>
|
<li><a class="reference" href="#acknowledgements" id="id100" name="id100">acknowledgements</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="introduction">
|
<div class="section" id="introduction">
|
||||||
|
@ -988,20 +987,6 @@ bool is_seed() const;
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<p>Returns true if the torrent is in seed mode (i.e. if it has finished downloading).</p>
|
<p>Returns true if the torrent is in seed mode (i.e. if it has finished downloading).</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="num-complete-num-incomplete">
|
|
||||||
<h2><a name="num-complete-num-incomplete">num_complete() num_incomplete()</a></h2>
|
|
||||||
<blockquote>
|
|
||||||
<pre class="literal-block">
|
|
||||||
int num_complete() const;
|
|
||||||
int num_incomplete() const;
|
|
||||||
</pre>
|
|
||||||
</blockquote>
|
|
||||||
<p>These members returns the optional scrape data returned by the tracker in the announce response.
|
|
||||||
If the tracker did not return any scrape data the return value of these functions are -1. Note
|
|
||||||
that in some cases the tracker can return some scrape data, so there is no guarantee that all
|
|
||||||
functions returns -1 just because one of them do. <tt class="docutils literal"><span class="pre">num_complete()</span></tt> is the total number of
|
|
||||||
seeds in the swarm and <tt class="docutils literal"><span class="pre">num_incomplete()</span></tt> is the number of downloaders in the swarm.</p>
|
|
||||||
</div>
|
|
||||||
<div class="section" id="has-metadata">
|
<div class="section" id="has-metadata">
|
||||||
<h2><a name="has-metadata">has_metadata()</a></h2>
|
<h2><a name="has-metadata">has_metadata()</a></h2>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
|
@ -1221,6 +1206,9 @@ struct torrent_status
|
||||||
|
|
||||||
int num_peers;
|
int num_peers;
|
||||||
|
|
||||||
|
int num_complete;
|
||||||
|
int num_incomplete;
|
||||||
|
|
||||||
const std::vector<bool>* pieces;
|
const std::vector<bool>* pieces;
|
||||||
size_type total_done;
|
size_type total_done;
|
||||||
|
|
||||||
|
@ -1289,6 +1277,11 @@ total transfer rate of payload only, not counting protocol chatter. This might
|
||||||
be slightly smaller than the other rates, but if projected over a long time
|
be slightly smaller than the other rates, but if projected over a long time
|
||||||
(e.g. when calculating ETA:s) the difference may be noticable.</p>
|
(e.g. when calculating ETA:s) the difference may be noticable.</p>
|
||||||
<p><tt class="docutils literal"><span class="pre">num_peers</span></tt> is the number of peers this torrent currently is connected to.</p>
|
<p><tt class="docutils literal"><span class="pre">num_peers</span></tt> is the number of peers this torrent currently is connected to.</p>
|
||||||
|
<p><tt class="docutils literal"><span class="pre">num_complete</span></tt> and <tt class="docutils literal"><span class="pre">num_incomplete</span></tt> are set to -1 if the tracker did not
|
||||||
|
send any scrape data in its announce reply. This data is optional and may
|
||||||
|
not be available from all trackers. If these are not -1, they are the total
|
||||||
|
number of peers that are seeding (complete) and the total number of peers
|
||||||
|
that are still downloading (incomplete) this torrent.</p>
|
||||||
<p><tt class="docutils literal"><span class="pre">total_done</span></tt> is the total number of bytes of the file(s) that we have. All
|
<p><tt class="docutils literal"><span class="pre">total_done</span></tt> is the total number of bytes of the file(s) that we have. All
|
||||||
this does not necessarily has to be downloaded during this session (that's
|
this does not necessarily has to be downloaded during this session (that's
|
||||||
<tt class="docutils literal"><span class="pre">total_download_payload</span></tt>).</p>
|
<tt class="docutils literal"><span class="pre">total_download_payload</span></tt>).</p>
|
||||||
|
|
|
@ -931,21 +931,6 @@ is_seed()
|
||||||
Returns true if the torrent is in seed mode (i.e. if it has finished downloading).
|
Returns true if the torrent is in seed mode (i.e. if it has finished downloading).
|
||||||
|
|
||||||
|
|
||||||
num_complete() num_incomplete()
|
|
||||||
-------------------------------
|
|
||||||
|
|
||||||
::
|
|
||||||
|
|
||||||
int num_complete() const;
|
|
||||||
int num_incomplete() const;
|
|
||||||
|
|
||||||
These members returns the optional scrape data returned by the tracker in the announce response.
|
|
||||||
If the tracker did not return any scrape data the return value of these functions are -1. Note
|
|
||||||
that in some cases the tracker can return some scrape data, so there is no guarantee that all
|
|
||||||
functions returns -1 just because one of them do. ``num_complete()`` is the total number of
|
|
||||||
seeds in the swarm and ``num_incomplete()`` is the number of downloaders in the swarm.
|
|
||||||
|
|
||||||
|
|
||||||
has_metadata()
|
has_metadata()
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
|
@ -1179,6 +1164,9 @@ It contains the following fields::
|
||||||
|
|
||||||
int num_peers;
|
int num_peers;
|
||||||
|
|
||||||
|
int num_complete;
|
||||||
|
int num_incomplete;
|
||||||
|
|
||||||
const std::vector<bool>* pieces;
|
const std::vector<bool>* pieces;
|
||||||
size_type total_done;
|
size_type total_done;
|
||||||
|
|
||||||
|
@ -1251,6 +1239,12 @@ be slightly smaller than the other rates, but if projected over a long time
|
||||||
|
|
||||||
``num_peers`` is the number of peers this torrent currently is connected to.
|
``num_peers`` is the number of peers this torrent currently is connected to.
|
||||||
|
|
||||||
|
``num_complete`` and ``num_incomplete`` are set to -1 if the tracker did not
|
||||||
|
send any scrape data in its announce reply. This data is optional and may
|
||||||
|
not be available from all trackers. If these are not -1, they are the total
|
||||||
|
number of peers that are seeding (complete) and the total number of peers
|
||||||
|
that are still downloading (incomplete) this torrent.
|
||||||
|
|
||||||
``total_done`` is the total number of bytes of the file(s) that we have. All
|
``total_done`` is the total number of bytes of the file(s) that we have. All
|
||||||
this does not necessarily has to be downloaded during this session (that's
|
this does not necessarily has to be downloaded during this session (that's
|
||||||
``total_download_payload``).
|
``total_download_payload``).
|
||||||
|
|
|
@ -150,12 +150,6 @@ namespace libtorrent
|
||||||
float ratio() const
|
float ratio() const
|
||||||
{ return m_ratio; }
|
{ return m_ratio; }
|
||||||
|
|
||||||
int num_complete() const
|
|
||||||
{ return m_complete; }
|
|
||||||
|
|
||||||
int num_incomplete() const
|
|
||||||
{ return m_incomplete; }
|
|
||||||
|
|
||||||
// --------------------------------------------
|
// --------------------------------------------
|
||||||
// PEER MANAGEMENT
|
// PEER MANAGEMENT
|
||||||
|
|
||||||
|
|
|
@ -85,6 +85,8 @@ namespace libtorrent
|
||||||
, download_payload_rate(0)
|
, download_payload_rate(0)
|
||||||
, upload_payload_rate(0)
|
, upload_payload_rate(0)
|
||||||
, num_peers(0)
|
, num_peers(0)
|
||||||
|
, num_complete(-1)
|
||||||
|
, num_incomplete(-1)
|
||||||
, pieces(0)
|
, pieces(0)
|
||||||
, total_done(0)
|
, total_done(0)
|
||||||
, num_seeds(0)
|
, num_seeds(0)
|
||||||
|
@ -137,6 +139,14 @@ namespace libtorrent
|
||||||
// is connected to.
|
// is connected to.
|
||||||
int num_peers;
|
int num_peers;
|
||||||
|
|
||||||
|
// if the tracker sends scrape info in its
|
||||||
|
// announce reply, these fields will be
|
||||||
|
// set to the total number of peers that
|
||||||
|
// have the whole file and the total number
|
||||||
|
// of peers that are still downloading
|
||||||
|
int num_complete;
|
||||||
|
int num_incomplete;
|
||||||
|
|
||||||
const std::vector<bool>* pieces;
|
const std::vector<bool>* pieces;
|
||||||
|
|
||||||
// the number of bytes of the file we have
|
// the number of bytes of the file we have
|
||||||
|
@ -197,12 +207,6 @@ namespace libtorrent
|
||||||
void pause();
|
void pause();
|
||||||
void resume();
|
void resume();
|
||||||
|
|
||||||
// interface for requesting tracker scrape data
|
|
||||||
// from tha last tracker announce response
|
|
||||||
// (optional, only sent by some trackers)
|
|
||||||
int num_complete() const;
|
|
||||||
int num_incomplete() const;
|
|
||||||
|
|
||||||
// set the interface to bind outgoing connections
|
// set the interface to bind outgoing connections
|
||||||
// to.
|
// to.
|
||||||
void use_interface(const char* net_interface);
|
void use_interface(const char* net_interface);
|
||||||
|
|
|
@ -158,6 +158,7 @@ namespace
|
||||||
, map_entry("AR", "Arctic Torrent")
|
, map_entry("AR", "Arctic Torrent")
|
||||||
, map_entry("AZ", "Azureus")
|
, map_entry("AZ", "Azureus")
|
||||||
, map_entry("BB", "BitBuddy")
|
, map_entry("BB", "BitBuddy")
|
||||||
|
, map_entry("BS", "BTSlave")
|
||||||
, map_entry("BX", "BittorrentX")
|
, map_entry("BX", "BittorrentX")
|
||||||
, map_entry("CT", "CTorrent")
|
, map_entry("CT", "CTorrent")
|
||||||
, map_entry("LT", "libtorrent")
|
, map_entry("LT", "libtorrent")
|
||||||
|
@ -170,6 +171,7 @@ namespace
|
||||||
, map_entry("TS", "TorrentStorm")
|
, map_entry("TS", "TorrentStorm")
|
||||||
, map_entry("U", "UPnP")
|
, map_entry("U", "UPnP")
|
||||||
, map_entry("XT", "XanTorrent")
|
, map_entry("XT", "XanTorrent")
|
||||||
|
, map_entry("ZT", "ZipTorrent")
|
||||||
, map_entry("eX", "eXeem")
|
, map_entry("eX", "eXeem")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -978,6 +978,8 @@ namespace libtorrent
|
||||||
|
|
||||||
st.block_size = block_size();
|
st.block_size = block_size();
|
||||||
st.num_peers = num_peers();
|
st.num_peers = num_peers();
|
||||||
|
st.num_complete = m_complete;
|
||||||
|
st.num_incomplete = m_incomplete;
|
||||||
st.paused = m_paused;
|
st.paused = m_paused;
|
||||||
st.total_done = bytes_done();
|
st.total_done = bytes_done();
|
||||||
|
|
||||||
|
|
|
@ -271,21 +271,6 @@ namespace libtorrent
|
||||||
, bind(&torrent::resume, _1));
|
, bind(&torrent::resume, _1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int torrent_handle::num_complete() const
|
|
||||||
{
|
|
||||||
INVARIANT_CHECK;
|
|
||||||
return call_member<int>(m_ses, m_chk, m_info_hash
|
|
||||||
, bind(&torrent::num_complete, _1));
|
|
||||||
}
|
|
||||||
|
|
||||||
int torrent_handle::num_incomplete() const
|
|
||||||
{
|
|
||||||
INVARIANT_CHECK;
|
|
||||||
return call_member<int>(m_ses, m_chk, m_info_hash
|
|
||||||
, bind(&torrent::num_incomplete, _1));
|
|
||||||
}
|
|
||||||
|
|
||||||
void torrent_handle::set_tracker_login(std::string const& name, std::string const& password)
|
void torrent_handle::set_tracker_login(std::string const& name, std::string const& password)
|
||||||
{
|
{
|
||||||
INVARIANT_CHECK;
|
INVARIANT_CHECK;
|
||||||
|
|
Loading…
Reference in New Issue