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