forked from premiere/premiere-libtorrent
added num_connections, num_uploads, upload_rate_limit and download_rate_limit. Added building from cvs section.
This commit is contained in:
parent
08e15e2f0c
commit
7344c4823b
|
@ -22,12 +22,13 @@
|
|||
<div class="contents topic" id="table-of-contents">
|
||||
<p class="topic-title first"><a name="table-of-contents">Table of contents</a></p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="#downloading-and-building" id="id6" name="id6">downloading and building</a><ul>
|
||||
<li><a class="reference" href="#contributed-build-tutorials" id="id7" name="id7">Contributed build tutorials</a></li>
|
||||
<li><a class="reference" href="#building-with-bbv2" id="id8" name="id8">building with BBv2</a></li>
|
||||
<li><a class="reference" href="#building-with-autotools" id="id9" name="id9">building with autotools</a></li>
|
||||
<li><a class="reference" href="#building-with-other-build-systems" id="id10" name="id10">building with other build systems</a></li>
|
||||
<li><a class="reference" href="#build-configurations" id="id11" name="id11">build configurations</a></li>
|
||||
<li><a class="reference" href="#downloading-and-building" id="id8" name="id8">downloading and building</a><ul>
|
||||
<li><a class="reference" href="#contributed-build-tutorials" id="id9" name="id9">Contributed build tutorials</a></li>
|
||||
<li><a class="reference" href="#building-from-cvs" id="id10" name="id10">building from cvs</a></li>
|
||||
<li><a class="reference" href="#building-with-bbv2" id="id11" name="id11">building with BBv2</a></li>
|
||||
<li><a class="reference" href="#building-with-autotools" id="id12" name="id12">building with autotools</a></li>
|
||||
<li><a class="reference" href="#building-with-other-build-systems" id="id13" name="id13">building with other build systems</a></li>
|
||||
<li><a class="reference" href="#build-configurations" id="id14" name="id14">build configurations</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
@ -51,6 +52,22 @@ IRC channel on <tt class="docutils literal"><span class="pre">irc.freenode.net</
|
|||
<p>These tutorials may work on similar linux distros as well.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="building-from-cvs" name="building-from-cvs">building from cvs</a></h2>
|
||||
<p>To build libtorrent from cvs you need to check out the libtorrent sources from
|
||||
sourceforge and also check out the asio sources from its sourceforge cvs.
|
||||
If you downloaded a release tarball, you can skip this section.</p>
|
||||
<p>To prepare the directory structure for building, follow these steps:</p>
|
||||
<ul class="simple">
|
||||
<li>Check out libtorrent (<a class="reference" href="http://sourceforge.net/cvs/?group_id=79942">instructions</a>).</li>
|
||||
<li>Check out asio (<a class="reference" href="http://sourceforge.net/cvs/?group_id=122478">instructions</a>).</li>
|
||||
<li>Copy the <tt class="docutils literal"><span class="pre">asio/include/asio/</span></tt> directory into the <tt class="docutils literal"><span class="pre">libtorrent/include/libtorrent/</span></tt>
|
||||
directory. Alternatively you can make a symbolic link.</li>
|
||||
<li>Copy <tt class="docutils literal"><span class="pre">asio/include/asio.hpp</span></tt> into <tt class="docutils literal"><span class="pre">libtorrent/include/libtorrent</span></tt>.</li>
|
||||
</ul>
|
||||
<p>Now the libtorrent directory is ready for building. Follow the steps in one
|
||||
of the following sections depending on which build system you prefer to use.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="building-with-bbv2" name="building-with-bbv2">building with BBv2</a></h2>
|
||||
<p>The primary reason to use boost-build is that it will automatically build the
|
||||
dependent boost libraries with the correct compiler settings, in order to
|
||||
|
@ -346,7 +363,7 @@ with the following option:</p>
|
|||
<p>The above option make use of -DNDEBUG, which is used throughout libtorrent.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h3><a id="id5" name="id5">Step 3: Building libtorrent</a></h3>
|
||||
<h3><a id="id7" name="id7">Step 3: Building libtorrent</a></h3>
|
||||
<p>Once the configure script is run successfully, you just type <tt class="docutils literal"><span class="pre">make</span></tt> and
|
||||
libtorrent, the examples and the tests will be built.</p>
|
||||
<p>When libtorrent is built it may be a good idea to run the tests, you do this
|
||||
|
|
|
@ -36,6 +36,27 @@ These tutorials may work on similar linux distros as well.
|
|||
.. _suse: suse_build_notes.html
|
||||
.. _`visual studio 2005`: vs2005_build_notes.html
|
||||
|
||||
building from cvs
|
||||
-----------------
|
||||
|
||||
To build libtorrent from cvs you need to check out the libtorrent sources from
|
||||
sourceforge and also check out the asio sources from its sourceforge cvs.
|
||||
If you downloaded a release tarball, you can skip this section.
|
||||
|
||||
To prepare the directory structure for building, follow these steps:
|
||||
|
||||
* Check out libtorrent (instructions__).
|
||||
* Check out asio (instructions__).
|
||||
* Copy the ``asio/include/asio/`` directory into the ``libtorrent/include/libtorrent/``
|
||||
directory. Alternatively you can make a symbolic link.
|
||||
* Copy ``asio/include/asio.hpp`` into ``libtorrent/include/libtorrent``.
|
||||
|
||||
__ http://sourceforge.net/cvs/?group_id=79942
|
||||
__ http://sourceforge.net/cvs/?group_id=122478
|
||||
|
||||
Now the libtorrent directory is ready for building. Follow the steps in one
|
||||
of the following sections depending on which build system you prefer to use.
|
||||
|
||||
building with BBv2
|
||||
------------------
|
||||
|
||||
|
@ -384,7 +405,6 @@ on how to build libtorrent with VS 2005, see `this document`_.
|
|||
|
||||
.. _`this document`: vs2005_build_notes.html
|
||||
|
||||
|
||||
build configurations
|
||||
--------------------
|
||||
|
||||
|
|
240
docs/manual.html
240
docs/manual.html
|
@ -32,134 +32,135 @@
|
|||
<li><a class="reference" href="#abort" id="id20" name="id20">abort()</a></li>
|
||||
<li><a class="reference" href="#add-torrent" id="id21" name="id21">add_torrent()</a></li>
|
||||
<li><a class="reference" href="#remove-torrent-find-torrent-get-torrents" id="id22" name="id22">remove_torrent() find_torrent() get_torrents()</a></li>
|
||||
<li><a class="reference" href="#set-upload-rate-limit-set-download-rate-limit" id="id23" name="id23">set_upload_rate_limit() set_download_rate_limit()</a></li>
|
||||
<li><a class="reference" href="#set-upload-rate-limit-set-download-rate-limit-upload-rate-limit-download-rate-limit" id="id23" name="id23">set_upload_rate_limit() set_download_rate_limit() upload_rate_limit() download_rate_limit()</a></li>
|
||||
<li><a class="reference" href="#set-max-uploads-set-max-connections" id="id24" name="id24">set_max_uploads() set_max_connections()</a></li>
|
||||
<li><a class="reference" href="#set-max-half-open-connections" id="id25" name="id25">set_max_half_open_connections()</a></li>
|
||||
<li><a class="reference" href="#set-ip-filter" id="id26" name="id26">set_ip_filter()</a></li>
|
||||
<li><a class="reference" href="#status" id="id27" name="id27">status()</a></li>
|
||||
<li><a class="reference" href="#is-listening-listen-port-listen-on" id="id28" name="id28">is_listening() listen_port() listen_on()</a></li>
|
||||
<li><a class="reference" href="#pop-alert-set-severity-level" id="id29" name="id29">pop_alert() set_severity_level()</a></li>
|
||||
<li><a class="reference" href="#add-extension" id="id30" name="id30">add_extension()</a></li>
|
||||
<li><a class="reference" href="#start-dht-stop-dht-set-dht-settings-dht-state" id="id31" name="id31">start_dht() stop_dht() set_dht_settings() dht_state()</a></li>
|
||||
<li><a class="reference" href="#add-dht-node-add-dht-router" id="id32" name="id32">add_dht_node() add_dht_router()</a></li>
|
||||
<li><a class="reference" href="#num-uploads-num-connections" id="id25" name="id25">num_uploads() num_connections()</a></li>
|
||||
<li><a class="reference" href="#set-max-half-open-connections" id="id26" name="id26">set_max_half_open_connections()</a></li>
|
||||
<li><a class="reference" href="#set-ip-filter" id="id27" name="id27">set_ip_filter()</a></li>
|
||||
<li><a class="reference" href="#status" id="id28" name="id28">status()</a></li>
|
||||
<li><a class="reference" href="#is-listening-listen-port-listen-on" id="id29" name="id29">is_listening() listen_port() listen_on()</a></li>
|
||||
<li><a class="reference" href="#pop-alert-set-severity-level" id="id30" name="id30">pop_alert() set_severity_level()</a></li>
|
||||
<li><a class="reference" href="#add-extension" id="id31" name="id31">add_extension()</a></li>
|
||||
<li><a class="reference" href="#start-dht-stop-dht-set-dht-settings-dht-state" id="id32" name="id32">start_dht() stop_dht() set_dht_settings() dht_state()</a></li>
|
||||
<li><a class="reference" href="#add-dht-node-add-dht-router" id="id33" name="id33">add_dht_node() add_dht_router()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#entry" id="id33" name="id33">entry</a><ul>
|
||||
<li><a class="reference" href="#integer-string-list-dict-type" id="id34" name="id34">integer() string() list() dict() type()</a></li>
|
||||
<li><a class="reference" href="#operator" id="id35" name="id35">operator[]</a></li>
|
||||
<li><a class="reference" href="#find-key" id="id36" name="id36">find_key()</a></li>
|
||||
<li><a class="reference" href="#entry" id="id34" name="id34">entry</a><ul>
|
||||
<li><a class="reference" href="#integer-string-list-dict-type" id="id35" name="id35">integer() string() list() dict() type()</a></li>
|
||||
<li><a class="reference" href="#operator" id="id36" name="id36">operator[]</a></li>
|
||||
<li><a class="reference" href="#find-key" id="id37" name="id37">find_key()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#torrent-info" id="id37" name="id37">torrent_info</a><ul>
|
||||
<li><a class="reference" href="#id3" id="id38" name="id38">torrent_info()</a></li>
|
||||
<li><a class="reference" href="#set-comment-set-piece-size-set-creator-set-hash-add-tracker-add-file" id="id39" name="id39">set_comment() set_piece_size() set_creator() set_hash() add_tracker() add_file()</a></li>
|
||||
<li><a class="reference" href="#create-torrent" id="id40" name="id40">create_torrent()</a></li>
|
||||
<li><a class="reference" href="#begin-files-end-files-rbegin-files-rend-files" id="id41" name="id41">begin_files() end_files() rbegin_files() rend_files()</a></li>
|
||||
<li><a class="reference" href="#num-files-file-at" id="id42" name="id42">num_files() file_at()</a></li>
|
||||
<li><a class="reference" href="#map-block" id="id43" name="id43">map_block()</a></li>
|
||||
<li><a class="reference" href="#map-file" id="id44" name="id44">map_file()</a></li>
|
||||
<li><a class="reference" href="#url-seeds" id="id45" name="id45">url_seeds()</a></li>
|
||||
<li><a class="reference" href="#print" id="id46" name="id46">print()</a></li>
|
||||
<li><a class="reference" href="#trackers" id="id47" name="id47">trackers()</a></li>
|
||||
<li><a class="reference" href="#total-size-piece-length-piece-size-num-pieces" id="id48" name="id48">total_size() piece_length() piece_size() num_pieces()</a></li>
|
||||
<li><a class="reference" href="#hash-for-piece-info-hash" id="id49" name="id49">hash_for_piece() info_hash()</a></li>
|
||||
<li><a class="reference" href="#name-comment-creation-date-creator" id="id50" name="id50">name() comment() creation_date() creator()</a></li>
|
||||
<li><a class="reference" href="#priv-set-priv" id="id51" name="id51">priv() set_priv()</a></li>
|
||||
<li><a class="reference" href="#nodes" id="id52" name="id52">nodes()</a></li>
|
||||
<li><a class="reference" href="#add-node" id="id53" name="id53">add_node()</a></li>
|
||||
<li><a class="reference" href="#torrent-info" id="id38" name="id38">torrent_info</a><ul>
|
||||
<li><a class="reference" href="#id3" id="id39" name="id39">torrent_info()</a></li>
|
||||
<li><a class="reference" href="#set-comment-set-piece-size-set-creator-set-hash-add-tracker-add-file" id="id40" name="id40">set_comment() set_piece_size() set_creator() set_hash() add_tracker() add_file()</a></li>
|
||||
<li><a class="reference" href="#create-torrent" id="id41" name="id41">create_torrent()</a></li>
|
||||
<li><a class="reference" href="#begin-files-end-files-rbegin-files-rend-files" id="id42" name="id42">begin_files() end_files() rbegin_files() rend_files()</a></li>
|
||||
<li><a class="reference" href="#num-files-file-at" id="id43" name="id43">num_files() file_at()</a></li>
|
||||
<li><a class="reference" href="#map-block" id="id44" name="id44">map_block()</a></li>
|
||||
<li><a class="reference" href="#map-file" id="id45" name="id45">map_file()</a></li>
|
||||
<li><a class="reference" href="#url-seeds" id="id46" name="id46">url_seeds()</a></li>
|
||||
<li><a class="reference" href="#print" id="id47" name="id47">print()</a></li>
|
||||
<li><a class="reference" href="#trackers" id="id48" name="id48">trackers()</a></li>
|
||||
<li><a class="reference" href="#total-size-piece-length-piece-size-num-pieces" id="id49" name="id49">total_size() piece_length() piece_size() num_pieces()</a></li>
|
||||
<li><a class="reference" href="#hash-for-piece-info-hash" id="id50" name="id50">hash_for_piece() info_hash()</a></li>
|
||||
<li><a class="reference" href="#name-comment-creation-date-creator" id="id51" name="id51">name() comment() creation_date() creator()</a></li>
|
||||
<li><a class="reference" href="#priv-set-priv" id="id52" name="id52">priv() set_priv()</a></li>
|
||||
<li><a class="reference" href="#nodes" id="id53" name="id53">nodes()</a></li>
|
||||
<li><a class="reference" href="#add-node" id="id54" name="id54">add_node()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#torrent-handle" id="id54" name="id54">torrent_handle</a><ul>
|
||||
<li><a class="reference" href="#file-progress" id="id55" name="id55">file_progress()</a></li>
|
||||
<li><a class="reference" href="#save-path" id="id56" name="id56">save_path()</a></li>
|
||||
<li><a class="reference" href="#move-storage" id="id57" name="id57">move_storage()</a></li>
|
||||
<li><a class="reference" href="#force-reannounce" id="id58" name="id58">force_reannounce()</a></li>
|
||||
<li><a class="reference" href="#connect-peer" id="id59" name="id59">connect_peer()</a></li>
|
||||
<li><a class="reference" href="#name" id="id60" name="id60">name()</a></li>
|
||||
<li><a class="reference" href="#set-ratio" id="id61" name="id61">set_ratio()</a></li>
|
||||
<li><a class="reference" href="#set-upload-limit-set-download-limit" id="id62" name="id62">set_upload_limit() set_download_limit()</a></li>
|
||||
<li><a class="reference" href="#set-sequenced-download-threshold" id="id63" name="id63">set_sequenced_download_threshold()</a></li>
|
||||
<li><a class="reference" href="#set-peer-upload-limit-set-peer-download-limit" id="id64" name="id64">set_peer_upload_limit() set_peer_download_limit()</a></li>
|
||||
<li><a class="reference" href="#pause-resume-is-paused" id="id65" name="id65">pause() resume() is_paused()</a></li>
|
||||
<li><a class="reference" href="#is-seed" id="id66" name="id66">is_seed()</a></li>
|
||||
<li><a class="reference" href="#has-metadata" id="id67" name="id67">has_metadata()</a></li>
|
||||
<li><a class="reference" href="#set-tracker-login" id="id68" name="id68">set_tracker_login()</a></li>
|
||||
<li><a class="reference" href="#trackers-replace-trackers" id="id69" name="id69">trackers() replace_trackers()</a></li>
|
||||
<li><a class="reference" href="#add-url-seed" id="id70" name="id70">add_url_seed()</a></li>
|
||||
<li><a class="reference" href="#use-interface" id="id71" name="id71">use_interface()</a></li>
|
||||
<li><a class="reference" href="#info-hash" id="id72" name="id72">info_hash()</a></li>
|
||||
<li><a class="reference" href="#id5" id="id73" name="id73">set_max_uploads() set_max_connections()</a></li>
|
||||
<li><a class="reference" href="#write-resume-data" id="id74" name="id74">write_resume_data()</a></li>
|
||||
<li><a class="reference" href="#id6" id="id75" name="id75">status()</a></li>
|
||||
<li><a class="reference" href="#get-download-queue" id="id76" name="id76">get_download_queue()</a></li>
|
||||
<li><a class="reference" href="#get-peer-info" id="id77" name="id77">get_peer_info()</a></li>
|
||||
<li><a class="reference" href="#get-torrent-info" id="id78" name="id78">get_torrent_info()</a></li>
|
||||
<li><a class="reference" href="#is-valid" id="id79" name="id79">is_valid()</a></li>
|
||||
<li><a class="reference" href="#torrent-handle" id="id55" name="id55">torrent_handle</a><ul>
|
||||
<li><a class="reference" href="#file-progress" id="id56" name="id56">file_progress()</a></li>
|
||||
<li><a class="reference" href="#save-path" id="id57" name="id57">save_path()</a></li>
|
||||
<li><a class="reference" href="#move-storage" id="id58" name="id58">move_storage()</a></li>
|
||||
<li><a class="reference" href="#force-reannounce" id="id59" name="id59">force_reannounce()</a></li>
|
||||
<li><a class="reference" href="#connect-peer" id="id60" name="id60">connect_peer()</a></li>
|
||||
<li><a class="reference" href="#name" id="id61" name="id61">name()</a></li>
|
||||
<li><a class="reference" href="#set-ratio" id="id62" name="id62">set_ratio()</a></li>
|
||||
<li><a class="reference" href="#set-upload-limit-set-download-limit" id="id63" name="id63">set_upload_limit() set_download_limit()</a></li>
|
||||
<li><a class="reference" href="#set-sequenced-download-threshold" id="id64" name="id64">set_sequenced_download_threshold()</a></li>
|
||||
<li><a class="reference" href="#set-peer-upload-limit-set-peer-download-limit" id="id65" name="id65">set_peer_upload_limit() set_peer_download_limit()</a></li>
|
||||
<li><a class="reference" href="#pause-resume-is-paused" id="id66" name="id66">pause() resume() is_paused()</a></li>
|
||||
<li><a class="reference" href="#is-seed" id="id67" name="id67">is_seed()</a></li>
|
||||
<li><a class="reference" href="#has-metadata" id="id68" name="id68">has_metadata()</a></li>
|
||||
<li><a class="reference" href="#set-tracker-login" id="id69" name="id69">set_tracker_login()</a></li>
|
||||
<li><a class="reference" href="#trackers-replace-trackers" id="id70" name="id70">trackers() replace_trackers()</a></li>
|
||||
<li><a class="reference" href="#add-url-seed" id="id71" name="id71">add_url_seed()</a></li>
|
||||
<li><a class="reference" href="#use-interface" id="id72" name="id72">use_interface()</a></li>
|
||||
<li><a class="reference" href="#info-hash" id="id73" name="id73">info_hash()</a></li>
|
||||
<li><a class="reference" href="#id5" id="id74" name="id74">set_max_uploads() set_max_connections()</a></li>
|
||||
<li><a class="reference" href="#write-resume-data" id="id75" name="id75">write_resume_data()</a></li>
|
||||
<li><a class="reference" href="#id6" id="id76" name="id76">status()</a></li>
|
||||
<li><a class="reference" href="#get-download-queue" id="id77" name="id77">get_download_queue()</a></li>
|
||||
<li><a class="reference" href="#get-peer-info" id="id78" name="id78">get_peer_info()</a></li>
|
||||
<li><a class="reference" href="#get-torrent-info" id="id79" name="id79">get_torrent_info()</a></li>
|
||||
<li><a class="reference" href="#is-valid" id="id80" name="id80">is_valid()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#torrent-status" id="id80" name="id80">torrent_status</a></li>
|
||||
<li><a class="reference" href="#peer-info" id="id81" name="id81">peer_info</a></li>
|
||||
<li><a class="reference" href="#session-settings" id="id82" name="id82">session_settings</a></li>
|
||||
<li><a class="reference" href="#ip-filter" id="id83" name="id83">ip_filter</a><ul>
|
||||
<li><a class="reference" href="#id8" id="id84" name="id84">ip_filter()</a></li>
|
||||
<li><a class="reference" href="#add-rule" id="id85" name="id85">add_rule()</a></li>
|
||||
<li><a class="reference" href="#access" id="id86" name="id86">access()</a></li>
|
||||
<li><a class="reference" href="#export-filter" id="id87" name="id87">export_filter()</a></li>
|
||||
<li><a class="reference" href="#torrent-status" id="id81" name="id81">torrent_status</a></li>
|
||||
<li><a class="reference" href="#peer-info" id="id82" name="id82">peer_info</a></li>
|
||||
<li><a class="reference" href="#session-settings" id="id83" name="id83">session_settings</a></li>
|
||||
<li><a class="reference" href="#ip-filter" id="id84" name="id84">ip_filter</a><ul>
|
||||
<li><a class="reference" href="#id8" id="id85" name="id85">ip_filter()</a></li>
|
||||
<li><a class="reference" href="#add-rule" id="id86" name="id86">add_rule()</a></li>
|
||||
<li><a class="reference" href="#access" id="id87" name="id87">access()</a></li>
|
||||
<li><a class="reference" href="#export-filter" id="id88" name="id88">export_filter()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#big-number" id="id88" name="id88">big_number</a></li>
|
||||
<li><a class="reference" href="#hasher" id="id89" name="id89">hasher</a></li>
|
||||
<li><a class="reference" href="#fingerprint" id="id90" name="id90">fingerprint</a></li>
|
||||
<li><a class="reference" href="#free-functions" id="id91" name="id91">free functions</a><ul>
|
||||
<li><a class="reference" href="#identify-client" id="id92" name="id92">identify_client()</a></li>
|
||||
<li><a class="reference" href="#client-fingerprint" id="id93" name="id93">client_fingerprint()</a></li>
|
||||
<li><a class="reference" href="#bdecode-bencode" id="id94" name="id94">bdecode() bencode()</a></li>
|
||||
<li><a class="reference" href="#big-number" id="id89" name="id89">big_number</a></li>
|
||||
<li><a class="reference" href="#hasher" id="id90" name="id90">hasher</a></li>
|
||||
<li><a class="reference" href="#fingerprint" id="id91" name="id91">fingerprint</a></li>
|
||||
<li><a class="reference" href="#free-functions" id="id92" name="id92">free functions</a><ul>
|
||||
<li><a class="reference" href="#identify-client" id="id93" name="id93">identify_client()</a></li>
|
||||
<li><a class="reference" href="#client-fingerprint" id="id94" name="id94">client_fingerprint()</a></li>
|
||||
<li><a class="reference" href="#bdecode-bencode" id="id95" name="id95">bdecode() bencode()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#alerts" id="id95" name="id95">alerts</a><ul>
|
||||
<li><a class="reference" href="#listen-failed-alert" id="id96" name="id96">listen_failed_alert</a></li>
|
||||
<li><a class="reference" href="#file-error-alert" id="id97" name="id97">file_error_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-announce-alert" id="id98" name="id98">tracker_announce_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-alert" id="id99" name="id99">tracker_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-reply-alert" id="id100" name="id100">tracker_reply_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-warning-alert" id="id101" name="id101">tracker_warning_alert</a></li>
|
||||
<li><a class="reference" href="#url-seed-alert" id="id102" name="id102">url_seed_alert</a></li>
|
||||
<li><a class="reference" href="#hash-failed-alert" id="id103" name="id103">hash_failed_alert</a></li>
|
||||
<li><a class="reference" href="#peer-ban-alert" id="id104" name="id104">peer_ban_alert</a></li>
|
||||
<li><a class="reference" href="#peer-error-alert" id="id105" name="id105">peer_error_alert</a></li>
|
||||
<li><a class="reference" href="#invalid-request-alert" id="id106" name="id106">invalid_request_alert</a></li>
|
||||
<li><a class="reference" href="#torrent-finished-alert" id="id107" name="id107">torrent_finished_alert</a></li>
|
||||
<li><a class="reference" href="#metadata-failed-alert" id="id108" name="id108">metadata_failed_alert</a></li>
|
||||
<li><a class="reference" href="#metadata-received-alert" id="id109" name="id109">metadata_received_alert</a></li>
|
||||
<li><a class="reference" href="#fastresume-rejected-alert" id="id110" name="id110">fastresume_rejected_alert</a></li>
|
||||
<li><a class="reference" href="#dispatcher" id="id111" name="id111">dispatcher</a></li>
|
||||
<li><a class="reference" href="#alerts" id="id96" name="id96">alerts</a><ul>
|
||||
<li><a class="reference" href="#listen-failed-alert" id="id97" name="id97">listen_failed_alert</a></li>
|
||||
<li><a class="reference" href="#file-error-alert" id="id98" name="id98">file_error_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-announce-alert" id="id99" name="id99">tracker_announce_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-alert" id="id100" name="id100">tracker_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-reply-alert" id="id101" name="id101">tracker_reply_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-warning-alert" id="id102" name="id102">tracker_warning_alert</a></li>
|
||||
<li><a class="reference" href="#url-seed-alert" id="id103" name="id103">url_seed_alert</a></li>
|
||||
<li><a class="reference" href="#hash-failed-alert" id="id104" name="id104">hash_failed_alert</a></li>
|
||||
<li><a class="reference" href="#peer-ban-alert" id="id105" name="id105">peer_ban_alert</a></li>
|
||||
<li><a class="reference" href="#peer-error-alert" id="id106" name="id106">peer_error_alert</a></li>
|
||||
<li><a class="reference" href="#invalid-request-alert" id="id107" name="id107">invalid_request_alert</a></li>
|
||||
<li><a class="reference" href="#torrent-finished-alert" id="id108" name="id108">torrent_finished_alert</a></li>
|
||||
<li><a class="reference" href="#metadata-failed-alert" id="id109" name="id109">metadata_failed_alert</a></li>
|
||||
<li><a class="reference" href="#metadata-received-alert" id="id110" name="id110">metadata_received_alert</a></li>
|
||||
<li><a class="reference" href="#fastresume-rejected-alert" id="id111" name="id111">fastresume_rejected_alert</a></li>
|
||||
<li><a class="reference" href="#dispatcher" id="id112" name="id112">dispatcher</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#exceptions" id="id112" name="id112">exceptions</a><ul>
|
||||
<li><a class="reference" href="#invalid-handle" id="id113" name="id113">invalid_handle</a></li>
|
||||
<li><a class="reference" href="#duplicate-torrent" id="id114" name="id114">duplicate_torrent</a></li>
|
||||
<li><a class="reference" href="#invalid-encoding" id="id115" name="id115">invalid_encoding</a></li>
|
||||
<li><a class="reference" href="#type-error" id="id116" name="id116">type_error</a></li>
|
||||
<li><a class="reference" href="#invalid-torrent-file" id="id117" name="id117">invalid_torrent_file</a></li>
|
||||
<li><a class="reference" href="#exceptions" id="id113" name="id113">exceptions</a><ul>
|
||||
<li><a class="reference" href="#invalid-handle" id="id114" name="id114">invalid_handle</a></li>
|
||||
<li><a class="reference" href="#duplicate-torrent" id="id115" name="id115">duplicate_torrent</a></li>
|
||||
<li><a class="reference" href="#invalid-encoding" id="id116" name="id116">invalid_encoding</a></li>
|
||||
<li><a class="reference" href="#type-error" id="id117" name="id117">type_error</a></li>
|
||||
<li><a class="reference" href="#invalid-torrent-file" id="id118" name="id118">invalid_torrent_file</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#fast-resume" id="id118" name="id118">fast resume</a><ul>
|
||||
<li><a class="reference" href="#file-format" id="id119" name="id119">file format</a></li>
|
||||
<li><a class="reference" href="#fast-resume" id="id119" name="id119">fast resume</a><ul>
|
||||
<li><a class="reference" href="#file-format" id="id120" name="id120">file format</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#threads" id="id120" name="id120">threads</a></li>
|
||||
<li><a class="reference" href="#storage-allocation" id="id121" name="id121">storage allocation</a><ul>
|
||||
<li><a class="reference" href="#full-allocation" id="id122" name="id122">full allocation</a></li>
|
||||
<li><a class="reference" href="#compact-allocation" id="id123" name="id123">compact allocation</a></li>
|
||||
<li><a class="reference" href="#threads" id="id121" name="id121">threads</a></li>
|
||||
<li><a class="reference" href="#storage-allocation" id="id122" name="id122">storage allocation</a><ul>
|
||||
<li><a class="reference" href="#full-allocation" id="id123" name="id123">full allocation</a></li>
|
||||
<li><a class="reference" href="#compact-allocation" id="id124" name="id124">compact allocation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#extensions" id="id124" name="id124">extensions</a><ul>
|
||||
<li><a class="reference" href="#metadata-from-peers" id="id125" name="id125">metadata from peers</a></li>
|
||||
<li><a class="reference" href="#http-seeding" id="id126" name="id126">HTTP seeding</a></li>
|
||||
<li><a class="reference" href="#extensions" id="id125" name="id125">extensions</a><ul>
|
||||
<li><a class="reference" href="#metadata-from-peers" id="id126" name="id126">metadata from peers</a></li>
|
||||
<li><a class="reference" href="#http-seeding" id="id127" name="id127">HTTP seeding</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#filename-checks" id="id127" name="id127">filename checks</a></li>
|
||||
<li><a class="reference" href="#acknowledgments" id="id128" name="id128">acknowledgments</a></li>
|
||||
<li><a class="reference" href="#filename-checks" id="id128" name="id128">filename checks</a></li>
|
||||
<li><a class="reference" href="#acknowledgments" id="id129" name="id129">acknowledgments</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section">
|
||||
|
@ -251,11 +252,16 @@ class session: public boost::noncopyable
|
|||
session_settings const& settings);
|
||||
|
||||
void set_upload_rate_limit(int bytes_per_second);
|
||||
int upload_rate_limit() const;
|
||||
void set_download_rate_limit(int bytes_per_second);
|
||||
int download_rate_limit() const;
|
||||
void set_max_uploads(int limit);
|
||||
void set_max_connections(int limit);
|
||||
void set_max_half_open_connections(int limit);
|
||||
|
||||
int num_uploads() const;
|
||||
int num_connections() const;
|
||||
|
||||
void set_ip_filter(ip_filter const& f);
|
||||
|
||||
session_status status() const;
|
||||
|
@ -406,18 +412,22 @@ In case the torrent cannot be found, an invalid torrent_handle is returned.</p>
|
|||
currently in the session.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="set-upload-rate-limit-set-download-rate-limit" name="set-upload-rate-limit-set-download-rate-limit">set_upload_rate_limit() set_download_rate_limit()</a></h2>
|
||||
<h2><a id="set-upload-rate-limit-set-download-rate-limit-upload-rate-limit-download-rate-limit" name="set-upload-rate-limit-set-download-rate-limit-upload-rate-limit-download-rate-limit">set_upload_rate_limit() set_download_rate_limit() upload_rate_limit() download_rate_limit()</a></h2>
|
||||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
void set_upload_rate_limit(int bytes_per_second);
|
||||
void set_download_rate_limit(int bytes_per_second);
|
||||
int upload_rate_limit() const;
|
||||
int download_rate_limit() const;
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p><tt class="docutils literal"><span class="pre">set_upload_rate_limit()</span></tt> set the maximum number of bytes allowed to be
|
||||
sent to peers per second. This bandwidth is distributed among all the peers. If
|
||||
you don't want to limit upload rate, you can set this to -1 (the default).
|
||||
<tt class="docutils literal"><span class="pre">set_download_rate_limit()</span></tt> works the same way but for download rate instead
|
||||
of upload rate.</p>
|
||||
of upload rate.
|
||||
<tt class="docutils literal"><span class="pre">download_rate_limit()</span></tt> and <tt class="docutils literal"><span class="pre">upload_rate_limit()</span></tt> returns the previously
|
||||
set limits.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="set-max-uploads-set-max-connections" name="set-max-uploads-set-max-connections">set_max_uploads() set_max_connections()</a></h2>
|
||||
|
@ -434,6 +444,17 @@ connections limit, and open too many torrents, the limit will not be met. The
|
|||
number of uploads is at least one per torrent.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="num-uploads-num-connections" name="num-uploads-num-connections">num_uploads() num_connections()</a></h2>
|
||||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
int num_uploads() const;
|
||||
int num_connections() const;
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>Returns the number of currently unchoked peers and the number of connections
|
||||
(including half-open ones) respectively.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="set-max-half-open-connections" name="set-max-half-open-connections">set_max_half_open_connections()</a></h2>
|
||||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
|
@ -579,6 +600,11 @@ info-hash.</dd>
|
|||
or <tt class="docutils literal"><span class="pre"><libtorrent/extensions/ut_pex.hpp></span></tt>. The functions to pass in to
|
||||
<tt class="docutils literal"><span class="pre">add_extension()</span></tt> are <tt class="docutils literal"><span class="pre">libtorrent::create_metadata_plugin</span></tt> and
|
||||
<tt class="docutils literal"><span class="pre">libtorrent::create_ut_pex_plugin</span></tt> respectively.</p>
|
||||
<p>e.g.</p>
|
||||
<pre class="literal-block">
|
||||
ses.add_extension(&libtorrent::create_metadata_plugin);
|
||||
ses.add_extension(&libtorrent::create_ut_pex_plugin);
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="start-dht-stop-dht-set-dht-settings-dht-state" name="start-dht-stop-dht-set-dht-settings-dht-state">start_dht() stop_dht() set_dht_settings() dht_state()</a></h2>
|
||||
|
|
|
@ -96,11 +96,16 @@ The ``session`` class has the following synopsis::
|
|||
session_settings const& settings);
|
||||
|
||||
void set_upload_rate_limit(int bytes_per_second);
|
||||
int upload_rate_limit() const;
|
||||
void set_download_rate_limit(int bytes_per_second);
|
||||
int download_rate_limit() const;
|
||||
void set_max_uploads(int limit);
|
||||
void set_max_connections(int limit);
|
||||
void set_max_half_open_connections(int limit);
|
||||
|
||||
int num_uploads() const;
|
||||
int num_connections() const;
|
||||
|
||||
void set_ip_filter(ip_filter const& f);
|
||||
|
||||
session_status status() const;
|
||||
|
@ -264,19 +269,23 @@ See ``torrent_handle::is_valid()`` to know if the torrent was found or not.
|
|||
currently in the session.
|
||||
|
||||
|
||||
set_upload_rate_limit() set_download_rate_limit()
|
||||
-------------------------------------------------
|
||||
set_upload_rate_limit() set_download_rate_limit() upload_rate_limit() download_rate_limit()
|
||||
-------------------------------------------------------------------------------------------
|
||||
|
||||
::
|
||||
|
||||
void set_upload_rate_limit(int bytes_per_second);
|
||||
void set_download_rate_limit(int bytes_per_second);
|
||||
int upload_rate_limit() const;
|
||||
int download_rate_limit() const;
|
||||
|
||||
``set_upload_rate_limit()`` set the maximum number of bytes allowed to be
|
||||
sent to peers per second. This bandwidth is distributed among all the peers. If
|
||||
you don't want to limit upload rate, you can set this to -1 (the default).
|
||||
``set_download_rate_limit()`` works the same way but for download rate instead
|
||||
of upload rate.
|
||||
``download_rate_limit()`` and ``upload_rate_limit()`` returns the previously
|
||||
set limits.
|
||||
|
||||
|
||||
set_max_uploads() set_max_connections()
|
||||
|
@ -294,6 +303,18 @@ connections limit, and open too many torrents, the limit will not be met. The
|
|||
number of uploads is at least one per torrent.
|
||||
|
||||
|
||||
num_uploads() num_connections()
|
||||
-------------------------------
|
||||
|
||||
::
|
||||
|
||||
int num_uploads() const;
|
||||
int num_connections() const;
|
||||
|
||||
Returns the number of currently unchoked peers and the number of connections
|
||||
(including half-open ones) respectively.
|
||||
|
||||
|
||||
set_max_half_open_connections()
|
||||
-------------------------------
|
||||
|
||||
|
@ -455,6 +476,13 @@ or ``<libtorrent/extensions/ut_pex.hpp>``. The functions to pass in to
|
|||
``add_extension()`` are ``libtorrent::create_metadata_plugin`` and
|
||||
``libtorrent::create_ut_pex_plugin`` respectively.
|
||||
|
||||
e.g.
|
||||
|
||||
::
|
||||
|
||||
ses.add_extension(&libtorrent::create_metadata_plugin);
|
||||
ses.add_extension(&libtorrent::create_ut_pex_plugin);
|
||||
|
||||
.. _`libtorrent plugins`: libtorrent_plugins.html
|
||||
|
||||
start_dht() stop_dht() set_dht_settings() dht_state()
|
||||
|
|
Loading…
Reference in New Issue