regenerated documentation. fixed a few warnings. fixed a bug in recent check in in piece picker
This commit is contained in:
parent
9cae6e636e
commit
9f1a11aa50
|
@ -236,6 +236,29 @@ information.</li>
|
|||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">openssl</span></tt></td>
|
||||
<td><ul class="first last simple">
|
||||
<li><tt class="docutils literal"><span class="pre">on</span></tt> - openssl will be used instead of the
|
||||
public domain SHA-1 implementation shipped with
|
||||
libtorrent. <tt class="docutils literal"><span class="pre">crypto.lib</span></tt> or <tt class="docutils literal"><span class="pre">libcrypto.a</span></tt>
|
||||
will be required for linking.</li>
|
||||
<li><tt class="docutils literal"><span class="pre">off</span></tt> - the shipped SHA-1 implementation will
|
||||
be used, and there will be no dependency on
|
||||
openssl.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">character-set</span></tt></td>
|
||||
<td><p class="first">This setting will only have an affect on windows.
|
||||
Other platforms are expected to support UTF-8.</p>
|
||||
<ul class="last simple">
|
||||
<li><tt class="docutils literal"><span class="pre">ansi</span></tt> - The ansi version of the win32 API is
|
||||
used.</li>
|
||||
<li><tt class="docutils literal"><span class="pre">unicode</span></tt> - The unicode version of the win32
|
||||
API is used.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The <tt class="docutils literal"><span class="pre">variant</span></tt> feature is <em>implicit</em>, which means you don't need to specify
|
||||
|
|
377
docs/manual.html
377
docs/manual.html
|
@ -41,131 +41,135 @@
|
|||
<li><a class="reference" href="#is-listening-listen-port-listen-on" id="id30" name="id30">is_listening() listen_port() listen_on()</a></li>
|
||||
<li><a class="reference" href="#pop-alert-set-severity-level" id="id31" name="id31">pop_alert() set_severity_level()</a></li>
|
||||
<li><a class="reference" href="#add-extension" id="id32" name="id32">add_extension()</a></li>
|
||||
<li><a class="reference" href="#start-dht-stop-dht-set-dht-settings-dht-state" id="id33" name="id33">start_dht() stop_dht() set_dht_settings() dht_state()</a></li>
|
||||
<li><a class="reference" href="#add-dht-node-add-dht-router" id="id34" name="id34">add_dht_node() add_dht_router()</a></li>
|
||||
<li><a class="reference" href="#set-peer-proxy-set-web-seed-proxy-set-tracker-proxy-set-dht-proxy" id="id33" name="id33">set_peer_proxy() set_web_seed_proxy() set_tracker_proxy() set_dht_proxy()</a></li>
|
||||
<li><a class="reference" href="#peer-proxy-web-seed-proxy-tracker-proxy-dht-proxy" id="id34" name="id34">peer_proxy() web_seed_proxy() tracker_proxy() dht_proxy()</a></li>
|
||||
<li><a class="reference" href="#start-dht-stop-dht-set-dht-settings-dht-state" id="id35" name="id35">start_dht() stop_dht() set_dht_settings() dht_state()</a></li>
|
||||
<li><a class="reference" href="#add-dht-node-add-dht-router" id="id36" name="id36">add_dht_node() add_dht_router()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#entry" id="id35" name="id35">entry</a><ul>
|
||||
<li><a class="reference" href="#integer-string-list-dict-type" id="id36" name="id36">integer() string() list() dict() type()</a></li>
|
||||
<li><a class="reference" href="#operator" id="id37" name="id37">operator[]</a></li>
|
||||
<li><a class="reference" href="#find-key" id="id38" name="id38">find_key()</a></li>
|
||||
<li><a class="reference" href="#entry" id="id37" name="id37">entry</a><ul>
|
||||
<li><a class="reference" href="#integer-string-list-dict-type" id="id38" name="id38">integer() string() list() dict() type()</a></li>
|
||||
<li><a class="reference" href="#operator" id="id39" name="id39">operator[]</a></li>
|
||||
<li><a class="reference" href="#find-key" id="id40" name="id40">find_key()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#torrent-info" id="id39" name="id39">torrent_info</a><ul>
|
||||
<li><a class="reference" href="#id3" id="id40" name="id40">torrent_info()</a></li>
|
||||
<li><a class="reference" href="#set-comment-set-piece-size-set-creator-set-hash-add-tracker-add-file" id="id41" name="id41">set_comment() set_piece_size() set_creator() set_hash() add_tracker() add_file()</a></li>
|
||||
<li><a class="reference" href="#create-torrent" id="id42" name="id42">create_torrent()</a></li>
|
||||
<li><a class="reference" href="#begin-files-end-files-rbegin-files-rend-files" id="id43" name="id43">begin_files() end_files() rbegin_files() rend_files()</a></li>
|
||||
<li><a class="reference" href="#num-files-file-at" id="id44" name="id44">num_files() file_at()</a></li>
|
||||
<li><a class="reference" href="#map-block" id="id45" name="id45">map_block()</a></li>
|
||||
<li><a class="reference" href="#map-file" id="id46" name="id46">map_file()</a></li>
|
||||
<li><a class="reference" href="#url-seeds" id="id47" name="id47">url_seeds()</a></li>
|
||||
<li><a class="reference" href="#print" id="id48" name="id48">print()</a></li>
|
||||
<li><a class="reference" href="#trackers" id="id49" name="id49">trackers()</a></li>
|
||||
<li><a class="reference" href="#total-size-piece-length-piece-size-num-pieces" id="id50" name="id50">total_size() piece_length() piece_size() num_pieces()</a></li>
|
||||
<li><a class="reference" href="#hash-for-piece-info-hash" id="id51" name="id51">hash_for_piece() info_hash()</a></li>
|
||||
<li><a class="reference" href="#name-comment-creation-date-creator" id="id52" name="id52">name() comment() creation_date() creator()</a></li>
|
||||
<li><a class="reference" href="#priv-set-priv" id="id53" name="id53">priv() set_priv()</a></li>
|
||||
<li><a class="reference" href="#nodes" id="id54" name="id54">nodes()</a></li>
|
||||
<li><a class="reference" href="#add-node" id="id55" name="id55">add_node()</a></li>
|
||||
<li><a class="reference" href="#torrent-info" id="id41" name="id41">torrent_info</a><ul>
|
||||
<li><a class="reference" href="#id3" id="id42" name="id42">torrent_info()</a></li>
|
||||
<li><a class="reference" href="#set-comment-set-piece-size-set-creator-set-hash-add-tracker-add-file" id="id43" name="id43">set_comment() set_piece_size() set_creator() set_hash() add_tracker() add_file()</a></li>
|
||||
<li><a class="reference" href="#create-torrent" id="id44" name="id44">create_torrent()</a></li>
|
||||
<li><a class="reference" href="#begin-files-end-files-rbegin-files-rend-files" id="id45" name="id45">begin_files() end_files() rbegin_files() rend_files()</a></li>
|
||||
<li><a class="reference" href="#num-files-file-at" id="id46" name="id46">num_files() file_at()</a></li>
|
||||
<li><a class="reference" href="#map-block" id="id47" name="id47">map_block()</a></li>
|
||||
<li><a class="reference" href="#map-file" id="id48" name="id48">map_file()</a></li>
|
||||
<li><a class="reference" href="#url-seeds" id="id49" name="id49">url_seeds()</a></li>
|
||||
<li><a class="reference" href="#print" id="id50" name="id50">print()</a></li>
|
||||
<li><a class="reference" href="#trackers" id="id51" name="id51">trackers()</a></li>
|
||||
<li><a class="reference" href="#total-size-piece-length-piece-size-num-pieces" id="id52" name="id52">total_size() piece_length() piece_size() num_pieces()</a></li>
|
||||
<li><a class="reference" href="#hash-for-piece-info-hash" id="id53" name="id53">hash_for_piece() info_hash()</a></li>
|
||||
<li><a class="reference" href="#name-comment-creation-date-creator" id="id54" name="id54">name() comment() creation_date() creator()</a></li>
|
||||
<li><a class="reference" href="#priv-set-priv" id="id55" name="id55">priv() set_priv()</a></li>
|
||||
<li><a class="reference" href="#nodes" id="id56" name="id56">nodes()</a></li>
|
||||
<li><a class="reference" href="#add-node" id="id57" name="id57">add_node()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#torrent-handle" id="id56" name="id56">torrent_handle</a><ul>
|
||||
<li><a class="reference" href="#piece-priority-prioritize-pieces-piece-priorities-prioritize-files" id="id57" name="id57">piece_priority() prioritize_pieces() piece_priorities() prioritize_files()</a></li>
|
||||
<li><a class="reference" href="#file-progress" id="id58" name="id58">file_progress()</a></li>
|
||||
<li><a class="reference" href="#save-path" id="id59" name="id59">save_path()</a></li>
|
||||
<li><a class="reference" href="#move-storage" id="id60" name="id60">move_storage()</a></li>
|
||||
<li><a class="reference" href="#force-reannounce" id="id61" name="id61">force_reannounce()</a></li>
|
||||
<li><a class="reference" href="#connect-peer" id="id62" name="id62">connect_peer()</a></li>
|
||||
<li><a class="reference" href="#name" id="id63" name="id63">name()</a></li>
|
||||
<li><a class="reference" href="#set-ratio" id="id64" name="id64">set_ratio()</a></li>
|
||||
<li><a class="reference" href="#set-upload-limit-set-download-limit-upload-limit-download-limit" id="id65" name="id65">set_upload_limit() set_download_limit() upload_limit() download_limit()</a></li>
|
||||
<li><a class="reference" href="#set-sequenced-download-threshold" id="id66" name="id66">set_sequenced_download_threshold()</a></li>
|
||||
<li><a class="reference" href="#set-peer-upload-limit-set-peer-download-limit" id="id67" name="id67">set_peer_upload_limit() set_peer_download_limit()</a></li>
|
||||
<li><a class="reference" href="#pause-resume-is-paused" id="id68" name="id68">pause() resume() is_paused()</a></li>
|
||||
<li><a class="reference" href="#resolve-countries" id="id69" name="id69">resolve_countries()</a></li>
|
||||
<li><a class="reference" href="#is-seed" id="id70" name="id70">is_seed()</a></li>
|
||||
<li><a class="reference" href="#has-metadata" id="id71" name="id71">has_metadata()</a></li>
|
||||
<li><a class="reference" href="#set-tracker-login" id="id72" name="id72">set_tracker_login()</a></li>
|
||||
<li><a class="reference" href="#trackers-replace-trackers" id="id73" name="id73">trackers() replace_trackers()</a></li>
|
||||
<li><a class="reference" href="#add-url-seed" id="id74" name="id74">add_url_seed()</a></li>
|
||||
<li><a class="reference" href="#use-interface" id="id75" name="id75">use_interface()</a></li>
|
||||
<li><a class="reference" href="#info-hash" id="id76" name="id76">info_hash()</a></li>
|
||||
<li><a class="reference" href="#id5" id="id77" name="id77">set_max_uploads() set_max_connections()</a></li>
|
||||
<li><a class="reference" href="#write-resume-data" id="id78" name="id78">write_resume_data()</a></li>
|
||||
<li><a class="reference" href="#id6" id="id79" name="id79">status()</a></li>
|
||||
<li><a class="reference" href="#get-download-queue" id="id80" name="id80">get_download_queue()</a></li>
|
||||
<li><a class="reference" href="#get-peer-info" id="id81" name="id81">get_peer_info()</a></li>
|
||||
<li><a class="reference" href="#get-torrent-info" id="id82" name="id82">get_torrent_info()</a></li>
|
||||
<li><a class="reference" href="#is-valid" id="id83" name="id83">is_valid()</a></li>
|
||||
<li><a class="reference" href="#torrent-handle" id="id58" name="id58">torrent_handle</a><ul>
|
||||
<li><a class="reference" href="#piece-priority-prioritize-pieces-piece-priorities-prioritize-files" id="id59" name="id59">piece_priority() prioritize_pieces() piece_priorities() prioritize_files()</a></li>
|
||||
<li><a class="reference" href="#file-progress" id="id60" name="id60">file_progress()</a></li>
|
||||
<li><a class="reference" href="#save-path" id="id61" name="id61">save_path()</a></li>
|
||||
<li><a class="reference" href="#move-storage" id="id62" name="id62">move_storage()</a></li>
|
||||
<li><a class="reference" href="#force-reannounce" id="id63" name="id63">force_reannounce()</a></li>
|
||||
<li><a class="reference" href="#connect-peer" id="id64" name="id64">connect_peer()</a></li>
|
||||
<li><a class="reference" href="#name" id="id65" name="id65">name()</a></li>
|
||||
<li><a class="reference" href="#set-ratio" id="id66" name="id66">set_ratio()</a></li>
|
||||
<li><a class="reference" href="#set-upload-limit-set-download-limit-upload-limit-download-limit" id="id67" name="id67">set_upload_limit() set_download_limit() upload_limit() download_limit()</a></li>
|
||||
<li><a class="reference" href="#set-sequenced-download-threshold" id="id68" name="id68">set_sequenced_download_threshold()</a></li>
|
||||
<li><a class="reference" href="#set-peer-upload-limit-set-peer-download-limit" id="id69" name="id69">set_peer_upload_limit() set_peer_download_limit()</a></li>
|
||||
<li><a class="reference" href="#pause-resume-is-paused" id="id70" name="id70">pause() resume() is_paused()</a></li>
|
||||
<li><a class="reference" href="#resolve-countries" id="id71" name="id71">resolve_countries()</a></li>
|
||||
<li><a class="reference" href="#is-seed" id="id72" name="id72">is_seed()</a></li>
|
||||
<li><a class="reference" href="#has-metadata" id="id73" name="id73">has_metadata()</a></li>
|
||||
<li><a class="reference" href="#set-tracker-login" id="id74" name="id74">set_tracker_login()</a></li>
|
||||
<li><a class="reference" href="#trackers-replace-trackers" id="id75" name="id75">trackers() replace_trackers()</a></li>
|
||||
<li><a class="reference" href="#add-url-seed" id="id76" name="id76">add_url_seed()</a></li>
|
||||
<li><a class="reference" href="#use-interface" id="id77" name="id77">use_interface()</a></li>
|
||||
<li><a class="reference" href="#info-hash" id="id78" name="id78">info_hash()</a></li>
|
||||
<li><a class="reference" href="#id5" id="id79" name="id79">set_max_uploads() set_max_connections()</a></li>
|
||||
<li><a class="reference" href="#write-resume-data" id="id80" name="id80">write_resume_data()</a></li>
|
||||
<li><a class="reference" href="#id6" id="id81" name="id81">status()</a></li>
|
||||
<li><a class="reference" href="#get-download-queue" id="id82" name="id82">get_download_queue()</a></li>
|
||||
<li><a class="reference" href="#get-peer-info" id="id83" name="id83">get_peer_info()</a></li>
|
||||
<li><a class="reference" href="#get-torrent-info" id="id84" name="id84">get_torrent_info()</a></li>
|
||||
<li><a class="reference" href="#is-valid" id="id85" name="id85">is_valid()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#torrent-status" id="id84" name="id84">torrent_status</a></li>
|
||||
<li><a class="reference" href="#peer-info" id="id85" name="id85">peer_info</a></li>
|
||||
<li><a class="reference" href="#session-settings" id="id86" name="id86">session_settings</a></li>
|
||||
<li><a class="reference" href="#ip-filter" id="id87" name="id87">ip_filter</a><ul>
|
||||
<li><a class="reference" href="#id9" id="id88" name="id88">ip_filter()</a></li>
|
||||
<li><a class="reference" href="#add-rule" id="id89" name="id89">add_rule()</a></li>
|
||||
<li><a class="reference" href="#access" id="id90" name="id90">access()</a></li>
|
||||
<li><a class="reference" href="#export-filter" id="id91" name="id91">export_filter()</a></li>
|
||||
<li><a class="reference" href="#torrent-status" id="id86" name="id86">torrent_status</a></li>
|
||||
<li><a class="reference" href="#peer-info" id="id87" name="id87">peer_info</a></li>
|
||||
<li><a class="reference" href="#session-settings" id="id88" name="id88">session_settings</a></li>
|
||||
<li><a class="reference" href="#proxy-settings" id="id89" name="id89">proxy_settings</a></li>
|
||||
<li><a class="reference" href="#ip-filter" id="id90" name="id90">ip_filter</a><ul>
|
||||
<li><a class="reference" href="#id9" id="id91" name="id91">ip_filter()</a></li>
|
||||
<li><a class="reference" href="#add-rule" id="id92" name="id92">add_rule()</a></li>
|
||||
<li><a class="reference" href="#access" id="id93" name="id93">access()</a></li>
|
||||
<li><a class="reference" href="#export-filter" id="id94" name="id94">export_filter()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#big-number" id="id92" name="id92">big_number</a></li>
|
||||
<li><a class="reference" href="#hasher" id="id93" name="id93">hasher</a></li>
|
||||
<li><a class="reference" href="#fingerprint" id="id94" name="id94">fingerprint</a></li>
|
||||
<li><a class="reference" href="#free-functions" id="id95" name="id95">free functions</a><ul>
|
||||
<li><a class="reference" href="#identify-client" id="id96" name="id96">identify_client()</a></li>
|
||||
<li><a class="reference" href="#client-fingerprint" id="id97" name="id97">client_fingerprint()</a></li>
|
||||
<li><a class="reference" href="#bdecode-bencode" id="id98" name="id98">bdecode() bencode()</a></li>
|
||||
<li><a class="reference" href="#big-number" id="id95" name="id95">big_number</a></li>
|
||||
<li><a class="reference" href="#hasher" id="id96" name="id96">hasher</a></li>
|
||||
<li><a class="reference" href="#fingerprint" id="id97" name="id97">fingerprint</a></li>
|
||||
<li><a class="reference" href="#free-functions" id="id98" name="id98">free functions</a><ul>
|
||||
<li><a class="reference" href="#identify-client" id="id99" name="id99">identify_client()</a></li>
|
||||
<li><a class="reference" href="#client-fingerprint" id="id100" name="id100">client_fingerprint()</a></li>
|
||||
<li><a class="reference" href="#bdecode-bencode" id="id101" name="id101">bdecode() bencode()</a></li>
|
||||
<li><a class="reference" href="#supports-sparse-files" id="id102" name="id102">supports_sparse_files()</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#alerts" id="id99" name="id99">alerts</a><ul>
|
||||
<li><a class="reference" href="#listen-failed-alert" id="id100" name="id100">listen_failed_alert</a></li>
|
||||
<li><a class="reference" href="#portmap-error-alert" id="id101" name="id101">portmap_error_alert</a></li>
|
||||
<li><a class="reference" href="#portmap-alert" id="id102" name="id102">portmap_alert</a></li>
|
||||
<li><a class="reference" href="#file-error-alert" id="id103" name="id103">file_error_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-announce-alert" id="id104" name="id104">tracker_announce_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-alert" id="id105" name="id105">tracker_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-reply-alert" id="id106" name="id106">tracker_reply_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-warning-alert" id="id107" name="id107">tracker_warning_alert</a></li>
|
||||
<li><a class="reference" href="#url-seed-alert" id="id108" name="id108">url_seed_alert</a></li>
|
||||
<li><a class="reference" href="#hash-failed-alert" id="id109" name="id109">hash_failed_alert</a></li>
|
||||
<li><a class="reference" href="#peer-ban-alert" id="id110" name="id110">peer_ban_alert</a></li>
|
||||
<li><a class="reference" href="#peer-error-alert" id="id111" name="id111">peer_error_alert</a></li>
|
||||
<li><a class="reference" href="#invalid-request-alert" id="id112" name="id112">invalid_request_alert</a></li>
|
||||
<li><a class="reference" href="#torrent-finished-alert" id="id113" name="id113">torrent_finished_alert</a></li>
|
||||
<li><a class="reference" href="#metadata-failed-alert" id="id114" name="id114">metadata_failed_alert</a></li>
|
||||
<li><a class="reference" href="#metadata-received-alert" id="id115" name="id115">metadata_received_alert</a></li>
|
||||
<li><a class="reference" href="#fastresume-rejected-alert" id="id116" name="id116">fastresume_rejected_alert</a></li>
|
||||
<li><a class="reference" href="#peer-blocked-alert" id="id117" name="id117">peer_blocked_alert</a></li>
|
||||
<li><a class="reference" href="#dispatcher" id="id118" name="id118">dispatcher</a></li>
|
||||
<li><a class="reference" href="#alerts" id="id103" name="id103">alerts</a><ul>
|
||||
<li><a class="reference" href="#listen-failed-alert" id="id104" name="id104">listen_failed_alert</a></li>
|
||||
<li><a class="reference" href="#portmap-error-alert" id="id105" name="id105">portmap_error_alert</a></li>
|
||||
<li><a class="reference" href="#portmap-alert" id="id106" name="id106">portmap_alert</a></li>
|
||||
<li><a class="reference" href="#file-error-alert" id="id107" name="id107">file_error_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-announce-alert" id="id108" name="id108">tracker_announce_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-alert" id="id109" name="id109">tracker_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-reply-alert" id="id110" name="id110">tracker_reply_alert</a></li>
|
||||
<li><a class="reference" href="#tracker-warning-alert" id="id111" name="id111">tracker_warning_alert</a></li>
|
||||
<li><a class="reference" href="#url-seed-alert" id="id112" name="id112">url_seed_alert</a></li>
|
||||
<li><a class="reference" href="#hash-failed-alert" id="id113" name="id113">hash_failed_alert</a></li>
|
||||
<li><a class="reference" href="#peer-ban-alert" id="id114" name="id114">peer_ban_alert</a></li>
|
||||
<li><a class="reference" href="#peer-error-alert" id="id115" name="id115">peer_error_alert</a></li>
|
||||
<li><a class="reference" href="#invalid-request-alert" id="id116" name="id116">invalid_request_alert</a></li>
|
||||
<li><a class="reference" href="#torrent-finished-alert" id="id117" name="id117">torrent_finished_alert</a></li>
|
||||
<li><a class="reference" href="#metadata-failed-alert" id="id118" name="id118">metadata_failed_alert</a></li>
|
||||
<li><a class="reference" href="#metadata-received-alert" id="id119" name="id119">metadata_received_alert</a></li>
|
||||
<li><a class="reference" href="#fastresume-rejected-alert" id="id120" name="id120">fastresume_rejected_alert</a></li>
|
||||
<li><a class="reference" href="#peer-blocked-alert" id="id121" name="id121">peer_blocked_alert</a></li>
|
||||
<li><a class="reference" href="#dispatcher" id="id122" name="id122">dispatcher</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#exceptions" id="id119" name="id119">exceptions</a><ul>
|
||||
<li><a class="reference" href="#invalid-handle" id="id120" name="id120">invalid_handle</a></li>
|
||||
<li><a class="reference" href="#duplicate-torrent" id="id121" name="id121">duplicate_torrent</a></li>
|
||||
<li><a class="reference" href="#invalid-encoding" id="id122" name="id122">invalid_encoding</a></li>
|
||||
<li><a class="reference" href="#type-error" id="id123" name="id123">type_error</a></li>
|
||||
<li><a class="reference" href="#invalid-torrent-file" id="id124" name="id124">invalid_torrent_file</a></li>
|
||||
<li><a class="reference" href="#exceptions" id="id123" name="id123">exceptions</a><ul>
|
||||
<li><a class="reference" href="#invalid-handle" id="id124" name="id124">invalid_handle</a></li>
|
||||
<li><a class="reference" href="#duplicate-torrent" id="id125" name="id125">duplicate_torrent</a></li>
|
||||
<li><a class="reference" href="#invalid-encoding" id="id126" name="id126">invalid_encoding</a></li>
|
||||
<li><a class="reference" href="#type-error" id="id127" name="id127">type_error</a></li>
|
||||
<li><a class="reference" href="#invalid-torrent-file" id="id128" name="id128">invalid_torrent_file</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#fast-resume" id="id125" name="id125">fast resume</a><ul>
|
||||
<li><a class="reference" href="#file-format" id="id126" name="id126">file format</a></li>
|
||||
<li><a class="reference" href="#fast-resume" id="id129" name="id129">fast resume</a><ul>
|
||||
<li><a class="reference" href="#file-format" id="id130" name="id130">file format</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#threads" id="id127" name="id127">threads</a></li>
|
||||
<li><a class="reference" href="#storage-allocation" id="id128" name="id128">storage allocation</a><ul>
|
||||
<li><a class="reference" href="#full-allocation" id="id129" name="id129">full allocation</a></li>
|
||||
<li><a class="reference" href="#compact-allocation" id="id130" name="id130">compact allocation</a></li>
|
||||
<li><a class="reference" href="#threads" id="id131" name="id131">threads</a></li>
|
||||
<li><a class="reference" href="#storage-allocation" id="id132" name="id132">storage allocation</a><ul>
|
||||
<li><a class="reference" href="#full-allocation" id="id133" name="id133">full allocation</a></li>
|
||||
<li><a class="reference" href="#compact-allocation" id="id134" name="id134">compact allocation</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#extensions" id="id131" name="id131">extensions</a><ul>
|
||||
<li><a class="reference" href="#metadata-from-peers" id="id132" name="id132">metadata from peers</a></li>
|
||||
<li><a class="reference" href="#http-seeding" id="id133" name="id133">HTTP seeding</a></li>
|
||||
<li><a class="reference" href="#extensions" id="id135" name="id135">extensions</a><ul>
|
||||
<li><a class="reference" href="#metadata-from-peers" id="id136" name="id136">metadata from peers</a></li>
|
||||
<li><a class="reference" href="#http-seeding" id="id137" name="id137">HTTP seeding</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#filename-checks" id="id134" name="id134">filename checks</a></li>
|
||||
<li><a class="reference" href="#acknowledgments" id="id135" name="id135">acknowledgments</a></li>
|
||||
<li><a class="reference" href="#filename-checks" id="id138" name="id138">filename checks</a></li>
|
||||
<li><a class="reference" href="#acknowledgments" id="id139" name="id139">acknowledgments</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section">
|
||||
|
@ -264,6 +268,14 @@ class session: public boost::noncopyable
|
|||
void set_max_connections(int limit);
|
||||
void set_max_half_open_connections(int limit);
|
||||
|
||||
void set_peer_proxy(proxy_settings const& s);
|
||||
void set_web_seed_proxy(proxy_settings const& s);
|
||||
void set_tracker_proxy(proxy_settings const& s);
|
||||
|
||||
proxy_settings const& peer_proxy() const;
|
||||
proxy_settings const& web_seed_proxy() const;
|
||||
proxy_settings const& tracker_proxy() const;
|
||||
|
||||
int num_uploads() const;
|
||||
int num_connections() const;
|
||||
|
||||
|
@ -629,6 +641,41 @@ ses.add_extension(&libtorrent::create_ut_pex_plugin);
|
|||
</pre>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="set-peer-proxy-set-web-seed-proxy-set-tracker-proxy-set-dht-proxy" name="set-peer-proxy-set-web-seed-proxy-set-tracker-proxy-set-dht-proxy">set_peer_proxy() set_web_seed_proxy() set_tracker_proxy() set_dht_proxy()</a></h2>
|
||||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
void set_peer_proxy(proxy_settings const& s);
|
||||
void set_web_seed_proxy(proxy_settings const& s);
|
||||
void set_tracker_proxy(proxy_settings const& s);
|
||||
void set_dht_proxy(proxy_settings const& s);
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>The <tt class="docutils literal"><span class="pre">set_dht_proxy</span></tt> is not available when DHT is disabled. These functions
|
||||
sets the proxy settings for different kinds of connections, bittorrent peers,
|
||||
web seeds, trackers and the DHT traffic.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">set_peer_proxy</span></tt> affects regular bittorrent peers. <tt class="docutils literal"><span class="pre">set_web_seed_proxy</span></tt>
|
||||
affects only web seeds. see <a class="reference" href="#http-seeding">HTTP seeding</a>.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">set_tracker_proxy</span></tt> only affects HTTP tracker connections (UDP tracker
|
||||
connections are affected if the given proxy supports UDP, e.g. SOCKS5).</p>
|
||||
<p><tt class="docutils literal"><span class="pre">set_dht_proxy</span></tt> affects the DHT messages. Since they are sent over UDP,
|
||||
it only has any effect if the proxy supports UDP.</p>
|
||||
<p>For more information on what settings are available for proxies, see
|
||||
<a class="reference" href="#proxy-settings">proxy_settings</a>.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="peer-proxy-web-seed-proxy-tracker-proxy-dht-proxy" name="peer-proxy-web-seed-proxy-tracker-proxy-dht-proxy">peer_proxy() web_seed_proxy() tracker_proxy() dht_proxy()</a></h2>
|
||||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
proxy_settings const& peer_proxy() const;
|
||||
proxy_settings const& web_seed_proxy() const;
|
||||
proxy_settings const& tracker_proxy() const;
|
||||
proxy_settings const& dht_proxy() const;
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>These functions returns references to their respective current settings.</p>
|
||||
<p>The <tt class="docutils literal"><span class="pre">dht_proxy</span></tt> is not available when DHT is disabled.</p>
|
||||
</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>
|
||||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
|
@ -1334,6 +1381,7 @@ By default all pieces have priority 1. That means that the random rarest
|
|||
first algorithm is effectively active for all pieces. You may however
|
||||
change the priority of individual pieces. There are 8 different priority
|
||||
levels:</p>
|
||||
<blockquote>
|
||||
<ol class="arabic simple" start="0">
|
||||
<li>piece is not downloaded at all</li>
|
||||
<li>normal priority. Download order is dependent on availability</li>
|
||||
|
@ -1347,6 +1395,7 @@ lower availability</li>
|
|||
<li>maximum priority, availability is disregarded, the piece is preferred
|
||||
over any other piece with lower priority</li>
|
||||
</ol>
|
||||
</blockquote>
|
||||
<p>The exact definitions of these priorities are implementation details, and
|
||||
subject to change. The interface guarantees that higher number means higher
|
||||
priority, and that 0 means do not download.</p>
|
||||
|
@ -1644,6 +1693,9 @@ not be ready to write resume data.</li>
|
|||
<p>Note that by the time this function returns, the resume data may already be invalid if the torrent
|
||||
is still downloading! The recommended practice is to first pause the torrent, then generate the
|
||||
fast resume data, and then close it down.</p>
|
||||
<p>It is still a good idea to save resume data periodically during download as well as when
|
||||
closing down. In full allocation mode the reume data is never invalidated by subsequent
|
||||
writes to the files, since pieces won't move around.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="id6" name="id6">status()</a></h2>
|
||||
|
@ -1676,6 +1728,8 @@ struct partial_piece_info
|
|||
std::bitset<max_blocks_per_piece> finished_blocks;
|
||||
address peer[max_blocks_per_piece];
|
||||
int num_downloads[max_blocks_per_piece];
|
||||
enum state_t { none, slow. medium, fast };
|
||||
state_t piece_state;
|
||||
};
|
||||
</pre>
|
||||
<p><tt class="docutils literal"><span class="pre">piece_index</span></tt> is the index of the piece in question. <tt class="docutils literal"><span class="pre">blocks_in_piece</span></tt> is the
|
||||
|
@ -1692,6 +1746,12 @@ peer the piece was requested from. If a piece hasn't been requested (the bit in
|
|||
or not. And the <tt class="docutils literal"><span class="pre">num_downloads</span></tt> array says how many times that block has been downloaded.
|
||||
When a piece fails a hash verification, single blocks may be re-downloaded to
|
||||
see if the hash test may pass then.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">piece_state</span></tt> is set to either <tt class="docutils literal"><span class="pre">fast</span></tt>, <tt class="docutils literal"><span class="pre">medium</span></tt>, <tt class="docutils literal"><span class="pre">slow</span></tt> or <tt class="docutils literal"><span class="pre">none</span></tt>. It tells which
|
||||
download rate category the peers downloading this piece falls into. <tt class="docutils literal"><span class="pre">none</span></tt> means that no
|
||||
peer is currently downloading any part of the piece. Peers prefer picking pieces from
|
||||
the same category as themselves. The reason for this is to keep the number of partially
|
||||
downloaded pieces down. Pieces set to <tt class="docutils literal"><span class="pre">none</span></tt> can be converted into any of <tt class="docutils literal"><span class="pre">fast</span></tt>,
|
||||
<tt class="docutils literal"><span class="pre">medium</span></tt> or <tt class="docutils literal"><span class="pre">slow</span></tt> as soon as a peer want to download from it.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="get-peer-info" name="get-peer-info">get_peer_info()</a></h2>
|
||||
|
@ -2111,10 +2171,6 @@ that will be sent to the tracker. The user-agent is a good way to identify your
|
|||
struct session_settings
|
||||
{
|
||||
session_settings();
|
||||
std::string proxy_ip;
|
||||
int proxy_port;
|
||||
std::string proxy_login;
|
||||
std::string proxy_password;
|
||||
std::string user_agent;
|
||||
int tracker_completion_timeout;
|
||||
int tracker_receive_timeout;
|
||||
|
@ -2135,13 +2191,6 @@ struct session_settings
|
|||
bool use_dht_as_fallback;
|
||||
};
|
||||
</pre>
|
||||
<p><tt class="docutils literal"><span class="pre">proxy_ip</span></tt> may be a hostname or ip to a http proxy to use. If this is
|
||||
an empty string, no http proxy will be used.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">proxy_port</span></tt> is the port on which the http proxy listens. If <tt class="docutils literal"><span class="pre">proxy_ip</span></tt>
|
||||
is empty, this will be ignored.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">proxy_login</span></tt> should be the login username for the http proxy, if this
|
||||
empty, the http proxy will be tried to be used without authentication.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">proxy_password</span></tt> the password string for the http proxy.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">user_agent</span></tt> this is the client identification to the tracker.
|
||||
The recommended format of this string is:
|
||||
"ClientName/ClientVersion libtorrent/libtorrentVersion".
|
||||
|
@ -2219,6 +2268,59 @@ all trackers in its tracker list has failed. Either by an explicit error
|
|||
message or a time out.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h1><a id="proxy-settings" name="proxy-settings">proxy_settings</a></h1>
|
||||
<p>The <tt class="docutils literal"><span class="pre">proxy_settings</span></tt> structs contains the information needed to
|
||||
direct certain traffic to a proxy.</p>
|
||||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
struct TORRENT_EXPORT proxy_settings
|
||||
{
|
||||
proxy_settings();
|
||||
|
||||
std::string hostname;
|
||||
int port;
|
||||
|
||||
std::string username;
|
||||
std::string password;
|
||||
|
||||
enum proxy_type
|
||||
{
|
||||
none,
|
||||
socks5,
|
||||
socks5_pw,
|
||||
http,
|
||||
http_pw
|
||||
};
|
||||
|
||||
proxy_type type;
|
||||
};
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p><tt class="docutils literal"><span class="pre">hostname</span></tt> is the name or IP of the proxy server. <tt class="docutils literal"><span class="pre">port</span></tt> is the
|
||||
port number the proxy listens to. If required, <tt class="docutils literal"><span class="pre">username</span></tt> and <tt class="docutils literal"><span class="pre">password</span></tt>
|
||||
can be set to authenticate with the proxy.</p>
|
||||
<p>The <tt class="docutils literal"><span class="pre">type</span></tt> tells libtorrent what kind of proxy server it is. The following
|
||||
options are available:</p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li><tt class="docutils literal"><span class="pre">none</span></tt> - This is the default, no proxy server is used, all other fields
|
||||
are ignored.</li>
|
||||
<li><tt class="docutils literal"><span class="pre">socks5</span></tt> - The server is assumed to be a SOCKS5 server (<a class="reference" href="http://www.faqs.org/rfcs/rfc1928.html">RFC 1928</a>) that
|
||||
does not require any authentication. The username and password are ignored.</li>
|
||||
<li><tt class="docutils literal"><span class="pre">socks5_pw</span></tt> - The server is assumed to be a SOCKS5 server that supports
|
||||
plain text username and password authentication (<a class="reference" href="http://www.faqs.org/rfcs/rfc1929.html">RFC 1929</a>). The username
|
||||
and password specified may be sent to the proxy if it requires.</li>
|
||||
<li><tt class="docutils literal"><span class="pre">http</span></tt> - The server is assumed to be an HTTP proxy. If the transport used
|
||||
for the connection is non-HTTP, the server is assumed to support the
|
||||
<a class="reference" href="draft-luotonen-web-proxy-tunneling-01.txt">CONNECT</a> method. i.e. for web seeds and HTTP trackers, a plain proxy will
|
||||
suffice. The proxy is assumed to not require authorization. The username
|
||||
and password will not be used.</li>
|
||||
<li><tt class="docutils literal"><span class="pre">http_pw</span></tt> - The server is assumed to be an HTTP proxy that requires
|
||||
user authorization. The username and password will be sent to the proxy.</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h1><a id="ip-filter" name="ip-filter">ip_filter</a></h1>
|
||||
<p>The <tt class="docutils literal"><span class="pre">ip_filter</span></tt> class is a set of rules that uniquely categorizes all
|
||||
ip addresses as allowed or disallowed. The default constructor creates
|
||||
|
@ -2484,6 +2586,20 @@ entry e = bdecode(buf, buf + data_size);
|
|||
<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" href="#invalid-encoding">invalid_encoding</a>.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="supports-sparse-files" name="supports-sparse-files">supports_sparse_files()</a></h2>
|
||||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
bool supports_sparse_files(boost::filesystem::path const&);
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>The path is expected to be the path to the directory where you will want to
|
||||
store sparse files. The return value is true if the file system supports
|
||||
sparse files or if it supports automatic zero filling of files. The main
|
||||
characteristics that is tested by this function is not the storage aspects
|
||||
of sparse files, but rather the support for seeking passed end of file and
|
||||
write data there, with expected behavior.</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h1><a id="alerts" name="alerts">alerts</a></h1>
|
||||
|
@ -3115,6 +3231,13 @@ All the files must match exactly this information in order
|
|||
to consider the resume data as current. Otherwise a full
|
||||
re-check is issued.</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">allocation</span></tt></td>
|
||||
<td>The allocation mode for the storage. Can be either <tt class="docutils literal"><span class="pre">full</span></tt>
|
||||
or <tt class="docutils literal"><span class="pre">compact</span></tt>. If this is full, the file sizes and
|
||||
timestamps are disregarded. Pieces are assumed not to have
|
||||
moved around even if the files have been modified after the
|
||||
last resume data checkpoint.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -3144,7 +3267,10 @@ non-blocking host name resolution to simulate non-blocking behavior.</li>
|
|||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>The traditional <em>full allocation</em> mode, where the entire files are filled up with
|
||||
zeros before anything is downloaded.</li>
|
||||
zeros before anything is downloaded. libtorrent will look for sparse files support
|
||||
in the filesystem that is used for storage, and use sparse files or file system
|
||||
zero fill support if present. This means that on NTFS, full allocation mode will
|
||||
only allocate storage for the downloaded pieces.</li>
|
||||
<li>And the <em>compact allocation</em> mode, where only files are allocated for actual
|
||||
pieces that have been downloaded. This is the default allocation mode in libtorrent.</li>
|
||||
</ul>
|
||||
|
@ -3152,17 +3278,24 @@ pieces that have been downloaded. This is the default allocation mode in libtorr
|
|||
<p>The allocation mode is selected when a torrent is started. It is passed as a boolean
|
||||
argument to <tt class="docutils literal"><span class="pre">session::add_torrent()</span></tt> (see <a class="reference" href="#add-torrent">add_torrent()</a>). These two modes have
|
||||
different drawbacks and benefits.</p>
|
||||
<p>The decision to use full allocation or compact allocation typically depends on whether
|
||||
any files are filtered and if the filesystem supports sparse files.</p>
|
||||
<p>To know if the filesystem supports sparse files (and to know if libtorrent believes the
|
||||
filesystem supports sparse files), see <a class="reference" href="#supports-sparse-files">supports_sparse_files()</a>.</p>
|
||||
<div class="section">
|
||||
<h2><a id="full-allocation" name="full-allocation">full allocation</a></h2>
|
||||
<p>When a torrent is started in full allocation mode, the checker thread (see <a class="reference" href="#threads">threads</a>)
|
||||
will make sure that the entire storage is allocated, and fill any gaps with zeros.
|
||||
This will be skipped if the filesystem supports sparse files or automatic zero filling.
|
||||
It will of course still check for existing pieces and fast resume data. The main
|
||||
drawbacks of this mode are:</p>
|
||||
<blockquote>
|
||||
<ul class="simple">
|
||||
<li>It will take longer to start the torrent, since it will need to fill the files
|
||||
with zeros. This delay is linearly dependent on the size of the download.</li>
|
||||
<li>The download will occupy unnecessary disk space between download sessions.</li>
|
||||
<li>It may take longer to start the torrent, since it will need to fill the files
|
||||
with zeros on some systems. This delay is linearly dependent on the size of
|
||||
the download.</li>
|
||||
<li>The download may occupy unnecessary disk space between download sessions. In case
|
||||
sparse files are not supported.</li>
|
||||
<li>Disk caches usually perform extremely poorly with random access to large files
|
||||
and may slow down a download considerably.</li>
|
||||
</ul>
|
||||
|
@ -3173,7 +3306,11 @@ and may slow down a download considerably.</li>
|
|||
<li>Downloaded pieces are written directly to their final place in the files and the
|
||||
total number of disk operations will be fewer and may also play nicer to
|
||||
filesystems' file allocation, and reduce fragmentation.</li>
|
||||
<li>No risk of a download failing because of a full disk during download.</li>
|
||||
<li>No risk of a download failing because of a full disk during download. Unless
|
||||
sparse files are being used.</li>
|
||||
<li>The fast resume data will be more likely to be usable, regardless of crashes or
|
||||
out of date data, since pieces won't move around.</li>
|
||||
<li>Can be used with the filter files feature.</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</div>
|
||||
|
@ -3187,6 +3324,7 @@ download has all its pieces in the correct place). So, the main drawbacks are:</
|
|||
<ul class="simple">
|
||||
<li>More disk operations while downloading since pieces are moved around.</li>
|
||||
<li>Potentially more fragmentation in the filesystem.</li>
|
||||
<li>Cannot be used while filtering files.</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<p>The benefits though, are:</p>
|
||||
|
@ -3196,6 +3334,7 @@ download has all its pieces in the correct place). So, the main drawbacks are:</
|
|||
<li>The download will not use unnecessary disk space.</li>
|
||||
<li>Disk caches perform much better than in full allocation and raises the download
|
||||
speed limit imposed by the disk.</li>
|
||||
<li>Works well on filesystems that doesn't support sparse files.</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
<p>The algorithm that is used when allocating pieces and slots isn't very complicated.
|
||||
|
|
|
@ -1334,7 +1334,7 @@ namespace libtorrent
|
|||
peer_speed_t speed = peer_speed();
|
||||
if (speed == fast) state = piece_picker::fast;
|
||||
else if (speed == medium) state = piece_picker::medium;
|
||||
else if (speed == slow) state = piece_picker::slow;
|
||||
else state = piece_picker::slow;
|
||||
|
||||
t->picker().mark_as_downloading(block, m_remote, state);
|
||||
|
||||
|
@ -2425,8 +2425,8 @@ namespace libtorrent
|
|||
shared_ptr<torrent> t = m_torrent.lock();
|
||||
assert(t);
|
||||
|
||||
int download_rate = statistics().download_payload_rate();
|
||||
int torrent_download_rate = t->statistics().download_payload_rate();
|
||||
int download_rate = int(statistics().download_payload_rate());
|
||||
int torrent_download_rate = int(t->statistics().download_payload_rate());
|
||||
|
||||
if (download_rate > 512 && download_rate > torrent_download_rate / 16)
|
||||
m_speed = fast;
|
||||
|
|
|
@ -1449,26 +1449,28 @@ namespace libtorrent
|
|||
assert(std::find_if(m_downloads.begin(), m_downloads.end()
|
||||
, has_index(block.piece_index)) == m_downloads.end());
|
||||
}
|
||||
|
||||
// TODO: maintain requested and finished counters so that
|
||||
// we don't have to count every time
|
||||
bool blocks_requested = false;
|
||||
int num_blocks = blocks_in_piece(i->index);
|
||||
for (int k = 0; k < num_blocks; ++k)
|
||||
else
|
||||
{
|
||||
if (i->finished_blocks[k]) continue;
|
||||
if (i->requested_blocks[k])
|
||||
// TODO: maintain requested and finished counters so that
|
||||
// we don't have to count every time
|
||||
bool blocks_requested = false;
|
||||
int num_blocks = blocks_in_piece(i->index);
|
||||
for (int k = 0; k < num_blocks; ++k)
|
||||
{
|
||||
blocks_requested = true;
|
||||
break;
|
||||
if (i->finished_blocks[k]) continue;
|
||||
if (i->requested_blocks[k])
|
||||
{
|
||||
blocks_requested = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!blocks_requested)
|
||||
{
|
||||
// there are no blocks requested in this piece.
|
||||
// remove the fast/slow state from it
|
||||
i->state = none;
|
||||
if (!blocks_requested)
|
||||
{
|
||||
// there are no blocks requested in this piece.
|
||||
// remove the fast/slow state from it
|
||||
i->state = none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -204,7 +204,7 @@ namespace libtorrent
|
|||
peer_connection::peer_speed_t speed = c.peer_speed();
|
||||
if (speed == peer_connection::fast) state = piece_picker::fast;
|
||||
else if (speed == peer_connection::medium) state = piece_picker::medium;
|
||||
else if (speed == peer_connection::slow) state = piece_picker::slow;
|
||||
else state = piece_picker::slow;
|
||||
|
||||
// picks the interesting pieces from this peer
|
||||
// the integer is the number of pieces that
|
||||
|
|
Loading…
Reference in New Issue