--- /srv/reproducible-results/rbuild-debian/r-b-build.tuwZ7TWz/b1/libtorrent-rasterbar_2.0.11-1_amd64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.tuwZ7TWz/b2/libtorrent-rasterbar_2.0.11-1_amd64.changes ├── Files │ @@ -1,7 +1,7 @@ │ │ 1e537d9298a8b265e97c6e12e4bbe431 366364 libdevel optional libtorrent-rasterbar-dev_2.0.11-1_amd64.deb │ - aad493af91189fd3a3ea349f5261ed13 1669404 doc optional libtorrent-rasterbar-doc_2.0.11-1_all.deb │ + 862558527d40a8175c3e0bf35f9cbbfe 1673000 doc optional libtorrent-rasterbar-doc_2.0.11-1_all.deb │ 485765ffb39c95d6338a1b22f3e9a512 51347588 debug optional libtorrent-rasterbar2.0t64-dbgsym_2.0.11-1_amd64.deb │ 83d4eee26889e023efdcb2babe89931d 1671304 libs optional libtorrent-rasterbar2.0t64_2.0.11-1_amd64.deb │ 05f22fb2b73b5321af17dd149f874b52 13370300 debug optional python3-libtorrent-dbgsym_2.0.11-1_amd64.deb │ 3e984485a30480c296297ff6773dec82 711992 python optional python3-libtorrent_2.0.11-1_amd64.deb ├── libtorrent-rasterbar-doc_2.0.11-1_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2025-01-28 14:33:12.000000 debian-binary │ │ --rw-r--r-- 0 0 0 3636 2025-01-28 14:33:12.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 1665576 2025-01-28 14:33:12.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 3632 2025-01-28 14:33:12.000000 control.tar.xz │ │ +-rw-r--r-- 0 0 0 1669176 2025-01-28 14:33:12.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./control │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ Package: libtorrent-rasterbar-doc │ │ │ │ Source: libtorrent-rasterbar │ │ │ │ Version: 2.0.11-1 │ │ │ │ Architecture: all │ │ │ │ Maintainer: Christian Marillat │ │ │ │ -Installed-Size: 5773 │ │ │ │ +Installed-Size: 5941 │ │ │ │ Section: doc │ │ │ │ Priority: optional │ │ │ │ Multi-Arch: foreign │ │ │ │ Homepage: https://libtorrent.org/ │ │ │ │ Description: Documentation for libtorrent-rasterbar │ │ │ │ Bittorrent library by Rasterbar Software (Arvid Norberg). │ │ │ │ libtorrent-rasterbar is a C++ library that aims to be a good alternative to │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── file list │ │ │ │ @@ -78,38 +78,38 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9631 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/img/write_disk_buffers.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9768 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/index.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 144603 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/manual-ref.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9650 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/projects.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 22814 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/python_binding.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 33687 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Add_Torrent.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 256772 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Alerts.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 27441 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Bdecoding.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 27437 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Bdecoding.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 25856 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Bencoding.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 88949 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Core.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 43859 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Create_Torrents.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 50915 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Custom_Storage.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 137008 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Custom_Storage.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 24960 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-DHT.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 48763 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Error_Codes.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 13261 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Filter.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12804 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-PeerClass.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 68487 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Plugins.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9618 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Resume_Data.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 102460 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Session.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 102455 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Session.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 169276 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Settings.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9742 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Stats.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 56863 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Storage.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 129821 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Handle.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55637 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Info.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 48385 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Status.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16459 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Trackers.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 56848 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Storage.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 129801 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Handle.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55629 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Info.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 48392 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Status.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16461 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Trackers.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 25530 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Utility.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9129 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-ed25519.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 34353 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 29242 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/security-audit.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1274794 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/single-page-ref.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1360844 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/single-page-ref.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 10121 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/streaming.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8807 2025-01-28 10:57:42.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/style.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 522888 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/todo.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3023 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/troubleshooting.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 25162 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/tuning-ref.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 132630 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/tutorial-ref.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 16383 2025-01-28 14:33:12.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/udp_tracker_protocol.html │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Add_Torrent.html │ │ │ │ @@ -31,15 +31,15 @@ │ │ │ │

home

│ │ │ │
│ │ │ │

Table of contents

│ │ │ │ │ │ │ │
│ │ │ │ [report issue]
│ │ │ │

add_torrent_params

│ │ │ │

Declared in "libtorrent/add_torrent_params.hpp"

│ │ │ │ @@ -370,40 +370,40 @@ │ │ │ │ requiring the same type be requested out of it as was assigned to it.

│ │ │ │
│ │ │ │  struct client_data_t
│ │ │ │  {
│ │ │ │     client_data_t () = default;
│ │ │ │     explicit client_data_t (T* v);
│ │ │ │     client_data_t& operator= (T* v);
│ │ │ │ -   T* get () const;
│ │ │ │     explicit operator T () const;
│ │ │ │ -   client_data_t& operator= (void*) = delete;
│ │ │ │ -   operator void* () const = delete;
│ │ │ │ +   T* get () const;
│ │ │ │     client_data_t& operator= (void const*) = delete;
│ │ │ │     operator void const* () const = delete;
│ │ │ │ +   operator void* () const = delete;
│ │ │ │ +   client_data_t& operator= (void*) = delete;
│ │ │ │  
│ │ │ │     template <typename T, typename U  = typename std::enable_if<std::is_pointer<T>::value>::type>
│ │ │ │  };
│ │ │ │  
│ │ │ │ [report issue]
│ │ │ │

client_data_t()

│ │ │ │
│ │ │ │  client_data_t () = default;
│ │ │ │  
│ │ │ │

construct a nullptr client data

│ │ │ │ - │ │ │ │ │ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

const*() operator=() void*()

│ │ │ │ + │ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

operator=() void*() const*()

│ │ │ │
│ │ │ │ -client_data_t& operator= (void*) = delete;
│ │ │ │ -operator void* () const = delete;
│ │ │ │  client_data_t& operator= (void const*) = delete;
│ │ │ │  operator void const* () const = delete;
│ │ │ │ +operator void* () const = delete;
│ │ │ │ +client_data_t& operator= (void*) = delete;
│ │ │ │  
│ │ │ │

we don't allow type-unsafe operations

│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,15 +2,15 @@ │ │ │ │ │ _[_l_i_b_t_o_r_r_e_n_t_ _l_o_g_o_] │ │ │ │ │ VVeerrssiioonn:: 2.0.11 │ │ │ │ │ _h_o_m_e │ │ │ │ │ Table of contents │ │ │ │ │ * _a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s │ │ │ │ │ * _c_l_i_e_n_t___d_a_t_a___t │ │ │ │ │ o _c_l_i_e_n_t___d_a_t_a___t_(_) │ │ │ │ │ - o _c_o_n_s_t_*_(_)_ _o_p_e_r_a_t_o_r_=_(_)_ _v_o_i_d_*_(_) │ │ │ │ │ + o _o_p_e_r_a_t_o_r_=_(_)_ _v_o_i_d_*_(_)_ _c_o_n_s_t_*_(_) │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ aadddd__ttoorrrreenntt__ppaarraammss ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s_._h_p_p" │ │ │ │ │ The _a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s contains all the information in a .torrent file along │ │ │ │ │ with all information necessary to add that torrent to a _s_e_s_s_i_o_n. The key fields │ │ │ │ │ when adding a torrent are: │ │ │ │ │ * ti - the immutable info-dict part of the torrent │ │ │ │ │ @@ -270,34 +270,34 @@ │ │ │ │ │ passed in to libtorrent and returned on demand. It adds type-safety by │ │ │ │ │ requiring the same type be requested out of it as was assigned to it. │ │ │ │ │ struct client_data_t │ │ │ │ │ { │ │ │ │ │ cclliieenntt__ddaattaa__tt () = default; │ │ │ │ │ explicit cclliieenntt__ddaattaa__tt (T* v); │ │ │ │ │ client_data_t& ooppeerraattoorr== (T* v); │ │ │ │ │ - T* ggeett () const; │ │ │ │ │ explicit operator TT () const; │ │ │ │ │ - client_data_t& ooppeerraattoorr== (void*) = delete; │ │ │ │ │ - operator vvooiidd** () const = delete; │ │ │ │ │ + T* ggeett () const; │ │ │ │ │ client_data_t& ooppeerraattoorr== (void const*) = delete; │ │ │ │ │ operator void ccoonnsstt** () const = delete; │ │ │ │ │ + operator vvooiidd** () const = delete; │ │ │ │ │ + client_data_t& ooppeerraattoorr== (void*) = delete; │ │ │ │ │ │ │ │ │ │ template ::value>::type> │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** cclliieenntt__ddaattaa__tt(()) ********** │ │ │ │ │ cclliieenntt__ddaattaa__tt () = default; │ │ │ │ │ construct a nullptr client data │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ccoonnsstt**(()) ooppeerraattoorr==(()) vvooiidd**(()) ********** │ │ │ │ │ -client_data_t& ooppeerraattoorr== (void*) = delete; │ │ │ │ │ -operator vvooiidd** () const = delete; │ │ │ │ │ +********** ooppeerraattoorr==(()) vvooiidd**(()) ccoonnsstt**(()) ********** │ │ │ │ │ client_data_t& ooppeerraattoorr== (void const*) = delete; │ │ │ │ │ operator void ccoonnsstt** () const = delete; │ │ │ │ │ +operator vvooiidd** () const = delete; │ │ │ │ │ +client_data_t& ooppeerraattoorr== (void*) = delete; │ │ │ │ │ we don't allow type-unsafe operations │ │ │ │ │ _h_o_m_e │ │ │ │ │ _b_l_o_g │ │ │ │ │ _u_T_P │ │ │ │ │ _d_o_w_n_l_o_a_d │ │ │ │ │ _d_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ │ │ _D_H_T_ _p_u_t_ _e_x_t_e_n_s_i_o_n │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Alerts.html │ │ │ │ @@ -28,211 +28,211 @@ │ │ │ │ 2.0.11 │ │ │ │ │ │ │ │ │ │ │ │

home

│ │ │ │
│ │ │ │

Table of contents

│ │ │ │
│ │ │ │

The pop_alerts() function on session is the main interface for retrieving │ │ │ │ alerts (warnings, messages and errors from libtorrent). If no alerts have │ │ │ │ been posted by libtorrent pop_alerts() will return an empty list.

│ │ │ │

By default, only errors are reported. settings_pack::alert_mask can be │ │ │ │ used to specify which kinds of events should be reported. The alert mask is │ │ │ │ @@ -246,124 +246,15 @@ │ │ │ │

There are other alert base classes that some alerts derive from, all the │ │ │ │ alerts that are generated for a specific torrent are derived from │ │ │ │ torrent_alert, and tracker events derive from tracker_alert.

│ │ │ │

Alerts returned by pop_alerts() are only valid until the next call to │ │ │ │ pop_alerts(). You may not copy an alert object to access it after the next │ │ │ │ call to pop_alerts(). Internal members of alerts also become invalid once │ │ │ │ pop_alerts() is called again.

│ │ │ │ -[report issue]
│ │ │ │ -

alert

│ │ │ │ -

Declared in "libtorrent/alert.hpp"

│ │ │ │ -

The alert class is the base class that specific messages are derived from. │ │ │ │ -alert types are not copyable, and cannot be constructed by the client. The │ │ │ │ -pointers returned by libtorrent are short lived (the details are described │ │ │ │ -under session_handle::pop_alerts())

│ │ │ │ -
│ │ │ │ -struct alert
│ │ │ │ -{
│ │ │ │ -   time_point timestamp () const;
│ │ │ │ -   virtual int type () const noexcept = 0;
│ │ │ │ -   virtual char const* what () const noexcept = 0;
│ │ │ │ -   virtual std::string message () const = 0;
│ │ │ │ -   virtual alert_category_t category () const noexcept = 0;
│ │ │ │ -
│ │ │ │ -   static constexpr alert_category_t error_notification  = 0_bit;
│ │ │ │ -   static constexpr alert_category_t peer_notification  = 1_bit;
│ │ │ │ -   static constexpr alert_category_t port_mapping_notification  = 2_bit;
│ │ │ │ -   static constexpr alert_category_t storage_notification  = 3_bit;
│ │ │ │ -   static constexpr alert_category_t tracker_notification  = 4_bit;
│ │ │ │ -   static constexpr alert_category_t connect_notification  = 5_bit;
│ │ │ │ -   static constexpr alert_category_t status_notification  = 6_bit;
│ │ │ │ -   static constexpr alert_category_t ip_block_notification  = 8_bit;
│ │ │ │ -   static constexpr alert_category_t performance_warning  = 9_bit;
│ │ │ │ -   static constexpr alert_category_t dht_notification  = 10_bit;
│ │ │ │ -   static constexpr alert_category_t session_log_notification  = 13_bit;
│ │ │ │ -   static constexpr alert_category_t torrent_log_notification  = 14_bit;
│ │ │ │ -   static constexpr alert_category_t peer_log_notification  = 15_bit;
│ │ │ │ -   static constexpr alert_category_t incoming_request_notification  = 16_bit;
│ │ │ │ -   static constexpr alert_category_t dht_log_notification  = 17_bit;
│ │ │ │ -   static constexpr alert_category_t dht_operation_notification  = 18_bit;
│ │ │ │ -   static constexpr alert_category_t port_mapping_log_notification  = 19_bit;
│ │ │ │ -   static constexpr alert_category_t picker_log_notification  = 20_bit;
│ │ │ │ -   static constexpr alert_category_t file_progress_notification  = 21_bit;
│ │ │ │ -   static constexpr alert_category_t piece_progress_notification  = 22_bit;
│ │ │ │ -   static constexpr alert_category_t upload_notification  = 23_bit;
│ │ │ │ -   static constexpr alert_category_t block_progress_notification  = 24_bit;
│ │ │ │ -   static constexpr alert_category_t all_categories  = alert_category_t::all();
│ │ │ │ -};
│ │ │ │ -
│ │ │ │ -[report issue]
│ │ │ │ -

timestamp()

│ │ │ │ -
│ │ │ │ -time_point timestamp () const;
│ │ │ │ -
│ │ │ │ -

a timestamp is automatically created in the constructor

│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

type()

│ │ │ │ -
│ │ │ │ -virtual int type () const noexcept = 0;
│ │ │ │ -
│ │ │ │ -

returns an integer that is unique to this alert type. It can be │ │ │ │ -compared against a specific alert by querying a static constant called alert_type │ │ │ │ -in the alert. It can be used to determine the run-time type of an alert* in │ │ │ │ -order to cast to that alert type and access specific members.

│ │ │ │ -

e.g:

│ │ │ │ -
│ │ │ │ -std::vector<alert*> alerts;
│ │ │ │ -ses.pop_alerts(&alerts);
│ │ │ │ -for (alert* a : alerts) {
│ │ │ │ -        switch (a->type()) {
│ │ │ │ -
│ │ │ │ -                case read_piece_alert::alert_type:
│ │ │ │ -                {
│ │ │ │ -                        auto* p = static_cast<read_piece_alert*>(a);
│ │ │ │ -                        if (p->ec) {
│ │ │ │ -                                // read_piece failed
│ │ │ │ -                                break;
│ │ │ │ -                        }
│ │ │ │ -                        // use p
│ │ │ │ -                        break;
│ │ │ │ -                }
│ │ │ │ -                case file_renamed_alert::alert_type:
│ │ │ │ -                {
│ │ │ │ -                        // etc...
│ │ │ │ -                }
│ │ │ │ -        }
│ │ │ │ -}
│ │ │ │ -
│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

what()

│ │ │ │ -
│ │ │ │ -virtual char const* what () const noexcept = 0;
│ │ │ │ -
│ │ │ │ -

returns a string literal describing the type of the alert. It does │ │ │ │ -not include any information that might be bundled with the alert.

│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

message()

│ │ │ │ -
│ │ │ │ -virtual std::string message () const = 0;
│ │ │ │ -
│ │ │ │ -

generate a string describing the alert and the information bundled │ │ │ │ -with it. This is mainly intended for debug and development use. It is not suitable │ │ │ │ -to use this for applications that may be localized. Instead, handle each alert │ │ │ │ -type individually and extract and render the information from the alert depending │ │ │ │ -on the locale.

│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

category()

│ │ │ │ -
│ │ │ │ -virtual alert_category_t category () const noexcept = 0;
│ │ │ │ -
│ │ │ │ -

returns a bitmask specifying which categories this alert belong to.

│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -
│ │ │ │ +[report issue]
│ │ │ │

dht_routing_bucket

│ │ │ │

Declared in "libtorrent/alert_types.hpp"

│ │ │ │

struct to hold information about a single DHT routing table bucket

│ │ │ │
│ │ │ │  struct dht_routing_bucket
│ │ │ │  {
│ │ │ │     int num_nodes;
│ │ │ │ @@ -394,15 +285,15 @@
│ │ │ │  {
│ │ │ │     std::string message () const override;
│ │ │ │     char const* torrent_name () const;
│ │ │ │  
│ │ │ │     torrent_handle handle;
│ │ │ │  };
│ │ │ │  
│ │ │ │ -[report issue]
│ │ │ │ +[report issue]
│ │ │ │

message()

│ │ │ │
│ │ │ │  std::string message () const override;
│ │ │ │  
│ │ │ │

returns the message associated with this alert

│ │ │ │ [report issue]
│ │ │ │
handle
│ │ │ │ @@ -551,17 +442,17 @@ │ │ │ │ char const* old_name () const; │ │ │ │ char const* new_name () const; │ │ │ │ │ │ │ │ static constexpr alert_category_t static_category = alert_category::storage; │ │ │ │ file_index_t const index; │ │ │ │ }; │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
│ │ │ │ -

new_name() old_name()

│ │ │ │ + │ │ │ │ +[report issue]
│ │ │ │ +

old_name() new_name()

│ │ │ │
│ │ │ │  char const* old_name () const;
│ │ │ │  char const* new_name () const;
│ │ │ │  
│ │ │ │

returns the new and previous file name, respectively.

│ │ │ │ [report issue]
│ │ │ │
index
│ │ │ │ @@ -1287,26 +1178,26 @@ │ │ │ │ torrent_handle::move_storage. This is useful to synchronize with the │ │ │ │ actual disk. The storage_path() member return the new path of the │ │ │ │ storage.

│ │ │ │
│ │ │ │  struct storage_moved_alert final : torrent_alert
│ │ │ │  {
│ │ │ │     std::string message () const override;
│ │ │ │ -   char const* storage_path () const;
│ │ │ │     char const* old_path () const;
│ │ │ │ +   char const* storage_path () const;
│ │ │ │  
│ │ │ │     static constexpr alert_category_t static_category  = alert_category::storage;
│ │ │ │  };
│ │ │ │  
│ │ │ │ - │ │ │ │ -[report issue]
│ │ │ │ -

old_path() storage_path()

│ │ │ │ + │ │ │ │ +[report issue]
│ │ │ │ +

storage_path() old_path()

│ │ │ │
│ │ │ │ -char const* storage_path () const;
│ │ │ │  char const* old_path () const;
│ │ │ │ +char const* storage_path () const;
│ │ │ │  
│ │ │ │

the path the torrent was moved to and from, respectively.

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │
│ │ │ │

storage_moved_failed_alert

│ │ │ │

Declared in "libtorrent/alert_types.hpp"

│ │ │ │ @@ -2944,27 +2835,27 @@ │ │ │ │

posted in response to a call to session::dht_live_nodes(). It contains the │ │ │ │ live nodes from the DHT routing table of one of the DHT nodes running │ │ │ │ locally.

│ │ │ │
│ │ │ │  struct dht_live_nodes_alert final : alert
│ │ │ │  {
│ │ │ │     std::string message () const override;
│ │ │ │ -   int num_nodes () const;
│ │ │ │     std::vector<std::pair<sha1_hash, udp::endpoint>> nodes () const;
│ │ │ │ +   int num_nodes () const;
│ │ │ │  
│ │ │ │     static constexpr alert_category_t static_category  = alert_category::dht;
│ │ │ │     sha1_hash node_id;
│ │ │ │  };
│ │ │ │  
│ │ │ │ │ │ │ │ [report issue]
│ │ │ │

nodes() num_nodes()

│ │ │ │
│ │ │ │ -int num_nodes () const;
│ │ │ │  std::vector<std::pair<sha1_hash, udp::endpoint>> nodes () const;
│ │ │ │ +int num_nodes () const;
│ │ │ │  
│ │ │ │

the number of nodes in the routing table and the actual nodes.

│ │ │ │ [report issue]
│ │ │ │
node_id
│ │ │ │
the local DHT node's node-ID this routing table belongs to
│ │ │ │
│ │ │ │ [report issue]
│ │ │ │ @@ -2993,32 +2884,32 @@ │ │ │ │

Declared in "libtorrent/alert_types.hpp"

│ │ │ │

posted as a response to a call to session::dht_sample_infohashes() with │ │ │ │ the information from the DHT response message.

│ │ │ │
│ │ │ │  struct dht_sample_infohashes_alert final : alert
│ │ │ │  {
│ │ │ │     std::string message () const override;
│ │ │ │ -   std::vector<sha1_hash> samples () const;
│ │ │ │     int num_samples () const;
│ │ │ │ +   std::vector<sha1_hash> samples () const;
│ │ │ │     int num_nodes () const;
│ │ │ │     std::vector<std::pair<sha1_hash, udp::endpoint>> nodes () const;
│ │ │ │  
│ │ │ │     static constexpr alert_category_t static_category  = alert_category::dht_operation;
│ │ │ │     sha1_hash node_id;
│ │ │ │     aux::noexcept_movable<udp::endpoint> endpoint;
│ │ │ │     time_duration const interval;
│ │ │ │     int const num_infohashes;
│ │ │ │  };
│ │ │ │  
│ │ │ │ │ │ │ │ [report issue]
│ │ │ │

num_samples() samples()

│ │ │ │
│ │ │ │ -std::vector<sha1_hash> samples () const;
│ │ │ │  int num_samples () const;
│ │ │ │ +std::vector<sha1_hash> samples () const;
│ │ │ │  
│ │ │ │

returns the number of info-hashes returned by the node, as well as the │ │ │ │ actual info-hashes. num_samples() is more efficient than │ │ │ │ samples().size().

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

num_nodes()

│ │ │ │ @@ -3294,38 +3185,147 @@ │ │ │ │ std::vector<announce_entry> trackers; │ │ │ │ }; │ │ │ │ │ │ │ │ [report issue]
│ │ │ │
trackers
│ │ │ │
list of trackers and their status for the torrent
│ │ │ │
│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

operation_name()

│ │ │ │ -

Declared in "libtorrent/operations.hpp"

│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

alert

│ │ │ │ +

Declared in "libtorrent/alert.hpp"

│ │ │ │ +

The alert class is the base class that specific messages are derived from. │ │ │ │ +alert types are not copyable, and cannot be constructed by the client. The │ │ │ │ +pointers returned by libtorrent are short lived (the details are described │ │ │ │ +under session_handle::pop_alerts())

│ │ │ │
│ │ │ │ -char const* operation_name (operation_t op);
│ │ │ │ +struct alert
│ │ │ │ +{
│ │ │ │ +   time_point timestamp () const;
│ │ │ │ +   virtual int type () const noexcept = 0;
│ │ │ │ +   virtual char const* what () const noexcept = 0;
│ │ │ │ +   virtual std::string message () const = 0;
│ │ │ │ +   virtual alert_category_t category () const noexcept = 0;
│ │ │ │ +
│ │ │ │ +   static constexpr alert_category_t error_notification  = 0_bit;
│ │ │ │ +   static constexpr alert_category_t peer_notification  = 1_bit;
│ │ │ │ +   static constexpr alert_category_t port_mapping_notification  = 2_bit;
│ │ │ │ +   static constexpr alert_category_t storage_notification  = 3_bit;
│ │ │ │ +   static constexpr alert_category_t tracker_notification  = 4_bit;
│ │ │ │ +   static constexpr alert_category_t connect_notification  = 5_bit;
│ │ │ │ +   static constexpr alert_category_t status_notification  = 6_bit;
│ │ │ │ +   static constexpr alert_category_t ip_block_notification  = 8_bit;
│ │ │ │ +   static constexpr alert_category_t performance_warning  = 9_bit;
│ │ │ │ +   static constexpr alert_category_t dht_notification  = 10_bit;
│ │ │ │ +   static constexpr alert_category_t session_log_notification  = 13_bit;
│ │ │ │ +   static constexpr alert_category_t torrent_log_notification  = 14_bit;
│ │ │ │ +   static constexpr alert_category_t peer_log_notification  = 15_bit;
│ │ │ │ +   static constexpr alert_category_t incoming_request_notification  = 16_bit;
│ │ │ │ +   static constexpr alert_category_t dht_log_notification  = 17_bit;
│ │ │ │ +   static constexpr alert_category_t dht_operation_notification  = 18_bit;
│ │ │ │ +   static constexpr alert_category_t port_mapping_log_notification  = 19_bit;
│ │ │ │ +   static constexpr alert_category_t picker_log_notification  = 20_bit;
│ │ │ │ +   static constexpr alert_category_t file_progress_notification  = 21_bit;
│ │ │ │ +   static constexpr alert_category_t piece_progress_notification  = 22_bit;
│ │ │ │ +   static constexpr alert_category_t upload_notification  = 23_bit;
│ │ │ │ +   static constexpr alert_category_t block_progress_notification  = 24_bit;
│ │ │ │ +   static constexpr alert_category_t all_categories  = alert_category_t::all();
│ │ │ │ +};
│ │ │ │  
│ │ │ │ -

maps an operation id (from peer_error_alert and peer_disconnected_alert) │ │ │ │ -to its name. See operation_t for the constants

│ │ │ │ +[report issue]
│ │ │ │ +

timestamp()

│ │ │ │ +
│ │ │ │ +time_point timestamp () const;
│ │ │ │ +
│ │ │ │ +

a timestamp is automatically created in the constructor

│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

type()

│ │ │ │ +
│ │ │ │ +virtual int type () const noexcept = 0;
│ │ │ │ +
│ │ │ │ +

returns an integer that is unique to this alert type. It can be │ │ │ │ +compared against a specific alert by querying a static constant called alert_type │ │ │ │ +in the alert. It can be used to determine the run-time type of an alert* in │ │ │ │ +order to cast to that alert type and access specific members.

│ │ │ │ +

e.g:

│ │ │ │ +
│ │ │ │ +std::vector<alert*> alerts;
│ │ │ │ +ses.pop_alerts(&alerts);
│ │ │ │ +for (alert* a : alerts) {
│ │ │ │ +        switch (a->type()) {
│ │ │ │ +
│ │ │ │ +                case read_piece_alert::alert_type:
│ │ │ │ +                {
│ │ │ │ +                        auto* p = static_cast<read_piece_alert*>(a);
│ │ │ │ +                        if (p->ec) {
│ │ │ │ +                                // read_piece failed
│ │ │ │ +                                break;
│ │ │ │ +                        }
│ │ │ │ +                        // use p
│ │ │ │ +                        break;
│ │ │ │ +                }
│ │ │ │ +                case file_renamed_alert::alert_type:
│ │ │ │ +                {
│ │ │ │ +                        // etc...
│ │ │ │ +                }
│ │ │ │ +        }
│ │ │ │ +}
│ │ │ │ +
│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

what()

│ │ │ │ +
│ │ │ │ +virtual char const* what () const noexcept = 0;
│ │ │ │ +
│ │ │ │ +

returns a string literal describing the type of the alert. It does │ │ │ │ +not include any information that might be bundled with the alert.

│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

message()

│ │ │ │ +
│ │ │ │ +virtual std::string message () const = 0;
│ │ │ │ +
│ │ │ │ +

generate a string describing the alert and the information bundled │ │ │ │ +with it. This is mainly intended for debug and development use. It is not suitable │ │ │ │ +to use this for applications that may be localized. Instead, handle each alert │ │ │ │ +type individually and extract and render the information from the alert depending │ │ │ │ +on the locale.

│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

category()

│ │ │ │ +
│ │ │ │ +virtual alert_category_t category () const noexcept = 0;
│ │ │ │ +
│ │ │ │ +

returns a bitmask specifying which categories this alert belong to.

│ │ │ │ [report issue]
│ │ │ │ +
│ │ │ │
│ │ │ │

alert_cast()

│ │ │ │

Declared in "libtorrent/alert.hpp"

│ │ │ │
│ │ │ │  template <typename T> T const* alert_cast (alert const* a);
│ │ │ │  template <typename T> T* alert_cast (alert* a);
│ │ │ │  
│ │ │ │

When you get an alert, you can use alert_cast<> to attempt to cast the │ │ │ │ pointer to a specific alert type, in order to query it for more │ │ │ │ information.

│ │ │ │
│ │ │ │

Note

│ │ │ │

alert_cast<> can only cast to an exact alert type, not a base class

│ │ │ │
│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

operation_name()

│ │ │ │ +

Declared in "libtorrent/operations.hpp"

│ │ │ │ +
│ │ │ │ +char const* operation_name (operation_t op);
│ │ │ │ +
│ │ │ │ +

maps an operation id (from peer_error_alert and peer_disconnected_alert) │ │ │ │ +to its name. See operation_t for the constants

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

enum operation_t

│ │ │ │

Declared in "libtorrent/operations.hpp"

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -3530,14 +3530,26 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
file_truncate46call to ftruncate() (or SetEndOfFile() on windows)
│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

int

│ │ │ │ +

Declared in "libtorrent/alert_types.hpp"

│ │ │ │ +
│ │ │ │ +
user_alert_id
│ │ │ │ +
user defined alerts should use IDs greater than this
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
num_alert_types
│ │ │ │ +
this constant represents "max_alert_index" + 1
│ │ │ │ +
│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

alert_category_t

│ │ │ │

Declared in "libtorrent/alert.hpp"

│ │ │ │
│ │ │ │
error
│ │ │ │

Enables alerts that report an error. This includes:

│ │ │ │ @@ -3665,26 +3677,14 @@ │ │ │ │

The full bitmask, representing all available categories.

│ │ │ │

since the enum is signed, make sure this isn't │ │ │ │ interpreted as -1. For instance, boost.python │ │ │ │ does that and fails when assigning it to an │ │ │ │ unsigned parameter.

│ │ │ │
│ │ │ │
│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

int

│ │ │ │ -

Declared in "libtorrent/alert_types.hpp"

│ │ │ │ -
│ │ │ │ -
user_alert_id
│ │ │ │ -
user defined alerts should use IDs greater than this
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
num_alert_types
│ │ │ │ -
this constant represents "max_alert_index" + 1
│ │ │ │ -
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ [report issue]
│ │ │ │

bdecode_node

│ │ │ │

Declared in "libtorrent/bdecode.hpp"

│ │ │ │

Sometimes it's important to get a non-owning reference to the root node ( │ │ │ │ to be able to copy it as a reference for instance). For that, use the │ │ │ │ non_owning() member function.

│ │ │ │ -

There are 5 different types of nodes, see type_t.

│ │ │ │ +

There are 5 different types of nodes, see type_t.

│ │ │ │
│ │ │ │  struct bdecode_node
│ │ │ │  {
│ │ │ │     bdecode_node () = default;
│ │ │ │ -   bdecode_node& operator= (bdecode_node&&) & = default;
│ │ │ │ +   bdecode_node (bdecode_node&&) noexcept;
│ │ │ │     bdecode_node& operator= (bdecode_node const&) &;
│ │ │ │ +   bdecode_node& operator= (bdecode_node&&) & = default;
│ │ │ │     bdecode_node (bdecode_node const&);
│ │ │ │ -   bdecode_node (bdecode_node&&) noexcept;
│ │ │ │     type_t type () const noexcept;
│ │ │ │     explicit operator bool () const noexcept;
│ │ │ │     bdecode_node non_owning () const;
│ │ │ │     span<char const> data_section () const noexcept;
│ │ │ │     std::ptrdiff_t data_offset () const noexcept;
│ │ │ │ -   int list_size () const;
│ │ │ │ +   std::int64_t list_int_value_at (int i
│ │ │ │ +      , std::int64_t default_val = 0) const;
│ │ │ │     string_view list_string_value_at (int i
│ │ │ │        , string_view default_val = string_view()) const;
│ │ │ │     bdecode_node list_at (int i) const;
│ │ │ │ -   std::int64_t list_int_value_at (int i
│ │ │ │ -      , std::int64_t default_val = 0) const;
│ │ │ │ -   string_view dict_find_string_value (string_view key
│ │ │ │ -      , string_view default_value = string_view()) const;
│ │ │ │ -   std::int64_t dict_find_int_value (string_view key
│ │ │ │ -      , std::int64_t default_val = 0) const;
│ │ │ │ +   int list_size () const;
│ │ │ │ +   bdecode_node dict_find (string_view key) const;
│ │ │ │     bdecode_node dict_find_int (string_view key) const;
│ │ │ │ +   bdecode_node dict_find_list (string_view key) const;
│ │ │ │     std::pair<bdecode_node, bdecode_node> dict_at_node (int i) const;
│ │ │ │     std::pair<string_view, bdecode_node> dict_at (int i) const;
│ │ │ │ -   bdecode_node dict_find (string_view key) const;
│ │ │ │ -   bdecode_node dict_find_list (string_view key) const;
│ │ │ │ -   bdecode_node dict_find_string (string_view key) const;
│ │ │ │ -   bdecode_node dict_find_dict (string_view key) const;
│ │ │ │     int dict_size () const;
│ │ │ │ +   std::int64_t dict_find_int_value (string_view key
│ │ │ │ +      , std::int64_t default_val = 0) const;
│ │ │ │ +   bdecode_node dict_find_dict (string_view key) const;
│ │ │ │ +   string_view dict_find_string_value (string_view key
│ │ │ │ +      , string_view default_value = string_view()) const;
│ │ │ │ +   bdecode_node dict_find_string (string_view key) const;
│ │ │ │     std::int64_t int_value () const;
│ │ │ │ -   string_view string_value () const;
│ │ │ │     int string_length () const;
│ │ │ │ +   string_view string_value () const;
│ │ │ │     char const* string_ptr () const;
│ │ │ │     std::ptrdiff_t string_offset () const;
│ │ │ │     void clear ();
│ │ │ │     void swap (bdecode_node& n);
│ │ │ │     void reserve (int tokens);
│ │ │ │     void switch_underlying_buffer (char const* buf) noexcept;
│ │ │ │     bool has_soft_error (span<char> error) const;
│ │ │ │ @@ -121,100 +121,100 @@
│ │ │ │  
│ │ │ │

creates a default constructed node, it will have the type none_t.

│ │ │ │ │ │ │ │ [report issue]
│ │ │ │
│ │ │ │

operator=() bdecode_node()

│ │ │ │
│ │ │ │ -bdecode_node& operator= (bdecode_node&&) & = default;
│ │ │ │ +bdecode_node (bdecode_node&&) noexcept;
│ │ │ │  bdecode_node& operator= (bdecode_node const&) &;
│ │ │ │ +bdecode_node& operator= (bdecode_node&&) & = default;
│ │ │ │  bdecode_node (bdecode_node const&);
│ │ │ │ -bdecode_node (bdecode_node&&) noexcept;
│ │ │ │  
│ │ │ │

For owning nodes, the copy will create a copy of the tree, but the │ │ │ │ underlying buffer remains the same.

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

type()

│ │ │ │
│ │ │ │  type_t type () const noexcept;
│ │ │ │  
│ │ │ │ -

the type of this node. See type_t.

│ │ │ │ +

the type of this node. See type_t.

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

bool()

│ │ │ │
│ │ │ │  explicit operator bool () const noexcept;
│ │ │ │  
│ │ │ │ -

returns true if type() != none_t.

│ │ │ │ +

returns true if type() != none_t.

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

non_owning()

│ │ │ │
│ │ │ │  bdecode_node non_owning () const;
│ │ │ │  
│ │ │ │

return a non-owning reference to this node. This is useful to refer to │ │ │ │ the root node without copying it in assignments.

│ │ │ │ - │ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

data_section() data_offset()

│ │ │ │ + │ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

data_offset() data_section()

│ │ │ │
│ │ │ │  span<char const> data_section () const noexcept;
│ │ │ │  std::ptrdiff_t data_offset () const noexcept;
│ │ │ │  
│ │ │ │

returns the buffer and length of the section in the original bencoded │ │ │ │ buffer where this node is defined. For a dictionary for instance, this │ │ │ │ starts with d and ends with e, and has all the content of the │ │ │ │ dictionary in between. │ │ │ │ the data_offset() function returns the byte-offset to this node in, │ │ │ │ starting from the beginning of the buffer that was parsed.

│ │ │ │ - │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

list_string_value_at() list_size() list_at() list_int_value_at()

│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

list_size() list_string_value_at() list_at() list_int_value_at()

│ │ │ │
│ │ │ │ -int list_size () const;
│ │ │ │ +std::int64_t list_int_value_at (int i
│ │ │ │ +      , std::int64_t default_val = 0) const;
│ │ │ │  string_view list_string_value_at (int i
│ │ │ │        , string_view default_val = string_view()) const;
│ │ │ │  bdecode_node list_at (int i) const;
│ │ │ │ -std::int64_t list_int_value_at (int i
│ │ │ │ -      , std::int64_t default_val = 0) const;
│ │ │ │ +int list_size () const;
│ │ │ │  
│ │ │ │

functions with the list_ prefix operate on lists. These functions are │ │ │ │ only valid if type() == list_t. list_at() returns the item │ │ │ │ in the list at index i. i may not be greater than or equal to the │ │ │ │ size of the list. size() returns the size of the list.

│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

dict_find_string_value() dict_find_dict() dict_at() dict_find_list() dict_find_int_value() dict_find_string() dict_at_node() dict_size() dict_find() dict_find_int()

│ │ │ │ + │ │ │ │ + │ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

dict_at_node() dict_find_string() dict_find_list() dict_find_int() dict_at() dict_size() dict_find() dict_find_string_value() dict_find_dict() dict_find_int_value()

│ │ │ │
│ │ │ │ -string_view dict_find_string_value (string_view key
│ │ │ │ -      , string_view default_value = string_view()) const;
│ │ │ │ -std::int64_t dict_find_int_value (string_view key
│ │ │ │ -      , std::int64_t default_val = 0) const;
│ │ │ │ +bdecode_node dict_find (string_view key) const;
│ │ │ │  bdecode_node dict_find_int (string_view key) const;
│ │ │ │ +bdecode_node dict_find_list (string_view key) const;
│ │ │ │  std::pair<bdecode_node, bdecode_node> dict_at_node (int i) const;
│ │ │ │  std::pair<string_view, bdecode_node> dict_at (int i) const;
│ │ │ │ -bdecode_node dict_find (string_view key) const;
│ │ │ │ -bdecode_node dict_find_list (string_view key) const;
│ │ │ │ -bdecode_node dict_find_string (string_view key) const;
│ │ │ │ -bdecode_node dict_find_dict (string_view key) const;
│ │ │ │  int dict_size () const;
│ │ │ │ +std::int64_t dict_find_int_value (string_view key
│ │ │ │ +      , std::int64_t default_val = 0) const;
│ │ │ │ +bdecode_node dict_find_dict (string_view key) const;
│ │ │ │ +string_view dict_find_string_value (string_view key
│ │ │ │ +      , string_view default_value = string_view()) const;
│ │ │ │ +bdecode_node dict_find_string (string_view key) const;
│ │ │ │  
│ │ │ │

Functions with the dict_ prefix operates on dictionaries. They are │ │ │ │ only valid if type() == dict_t. In case a key you're looking up │ │ │ │ contains a 0 byte, you cannot use the 0-terminated string overloads, │ │ │ │ but have to use string_view instead. dict_find_list will return a │ │ │ │ valid bdecode_node if the key is found _and_ it is a list. Otherwise │ │ │ │ it will return a default-constructed bdecode_node.

│ │ │ │ @@ -229,23 +229,23 @@ │ │ │ │
│ │ │ │

int_value()

│ │ │ │
│ │ │ │  std::int64_t int_value () const;
│ │ │ │  
│ │ │ │

this function is only valid if type() == int_t. It returns the │ │ │ │ value of the integer.

│ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

string_offset() string_length() string_ptr() string_value()

│ │ │ │ + │ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

string_value() string_length() string_offset() string_ptr()

│ │ │ │
│ │ │ │ -string_view string_value () const;
│ │ │ │  int string_length () const;
│ │ │ │ +string_view string_value () const;
│ │ │ │  char const* string_ptr () const;
│ │ │ │  std::ptrdiff_t string_offset () const;
│ │ │ │  
│ │ │ │

these functions are only valid if type() == string_t. They return │ │ │ │ the string values. Note that string_ptr() is not 0-terminated. │ │ │ │ string_length() returns the number of bytes in the string. │ │ │ │ string_offset() returns the byte offset from the start of the parsed │ │ │ │ @@ -346,18 +346,18 @@ │ │ │ │ that's returned.

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

bdecode()

│ │ │ │

Declared in "libtorrent/bdecode.hpp"

│ │ │ │
│ │ │ │  bdecode_node bdecode (span<char const> buffer
│ │ │ │ -   , int depth_limit = 100, int token_limit = 2000000);
│ │ │ │ -bdecode_node bdecode (span<char const> buffer
│ │ │ │     , error_code& ec, int* error_pos = nullptr, int depth_limit = 100
│ │ │ │     , int token_limit = 2000000);
│ │ │ │ +bdecode_node bdecode (span<char const> buffer
│ │ │ │ +   , int depth_limit = 100, int token_limit = 2000000);
│ │ │ │  int bdecode (char const* start, char const* end, bdecode_node& ret
│ │ │ │     , error_code& ec, int* error_pos = nullptr, int depth_limit = 100
│ │ │ │     , int token_limit = 2000000);
│ │ │ │  
│ │ │ │

This function decodes/parses bdecoded data (for example a .torrent file). │ │ │ │ The data structure is returned in the ret argument. the buffer to parse │ │ │ │ is specified by the start of the buffer as well as the end, i.e. one │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,21 +5,21 @@ │ │ │ │ │ Table of contents │ │ │ │ │ * _b_d_e_c_o_d_e___n_o_d_e │ │ │ │ │ o _b_d_e_c_o_d_e___n_o_d_e_(_) │ │ │ │ │ o _o_p_e_r_a_t_o_r_=_(_)_ _b_d_e_c_o_d_e___n_o_d_e_(_) │ │ │ │ │ o _t_y_p_e_(_) │ │ │ │ │ o _b_o_o_l_(_) │ │ │ │ │ o _n_o_n___o_w_n_i_n_g_(_) │ │ │ │ │ - o _d_a_t_a___s_e_c_t_i_o_n_(_)_ _d_a_t_a___o_f_f_s_e_t_(_) │ │ │ │ │ - o _l_i_s_t___s_t_r_i_n_g___v_a_l_u_e___a_t_(_)_ _l_i_s_t___s_i_z_e_(_)_ _l_i_s_t___a_t_(_)_ _l_i_s_t___i_n_t___v_a_l_u_e___a_t_(_) │ │ │ │ │ - o _d_i_c_t___f_i_n_d___s_t_r_i_n_g___v_a_l_u_e_(_)_ _d_i_c_t___f_i_n_d___d_i_c_t_(_)_ _d_i_c_t___a_t_(_)_ _d_i_c_t___f_i_n_d___l_i_s_t │ │ │ │ │ - _(_)_ _d_i_c_t___f_i_n_d___i_n_t___v_a_l_u_e_(_)_ _d_i_c_t___f_i_n_d___s_t_r_i_n_g_(_)_ _d_i_c_t___a_t___n_o_d_e_(_) │ │ │ │ │ - _d_i_c_t___s_i_z_e_(_)_ _d_i_c_t___f_i_n_d_(_)_ _d_i_c_t___f_i_n_d___i_n_t_(_) │ │ │ │ │ + o _d_a_t_a___o_f_f_s_e_t_(_)_ _d_a_t_a___s_e_c_t_i_o_n_(_) │ │ │ │ │ + o _l_i_s_t___s_i_z_e_(_)_ _l_i_s_t___s_t_r_i_n_g___v_a_l_u_e___a_t_(_)_ _l_i_s_t___a_t_(_)_ _l_i_s_t___i_n_t___v_a_l_u_e___a_t_(_) │ │ │ │ │ + o _d_i_c_t___a_t___n_o_d_e_(_)_ _d_i_c_t___f_i_n_d___s_t_r_i_n_g_(_)_ _d_i_c_t___f_i_n_d___l_i_s_t_(_)_ _d_i_c_t___f_i_n_d___i_n_t_(_) │ │ │ │ │ + _d_i_c_t___a_t_(_)_ _d_i_c_t___s_i_z_e_(_)_ _d_i_c_t___f_i_n_d_(_)_ _d_i_c_t___f_i_n_d___s_t_r_i_n_g___v_a_l_u_e_(_) │ │ │ │ │ + _d_i_c_t___f_i_n_d___d_i_c_t_(_)_ _d_i_c_t___f_i_n_d___i_n_t___v_a_l_u_e_(_) │ │ │ │ │ o _i_n_t___v_a_l_u_e_(_) │ │ │ │ │ - o _s_t_r_i_n_g___o_f_f_s_e_t_(_)_ _s_t_r_i_n_g___l_e_n_g_t_h_(_)_ _s_t_r_i_n_g___p_t_r_(_)_ _s_t_r_i_n_g___v_a_l_u_e_(_) │ │ │ │ │ + o _s_t_r_i_n_g___v_a_l_u_e_(_)_ _s_t_r_i_n_g___l_e_n_g_t_h_(_)_ _s_t_r_i_n_g___o_f_f_s_e_t_(_)_ _s_t_r_i_n_g___p_t_r_(_) │ │ │ │ │ o _c_l_e_a_r_(_) │ │ │ │ │ o _s_w_a_p_(_) │ │ │ │ │ o _r_e_s_e_r_v_e_(_) │ │ │ │ │ o _s_w_i_t_c_h___u_n_d_e_r_l_y_i_n_g___b_u_f_f_e_r_(_) │ │ │ │ │ o _h_a_s___s_o_f_t___e_r_r_o_r_(_) │ │ │ │ │ o _e_n_u_m_ _t_y_p_e___t │ │ │ │ │ * _p_r_i_n_t___e_n_t_r_y_(_) │ │ │ │ │ @@ -30,44 +30,44 @@ │ │ │ │ │ Sometimes it's important to get a non-owning reference to the root node ( to be │ │ │ │ │ able to copy it as a reference for instance). For that, use the _n_o_n___o_w_n_i_n_g_(_) │ │ │ │ │ member function. │ │ │ │ │ There are 5 different types of nodes, see _t_y_p_e___t. │ │ │ │ │ struct bdecode_node │ │ │ │ │ { │ │ │ │ │ bbddeeccooddee__nnooddee () = default; │ │ │ │ │ - bdecode_node& ooppeerraattoorr== (bdecode_node&&) & = default; │ │ │ │ │ + bbddeeccooddee__nnooddee (bdecode_node&&) noexcept; │ │ │ │ │ bdecode_node& ooppeerraattoorr== (bdecode_node const&) &; │ │ │ │ │ + bdecode_node& ooppeerraattoorr== (bdecode_node&&) & = default; │ │ │ │ │ bbddeeccooddee__nnooddee (bdecode_node const&); │ │ │ │ │ - bbddeeccooddee__nnooddee (bdecode_node&&) noexcept; │ │ │ │ │ type_t ttyyppee () const noexcept; │ │ │ │ │ explicit operator bbooooll () const noexcept; │ │ │ │ │ bdecode_node nnoonn__oowwnniinngg () const; │ │ │ │ │ span ddaattaa__sseeccttiioonn () const noexcept; │ │ │ │ │ std::ptrdiff_t ddaattaa__ooffffsseett () const noexcept; │ │ │ │ │ - int lliisstt__ssiizzee () const; │ │ │ │ │ + std::int64_t lliisstt__iinntt__vvaalluuee__aatt (int i │ │ │ │ │ + , std::int64_t default_val = 0) const; │ │ │ │ │ string_view lliisstt__ssttrriinngg__vvaalluuee__aatt (int i │ │ │ │ │ , string_view default_val = string_view()) const; │ │ │ │ │ bdecode_node lliisstt__aatt (int i) const; │ │ │ │ │ - std::int64_t lliisstt__iinntt__vvaalluuee__aatt (int i │ │ │ │ │ - , std::int64_t default_val = 0) const; │ │ │ │ │ - string_view ddiicctt__ffiinndd__ssttrriinngg__vvaalluuee (string_view key │ │ │ │ │ - , string_view default_value = string_view()) const; │ │ │ │ │ - std::int64_t ddiicctt__ffiinndd__iinntt__vvaalluuee (string_view key │ │ │ │ │ - , std::int64_t default_val = 0) const; │ │ │ │ │ + int lliisstt__ssiizzee () const; │ │ │ │ │ + bdecode_node ddiicctt__ffiinndd (string_view key) const; │ │ │ │ │ bdecode_node ddiicctt__ffiinndd__iinntt (string_view key) const; │ │ │ │ │ + bdecode_node ddiicctt__ffiinndd__lliisstt (string_view key) const; │ │ │ │ │ std::pair ddiicctt__aatt__nnooddee (int i) const; │ │ │ │ │ std::pair ddiicctt__aatt (int i) const; │ │ │ │ │ - bdecode_node ddiicctt__ffiinndd (string_view key) const; │ │ │ │ │ - bdecode_node ddiicctt__ffiinndd__lliisstt (string_view key) const; │ │ │ │ │ - bdecode_node ddiicctt__ffiinndd__ssttrriinngg (string_view key) const; │ │ │ │ │ - bdecode_node ddiicctt__ffiinndd__ddiicctt (string_view key) const; │ │ │ │ │ int ddiicctt__ssiizzee () const; │ │ │ │ │ + std::int64_t ddiicctt__ffiinndd__iinntt__vvaalluuee (string_view key │ │ │ │ │ + , std::int64_t default_val = 0) const; │ │ │ │ │ + bdecode_node ddiicctt__ffiinndd__ddiicctt (string_view key) const; │ │ │ │ │ + string_view ddiicctt__ffiinndd__ssttrriinngg__vvaalluuee (string_view key │ │ │ │ │ + , string_view default_value = string_view()) const; │ │ │ │ │ + bdecode_node ddiicctt__ffiinndd__ssttrriinngg (string_view key) const; │ │ │ │ │ std::int64_t iinntt__vvaalluuee () const; │ │ │ │ │ - string_view ssttrriinngg__vvaalluuee () const; │ │ │ │ │ int ssttrriinngg__lleennggtthh () const; │ │ │ │ │ + string_view ssttrriinngg__vvaalluuee () const; │ │ │ │ │ char const* ssttrriinngg__ppttrr () const; │ │ │ │ │ std::ptrdiff_t ssttrriinngg__ooffffsseett () const; │ │ │ │ │ void cclleeaarr (); │ │ │ │ │ void sswwaapp (bdecode_node& n); │ │ │ │ │ void rreesseerrvvee (int tokens); │ │ │ │ │ void sswwiittcchh__uunnddeerrllyyiinngg__bbuuffffeerr (char const* buf) noexcept; │ │ │ │ │ bool hhaass__ssoofftt__eerrrroorr (span error) const; │ │ │ │ │ @@ -83,18 +83,18 @@ │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** bbddeeccooddee__nnooddee(()) ********** │ │ │ │ │ bbddeeccooddee__nnooddee () = default; │ │ │ │ │ creates a default constructed node, it will have the type none_t. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ooppeerraattoorr==(()) bbddeeccooddee__nnooddee(()) ********** │ │ │ │ │ -bdecode_node& ooppeerraattoorr== (bdecode_node&&) & = default; │ │ │ │ │ +bbddeeccooddee__nnooddee (bdecode_node&&) noexcept; │ │ │ │ │ bdecode_node& ooppeerraattoorr== (bdecode_node const&) &; │ │ │ │ │ +bdecode_node& ooppeerraattoorr== (bdecode_node&&) & = default; │ │ │ │ │ bbddeeccooddee__nnooddee (bdecode_node const&); │ │ │ │ │ -bbddeeccooddee__nnooddee (bdecode_node&&) noexcept; │ │ │ │ │ For owning nodes, the copy will create a copy of the tree, but the underlying │ │ │ │ │ buffer remains the same. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ttyyppee(()) ********** │ │ │ │ │ type_t ttyyppee () const noexcept; │ │ │ │ │ the type of this node. See _t_y_p_e___t. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ @@ -103,50 +103,50 @@ │ │ │ │ │ returns true if _t_y_p_e_(_) != none_t. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** nnoonn__oowwnniinngg(()) ********** │ │ │ │ │ bdecode_node nnoonn__oowwnniinngg () const; │ │ │ │ │ return a non-owning reference to this node. This is useful to refer to the root │ │ │ │ │ node without copying it in assignments. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ddaattaa__sseeccttiioonn(()) ddaattaa__ooffffsseett(()) ********** │ │ │ │ │ +********** ddaattaa__ooffffsseett(()) ddaattaa__sseeccttiioonn(()) ********** │ │ │ │ │ span ddaattaa__sseeccttiioonn () const noexcept; │ │ │ │ │ std::ptrdiff_t ddaattaa__ooffffsseett () const noexcept; │ │ │ │ │ returns the buffer and length of the section in the original bencoded buffer │ │ │ │ │ where this node is defined. For a dictionary for instance, this starts with d │ │ │ │ │ and ends with e, and has all the content of the dictionary in between. the │ │ │ │ │ data_offset() function returns the byte-offset to this node in, starting from │ │ │ │ │ the beginning of the buffer that was parsed. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** lliisstt__ssttrriinngg__vvaalluuee__aatt(()) lliisstt__ssiizzee(()) lliisstt__aatt(()) lliisstt__iinntt__vvaalluuee__aatt(()) ********** │ │ │ │ │ -int lliisstt__ssiizzee () const; │ │ │ │ │ +********** lliisstt__ssiizzee(()) lliisstt__ssttrriinngg__vvaalluuee__aatt(()) lliisstt__aatt(()) lliisstt__iinntt__vvaalluuee__aatt(()) ********** │ │ │ │ │ +std::int64_t lliisstt__iinntt__vvaalluuee__aatt (int i │ │ │ │ │ + , std::int64_t default_val = 0) const; │ │ │ │ │ string_view lliisstt__ssttrriinngg__vvaalluuee__aatt (int i │ │ │ │ │ , string_view default_val = string_view()) const; │ │ │ │ │ bdecode_node lliisstt__aatt (int i) const; │ │ │ │ │ -std::int64_t lliisstt__iinntt__vvaalluuee__aatt (int i │ │ │ │ │ - , std::int64_t default_val = 0) const; │ │ │ │ │ +int lliisstt__ssiizzee () const; │ │ │ │ │ functions with the list_ prefix operate on lists. These functions are only │ │ │ │ │ valid if type() == list_t. list_at() returns the item in the list at index i. i │ │ │ │ │ may not be greater than or equal to the size of the list. size() returns the │ │ │ │ │ size of the list. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ddiicctt__ffiinndd__ssttrriinngg__vvaalluuee(()) ddiicctt__ffiinndd__ddiicctt(()) ddiicctt__aatt(()) ddiicctt__ffiinndd__lliisstt(()) │ │ │ │ │ -ddiicctt__ffiinndd__iinntt__vvaalluuee(()) ddiicctt__ffiinndd__ssttrriinngg(()) ddiicctt__aatt__nnooddee(()) ddiicctt__ssiizzee(()) ddiicctt__ffiinndd(()) │ │ │ │ │ -ddiicctt__ffiinndd__iinntt(()) ********** │ │ │ │ │ -string_view ddiicctt__ffiinndd__ssttrriinngg__vvaalluuee (string_view key │ │ │ │ │ - , string_view default_value = string_view()) const; │ │ │ │ │ -std::int64_t ddiicctt__ffiinndd__iinntt__vvaalluuee (string_view key │ │ │ │ │ - , std::int64_t default_val = 0) const; │ │ │ │ │ +********** ddiicctt__aatt__nnooddee(()) ddiicctt__ffiinndd__ssttrriinngg(()) ddiicctt__ffiinndd__lliisstt(()) ddiicctt__ffiinndd__iinntt(()) │ │ │ │ │ +ddiicctt__aatt(()) ddiicctt__ssiizzee(()) ddiicctt__ffiinndd(()) ddiicctt__ffiinndd__ssttrriinngg__vvaalluuee(()) ddiicctt__ffiinndd__ddiicctt(()) │ │ │ │ │ +ddiicctt__ffiinndd__iinntt__vvaalluuee(()) ********** │ │ │ │ │ +bdecode_node ddiicctt__ffiinndd (string_view key) const; │ │ │ │ │ bdecode_node ddiicctt__ffiinndd__iinntt (string_view key) const; │ │ │ │ │ +bdecode_node ddiicctt__ffiinndd__lliisstt (string_view key) const; │ │ │ │ │ std::pair ddiicctt__aatt__nnooddee (int i) const; │ │ │ │ │ std::pair ddiicctt__aatt (int i) const; │ │ │ │ │ -bdecode_node ddiicctt__ffiinndd (string_view key) const; │ │ │ │ │ -bdecode_node ddiicctt__ffiinndd__lliisstt (string_view key) const; │ │ │ │ │ -bdecode_node ddiicctt__ffiinndd__ssttrriinngg (string_view key) const; │ │ │ │ │ -bdecode_node ddiicctt__ffiinndd__ddiicctt (string_view key) const; │ │ │ │ │ int ddiicctt__ssiizzee () const; │ │ │ │ │ +std::int64_t ddiicctt__ffiinndd__iinntt__vvaalluuee (string_view key │ │ │ │ │ + , std::int64_t default_val = 0) const; │ │ │ │ │ +bdecode_node ddiicctt__ffiinndd__ddiicctt (string_view key) const; │ │ │ │ │ +string_view ddiicctt__ffiinndd__ssttrriinngg__vvaalluuee (string_view key │ │ │ │ │ + , string_view default_value = string_view()) const; │ │ │ │ │ +bdecode_node ddiicctt__ffiinndd__ssttrriinngg (string_view key) const; │ │ │ │ │ Functions with the dict_ prefix operates on dictionaries. They are only valid │ │ │ │ │ if type() == dict_t. In case a key you're looking up contains a 0 byte, you │ │ │ │ │ cannot use the 0-terminated string overloads, but have to use string_view │ │ │ │ │ instead. dict_find_list will return a valid bdecode_node if the key is found │ │ │ │ │ _and_ it is a list. Otherwise it will return a default-constructed │ │ │ │ │ _b_d_e_c_o_d_e___n_o_d_e. │ │ │ │ │ Functions with the _value suffix return the value of the node directly, rather │ │ │ │ │ @@ -158,17 +158,17 @@ │ │ │ │ │ string). │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** iinntt__vvaalluuee(()) ********** │ │ │ │ │ std::int64_t iinntt__vvaalluuee () const; │ │ │ │ │ this function is only valid if type() == int_t. It returns the value of the │ │ │ │ │ integer. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ssttrriinngg__ooffffsseett(()) ssttrriinngg__lleennggtthh(()) ssttrriinngg__ppttrr(()) ssttrriinngg__vvaalluuee(()) ********** │ │ │ │ │ -string_view ssttrriinngg__vvaalluuee () const; │ │ │ │ │ +********** ssttrriinngg__vvaalluuee(()) ssttrriinngg__lleennggtthh(()) ssttrriinngg__ooffffsseett(()) ssttrriinngg__ppttrr(()) ********** │ │ │ │ │ int ssttrriinngg__lleennggtthh () const; │ │ │ │ │ +string_view ssttrriinngg__vvaalluuee () const; │ │ │ │ │ char const* ssttrriinngg__ppttrr () const; │ │ │ │ │ std::ptrdiff_t ssttrriinngg__ooffffsseett () const; │ │ │ │ │ these functions are only valid if type() == string_t. They return the string │ │ │ │ │ values. Note that string_ptr() is nnoott 0-terminated. string_length() returns the │ │ │ │ │ number of bytes in the string. string_offset() returns the byte offset from the │ │ │ │ │ start of the parsed bencoded buffer this string can be found. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ @@ -215,18 +215,18 @@ │ │ │ │ │ , bool single_line = false, int indent = 0); │ │ │ │ │ print the bencoded structure in a human-readable format to a string that's │ │ │ │ │ returned. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ bbddeeccooddee(()) ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_b_d_e_c_o_d_e_._h_p_p" │ │ │ │ │ bdecode_node bbddeeccooddee (span buffer │ │ │ │ │ - , int depth_limit = 100, int token_limit = 2000000); │ │ │ │ │ -bdecode_node bbddeeccooddee (span buffer │ │ │ │ │ , error_code& ec, int* error_pos = nullptr, int depth_limit = 100 │ │ │ │ │ , int token_limit = 2000000); │ │ │ │ │ +bdecode_node bbddeeccooddee (span buffer │ │ │ │ │ + , int depth_limit = 100, int token_limit = 2000000); │ │ │ │ │ int bbddeeccooddee (char const* start, char const* end, bdecode_node& ret │ │ │ │ │ , error_code& ec, int* error_pos = nullptr, int depth_limit = 100 │ │ │ │ │ , int token_limit = 2000000); │ │ │ │ │ This function decodes/parses bdecoded data (for example a .torrent file). The │ │ │ │ │ data structure is returned in the ret argument. the buffer to parse is │ │ │ │ │ specified by the start of the buffer as well as the end, i.e. one byte past the │ │ │ │ │ end. If the buffer fails to parse, the function returns a non-zero value and │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Bencoding.html │ │ │ │ @@ -34,15 +34,15 @@ │ │ │ │

    │ │ │ │
  • entry │ │ │ │
  • │ │ │ │ @@ -69,44 +69,44 @@ │ │ │ │

    The entry class represents one node in a bencoded hierarchy. It works as a │ │ │ │ variant type, it can be either a list, a dictionary (std::map), an integer │ │ │ │ or a string.

    │ │ │ │
    │ │ │ │  class entry
    │ │ │ │  {
    │ │ │ │     data_type type () const;
    │ │ │ │ -   entry (list_type);
    │ │ │ │     entry (span<char const>);
    │ │ │ │ -   entry (preformatted_type);
    │ │ │ │ +   entry (list_type);
    │ │ │ │     entry (integer_type);
    │ │ │ │     entry (dictionary_type);
    │ │ │ │ +   entry (preformatted_type);
    │ │ │ │     entry (U v);
    │ │ │ │     entry (data_type t);
    │ │ │ │     entry (bdecode_node const& n);
    │ │ │ │ -   entry& operator= (span<char const>) &;
    │ │ │ │ -   entry& operator= (preformatted_type) &;
    │ │ │ │     entry& operator= (dictionary_type) &;
    │ │ │ │ -   entry& operator= (entry const&) &;
    │ │ │ │ -   entry& operator= (integer_type) &;
    │ │ │ │     entry& operator= (list_type) &;
    │ │ │ │ -   entry& operator= (entry&&) & noexcept;
    │ │ │ │ +   entry& operator= (integer_type) &;
    │ │ │ │     entry& operator= (bdecode_node const&) &;
    │ │ │ │ +   entry& operator= (span<char const>) &;
    │ │ │ │ +   entry& operator= (entry&&) & noexcept;
    │ │ │ │ +   entry& operator= (entry const&) &;
    │ │ │ │ +   entry& operator= (preformatted_type) &;
    │ │ │ │     entry& operator= (U v) &;
    │ │ │ │ +   integer_type& integer ();
    │ │ │ │ +   list_type& list ();
    │ │ │ │     preformatted_type const& preformatted () const;
    │ │ │ │ -   dictionary_type& dict ();
    │ │ │ │ +   integer_type const& integer () const;
    │ │ │ │     list_type const& list () const;
    │ │ │ │ -   integer_type& integer ();
    │ │ │ │ +   dictionary_type const& dict () const;
    │ │ │ │     preformatted_type& preformatted ();
    │ │ │ │ -   list_type& list ();
    │ │ │ │ -   string_type& string ();
    │ │ │ │     string_type const& string () const;
    │ │ │ │ -   dictionary_type const& dict () const;
    │ │ │ │ -   integer_type const& integer () const;
    │ │ │ │ +   dictionary_type& dict ();
    │ │ │ │ +   string_type& string ();
    │ │ │ │     void swap (entry& e);
    │ │ │ │ -   entry& operator[] (string_view key);
    │ │ │ │     entry const& operator[] (string_view key) const;
    │ │ │ │ +   entry& operator[] (string_view key);
    │ │ │ │     entry* find_key (string_view key);
    │ │ │ │     entry const* find_key (string_view key) const;
    │ │ │ │     std::string to_string (bool single_line = false) const;
    │ │ │ │  
    │ │ │ │     enum data_type
    │ │ │ │     {
    │ │ │ │        int_t,
    │ │ │ │ @@ -124,19 +124,19 @@
    │ │ │ │  data_type type () const;
    │ │ │ │  
    │ │ │ │

    returns the concrete type of the entry

    │ │ │ │ [report issue]
│ │ │ │
│ │ │ │

entry()

│ │ │ │
│ │ │ │ -entry (list_type);
│ │ │ │  entry (span<char const>);
│ │ │ │ -entry (preformatted_type);
│ │ │ │ +entry (list_type);
│ │ │ │  entry (integer_type);
│ │ │ │  entry (dictionary_type);
│ │ │ │ +entry (preformatted_type);
│ │ │ │  
│ │ │ │

constructors directly from a specific type. │ │ │ │ The content of the argument is copied into the │ │ │ │ newly constructed entry

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

entry()

│ │ │ │ @@ -152,43 +152,43 @@ │ │ │ │ entry (bdecode_node const& n); │ │ │ │ │ │ │ │

construct from bdecode_node parsed form (see bdecode())

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

operator=()

│ │ │ │
│ │ │ │ -entry& operator= (span<char const>) &;
│ │ │ │ -entry& operator= (preformatted_type) &;
│ │ │ │  entry& operator= (dictionary_type) &;
│ │ │ │ -entry& operator= (entry const&) &;
│ │ │ │ -entry& operator= (integer_type) &;
│ │ │ │  entry& operator= (list_type) &;
│ │ │ │ -entry& operator= (entry&&) & noexcept;
│ │ │ │ +entry& operator= (integer_type) &;
│ │ │ │  entry& operator= (bdecode_node const&) &;
│ │ │ │ +entry& operator= (span<char const>) &;
│ │ │ │ +entry& operator= (entry&&) & noexcept;
│ │ │ │ +entry& operator= (entry const&) &;
│ │ │ │ +entry& operator= (preformatted_type) &;
│ │ │ │  
│ │ │ │

copies the structure of the right hand side into this │ │ │ │ entry.

│ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

preformatted() string() dict() list() integer()

│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

preformatted() list() string() dict() integer()

│ │ │ │
│ │ │ │ +integer_type& integer ();
│ │ │ │ +list_type& list ();
│ │ │ │  preformatted_type const& preformatted () const;
│ │ │ │ -dictionary_type& dict ();
│ │ │ │ +integer_type const& integer () const;
│ │ │ │  list_type const& list () const;
│ │ │ │ -integer_type& integer ();
│ │ │ │ +dictionary_type const& dict () const;
│ │ │ │  preformatted_type& preformatted ();
│ │ │ │ -list_type& list ();
│ │ │ │ -string_type& string ();
│ │ │ │  string_type const& string () const;
│ │ │ │ -dictionary_type const& dict () const;
│ │ │ │ -integer_type const& integer () const;
│ │ │ │ +dictionary_type& dict ();
│ │ │ │ +string_type& string ();
│ │ │ │  
│ │ │ │

The integer(), string(), list() and dict() functions │ │ │ │ are accessors that return the respective type. If the entry object │ │ │ │ isn't of the type you request, the accessor will throw │ │ │ │ system_error. You can ask an entry for its type through the │ │ │ │ type() function.

│ │ │ │

If you want to create an entry you give it the type you want it to │ │ │ │ @@ -232,16 +232,16 @@ │ │ │ │ void swap (entry& e); │ │ │ │ │ │ │ │

swaps the content of this with e.

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

operator[]()

│ │ │ │
│ │ │ │ -entry& operator[] (string_view key);
│ │ │ │  entry const& operator[] (string_view key) const;
│ │ │ │ +entry& operator[] (string_view key);
│ │ │ │  
│ │ │ │

All of these functions requires the entry to be a dictionary, if it │ │ │ │ isn't they will throw system_error.

│ │ │ │

The non-const versions of the operator[] will return a reference │ │ │ │ to either the existing element at the given key or, if there is no │ │ │ │ element with the given key, a reference to a newly inserted element at │ │ │ │ that key.

│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -5,15 +5,15 @@ │ │ │ │ │ Table of contents │ │ │ │ │ * _e_n_t_r_y │ │ │ │ │ o _t_y_p_e_(_) │ │ │ │ │ o _e_n_t_r_y_(_) │ │ │ │ │ o _e_n_t_r_y_(_) │ │ │ │ │ o _e_n_t_r_y_(_) │ │ │ │ │ o _o_p_e_r_a_t_o_r_=_(_) │ │ │ │ │ - o _p_r_e_f_o_r_m_a_t_t_e_d_(_)_ _s_t_r_i_n_g_(_)_ _d_i_c_t_(_)_ _l_i_s_t_(_)_ _i_n_t_e_g_e_r_(_) │ │ │ │ │ + o _p_r_e_f_o_r_m_a_t_t_e_d_(_)_ _l_i_s_t_(_)_ _s_t_r_i_n_g_(_)_ _d_i_c_t_(_)_ _i_n_t_e_g_e_r_(_) │ │ │ │ │ o _s_w_a_p_(_) │ │ │ │ │ o _o_p_e_r_a_t_o_r_[_]_(_) │ │ │ │ │ o _f_i_n_d___k_e_y_(_) │ │ │ │ │ o _t_o___s_t_r_i_n_g_(_) │ │ │ │ │ o _e_n_u_m_ _d_a_t_a___t_y_p_e │ │ │ │ │ * _b_e_n_c_o_d_e_(_) │ │ │ │ │ * _o_p_e_r_a_t_o_r_<_<_(_) │ │ │ │ │ @@ -35,44 +35,44 @@ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_n_t_r_y_._h_p_p" │ │ │ │ │ The entry class represents one node in a bencoded hierarchy. It works as a │ │ │ │ │ variant type, it can be either a list, a dictionary (std::map), an integer or a │ │ │ │ │ string. │ │ │ │ │ class entry │ │ │ │ │ { │ │ │ │ │ data_type ttyyppee () const; │ │ │ │ │ - eennttrryy (list_type); │ │ │ │ │ eennttrryy (span); │ │ │ │ │ - eennttrryy (preformatted_type); │ │ │ │ │ + eennttrryy (list_type); │ │ │ │ │ eennttrryy (integer_type); │ │ │ │ │ eennttrryy (dictionary_type); │ │ │ │ │ + eennttrryy (preformatted_type); │ │ │ │ │ eennttrryy (U v); │ │ │ │ │ eennttrryy (data_type t); │ │ │ │ │ eennttrryy (bdecode_node const& n); │ │ │ │ │ - entry& ooppeerraattoorr== (span) &; │ │ │ │ │ - entry& ooppeerraattoorr== (preformatted_type) &; │ │ │ │ │ entry& ooppeerraattoorr== (dictionary_type) &; │ │ │ │ │ - entry& ooppeerraattoorr== (entry const&) &; │ │ │ │ │ - entry& ooppeerraattoorr== (integer_type) &; │ │ │ │ │ entry& ooppeerraattoorr== (list_type) &; │ │ │ │ │ - entry& ooppeerraattoorr== (entry&&) & noexcept; │ │ │ │ │ + entry& ooppeerraattoorr== (integer_type) &; │ │ │ │ │ entry& ooppeerraattoorr== (bdecode_node const&) &; │ │ │ │ │ + entry& ooppeerraattoorr== (span) &; │ │ │ │ │ + entry& ooppeerraattoorr== (entry&&) & noexcept; │ │ │ │ │ + entry& ooppeerraattoorr== (entry const&) &; │ │ │ │ │ + entry& ooppeerraattoorr== (preformatted_type) &; │ │ │ │ │ entry& ooppeerraattoorr== (U v) &; │ │ │ │ │ + integer_type& iinntteeggeerr (); │ │ │ │ │ + list_type& lliisstt (); │ │ │ │ │ preformatted_type const& pprreeffoorrmmaatttteedd () const; │ │ │ │ │ - dictionary_type& ddiicctt (); │ │ │ │ │ + integer_type const& iinntteeggeerr () const; │ │ │ │ │ list_type const& lliisstt () const; │ │ │ │ │ - integer_type& iinntteeggeerr (); │ │ │ │ │ + dictionary_type const& ddiicctt () const; │ │ │ │ │ preformatted_type& pprreeffoorrmmaatttteedd (); │ │ │ │ │ - list_type& lliisstt (); │ │ │ │ │ - string_type& ssttrriinngg (); │ │ │ │ │ string_type const& ssttrriinngg () const; │ │ │ │ │ - dictionary_type const& ddiicctt () const; │ │ │ │ │ - integer_type const& iinntteeggeerr () const; │ │ │ │ │ + dictionary_type& ddiicctt (); │ │ │ │ │ + string_type& ssttrriinngg (); │ │ │ │ │ void sswwaapp (entry& e); │ │ │ │ │ - entry& ooppeerraattoorr[[]] (string_view key); │ │ │ │ │ entry const& ooppeerraattoorr[[]] (string_view key) const; │ │ │ │ │ + entry& ooppeerraattoorr[[]] (string_view key); │ │ │ │ │ entry* ffiinndd__kkeeyy (string_view key); │ │ │ │ │ entry const* ffiinndd__kkeeyy (string_view key) const; │ │ │ │ │ std::string ttoo__ssttrriinngg (bool single_line = false) const; │ │ │ │ │ │ │ │ │ │ enum data_type │ │ │ │ │ { │ │ │ │ │ int_t, │ │ │ │ │ @@ -85,52 +85,52 @@ │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ttyyppee(()) ********** │ │ │ │ │ data_type ttyyppee () const; │ │ │ │ │ returns the concrete type of the _e_n_t_r_y │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** eennttrryy(()) ********** │ │ │ │ │ -eennttrryy (list_type); │ │ │ │ │ eennttrryy (span); │ │ │ │ │ -eennttrryy (preformatted_type); │ │ │ │ │ +eennttrryy (list_type); │ │ │ │ │ eennttrryy (integer_type); │ │ │ │ │ eennttrryy (dictionary_type); │ │ │ │ │ +eennttrryy (preformatted_type); │ │ │ │ │ constructors directly from a specific type. The content of the argument is │ │ │ │ │ copied into the newly constructed _e_n_t_r_y │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** eennttrryy(()) ********** │ │ │ │ │ eennttrryy (data_type t); │ │ │ │ │ construct an empty _e_n_t_r_y of the specified type. see _d_a_t_a___t_y_p_e enum. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** eennttrryy(()) ********** │ │ │ │ │ eennttrryy (bdecode_node const& n); │ │ │ │ │ construct from _b_d_e_c_o_d_e___n_o_d_e parsed form (see _b_d_e_c_o_d_e_(_)) │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ooppeerraattoorr==(()) ********** │ │ │ │ │ -entry& ooppeerraattoorr== (span) &; │ │ │ │ │ -entry& ooppeerraattoorr== (preformatted_type) &; │ │ │ │ │ entry& ooppeerraattoorr== (dictionary_type) &; │ │ │ │ │ -entry& ooppeerraattoorr== (entry const&) &; │ │ │ │ │ -entry& ooppeerraattoorr== (integer_type) &; │ │ │ │ │ entry& ooppeerraattoorr== (list_type) &; │ │ │ │ │ -entry& ooppeerraattoorr== (entry&&) & noexcept; │ │ │ │ │ +entry& ooppeerraattoorr== (integer_type) &; │ │ │ │ │ entry& ooppeerraattoorr== (bdecode_node const&) &; │ │ │ │ │ +entry& ooppeerraattoorr== (span) &; │ │ │ │ │ +entry& ooppeerraattoorr== (entry&&) & noexcept; │ │ │ │ │ +entry& ooppeerraattoorr== (entry const&) &; │ │ │ │ │ +entry& ooppeerraattoorr== (preformatted_type) &; │ │ │ │ │ copies the structure of the right hand side into this _e_n_t_r_y. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** pprreeffoorrmmaatttteedd(()) ssttrriinngg(()) ddiicctt(()) lliisstt(()) iinntteeggeerr(()) ********** │ │ │ │ │ +********** pprreeffoorrmmaatttteedd(()) lliisstt(()) ssttrriinngg(()) ddiicctt(()) iinntteeggeerr(()) ********** │ │ │ │ │ +integer_type& iinntteeggeerr (); │ │ │ │ │ +list_type& lliisstt (); │ │ │ │ │ preformatted_type const& pprreeffoorrmmaatttteedd () const; │ │ │ │ │ -dictionary_type& ddiicctt (); │ │ │ │ │ +integer_type const& iinntteeggeerr () const; │ │ │ │ │ list_type const& lliisstt () const; │ │ │ │ │ -integer_type& iinntteeggeerr (); │ │ │ │ │ +dictionary_type const& ddiicctt () const; │ │ │ │ │ preformatted_type& pprreeffoorrmmaatttteedd (); │ │ │ │ │ -list_type& lliisstt (); │ │ │ │ │ -string_type& ssttrriinngg (); │ │ │ │ │ string_type const& ssttrriinngg () const; │ │ │ │ │ -dictionary_type const& ddiicctt () const; │ │ │ │ │ -integer_type const& iinntteeggeerr () const; │ │ │ │ │ +dictionary_type& ddiicctt (); │ │ │ │ │ +string_type& ssttrriinngg (); │ │ │ │ │ The integer(), string(), list() and dict() functions are accessors that return │ │ │ │ │ the respective type. If the entry object isn't of the type you request, the │ │ │ │ │ accessor will throw system_error. You can ask an entry for its type through the │ │ │ │ │ type() function. │ │ │ │ │ If you want to create an entry you give it the type you want it to have in its │ │ │ │ │ constructor, and then use one of the non-const accessors to get a reference │ │ │ │ │ which you then can assign the value you want it to have. │ │ │ │ │ @@ -161,16 +161,16 @@ │ │ │ │ │ _t_o_r_r_e_n_t___i_n_f_o exists. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sswwaapp(()) ********** │ │ │ │ │ void sswwaapp (entry& e); │ │ │ │ │ swaps the content of tthhiiss with e. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ooppeerraattoorr[[]](()) ********** │ │ │ │ │ -entry& ooppeerraattoorr[[]] (string_view key); │ │ │ │ │ entry const& ooppeerraattoorr[[]] (string_view key) const; │ │ │ │ │ +entry& ooppeerraattoorr[[]] (string_view key); │ │ │ │ │ All of these functions requires the _e_n_t_r_y to be a dictionary, if it isn't they │ │ │ │ │ will throw system_error. │ │ │ │ │ The non-const versions of the operator[] will return a reference to either the │ │ │ │ │ existing element at the given key or, if there is no element with the given │ │ │ │ │ key, a reference to a newly inserted element at that key. │ │ │ │ │ The const version of operator[] will only return a reference to an existing │ │ │ │ │ element at the given key. If the key is not found, it will throw system_error. │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Core.html │ │ │ │ @@ -32,45 +32,45 @@ │ │ │ │
│ │ │ │

Table of contents

│ │ │ │
│ │ │ │ [report issue]
│ │ │ │

peer_request

│ │ │ │

Declared in "libtorrent/peer_request.hpp"

│ │ │ │

represents a byte range within a piece. Internally this is is used for │ │ │ │ incoming piece requests.

│ │ │ │ @@ -99,16 +99,34 @@ │ │ │ │
start
│ │ │ │
The byte offset within that piece where the range starts.
│ │ │ │
│ │ │ │ [report issue]
│ │ │ │
length
│ │ │ │
The size of the range, in bytes.
│ │ │ │
│ │ │ │ -[report issue]
│ │ │ │ +[report issue]
│ │ │ │
│ │ │ │ +
│ │ │ │ +

piece_block

│ │ │ │ +

Declared in "libtorrent/piece_block.hpp"

│ │ │ │ +
│ │ │ │ +struct piece_block
│ │ │ │ +{
│ │ │ │ +   piece_block () = default;
│ │ │ │ +   piece_block (piece_index_t p_index, int b_index);
│ │ │ │ +   bool operator< (piece_block const& b) const;
│ │ │ │ +   bool operator== (piece_block const& b) const;
│ │ │ │ +   bool operator!= (piece_block const& b) const;
│ │ │ │ +
│ │ │ │ +   static const piece_block invalid;
│ │ │ │ +   piece_index_t piece_index {0};
│ │ │ │ +   int block_index  = 0;
│ │ │ │ +};
│ │ │ │ +
│ │ │ │ +[report issue]
│ │ │ │
│ │ │ │

peer_info

│ │ │ │

Declared in "libtorrent/peer_info.hpp"

│ │ │ │

holds information and statistics about one peer │ │ │ │ that libtorrent is connected to

│ │ │ │
│ │ │ │  struct peer_info
│ │ │ │ @@ -586,54 +604,36 @@
│ │ │ │  [report issue]
│ │ │ │
read_state write_state
│ │ │ │
bitmasks indicating what state this peer │ │ │ │ is in with regards to sending and receiving data. The states are │ │ │ │ defined as independent flags of type bandwidth_state_flags_t, in this │ │ │ │ class.
│ │ │ │
│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -

piece_block

│ │ │ │ -

Declared in "libtorrent/piece_block.hpp"

│ │ │ │ -
│ │ │ │ -struct piece_block
│ │ │ │ -{
│ │ │ │ -   piece_block (piece_index_t p_index, int b_index);
│ │ │ │ -   piece_block () = default;
│ │ │ │ -   bool operator< (piece_block const& b) const;
│ │ │ │ -   bool operator== (piece_block const& b) const;
│ │ │ │ -   bool operator!= (piece_block const& b) const;
│ │ │ │ -
│ │ │ │ -   static const piece_block invalid;
│ │ │ │ -   piece_index_t piece_index {0};
│ │ │ │ -   int block_index  = 0;
│ │ │ │ -};
│ │ │ │ -
│ │ │ │ [report issue]
│ │ │ │ + │ │ │ │
│ │ │ │

info_hash_t

│ │ │ │

Declared in "libtorrent/info_hash.hpp"

│ │ │ │

class holding the info-hash of a torrent. It can hold a v1 info-hash │ │ │ │ (SHA-1) or a v2 info-hash (SHA-256) or both.

│ │ │ │
│ │ │ │

Note

│ │ │ │

If has_v2() is false then the v1 hash might actually be a truncated │ │ │ │ v2 hash

│ │ │ │
│ │ │ │
│ │ │ │  struct info_hash_t
│ │ │ │  {
│ │ │ │     info_hash_t () noexcept = default;
│ │ │ │ -   explicit info_hash_t (sha1_hash h1) noexcept;
│ │ │ │ -   explicit info_hash_t (sha256_hash h2) noexcept;
│ │ │ │     info_hash_t (sha1_hash h1, sha256_hash h2) noexcept;
│ │ │ │ +   explicit info_hash_t (sha256_hash h2) noexcept;
│ │ │ │ +   explicit info_hash_t (sha1_hash h1) noexcept;
│ │ │ │     bool has (protocol_version v) const;
│ │ │ │ -   bool has_v2 () const;
│ │ │ │     bool has_v1 () const;
│ │ │ │ +   bool has_v2 () const;
│ │ │ │     sha1_hash get (protocol_version v) const;
│ │ │ │     sha1_hash get_best () const;
│ │ │ │     friend bool operator!= (info_hash_t const& lhs, info_hash_t const& rhs);
│ │ │ │     friend bool operator== (info_hash_t const& lhs, info_hash_t const& rhs) noexcept;
│ │ │ │     template <typename F> void for_each (F f) const;
│ │ │ │     bool operator< (info_hash_t const& o) const;
│ │ │ │     friend std::ostream& operator<< (std::ostream& os, info_hash_t const& ih);
│ │ │ │ @@ -642,32 +642,32 @@
│ │ │ │     sha256_hash v2;
│ │ │ │  };
│ │ │ │  
│ │ │ │ [report issue]
│ │ │ │

info_hash_t()

│ │ │ │
│ │ │ │  info_hash_t () noexcept = default;
│ │ │ │ -explicit info_hash_t (sha1_hash h1) noexcept;
│ │ │ │ -explicit info_hash_t (sha256_hash h2) noexcept;
│ │ │ │  info_hash_t (sha1_hash h1, sha256_hash h2) noexcept;
│ │ │ │ +explicit info_hash_t (sha256_hash h2) noexcept;
│ │ │ │ +explicit info_hash_t (sha1_hash h1) noexcept;
│ │ │ │  
│ │ │ │

The default constructor creates an object that has neither a v1 or v2 │ │ │ │ hash.

│ │ │ │

For backwards compatibility, make it possible to construct directly │ │ │ │ from a v1 hash. This constructor allows implicit conversion from a │ │ │ │ v1 hash, but the implicitness is deprecated.

│ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

has_v2() has() has_v1()

│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

has_v1() has_v2() has()

│ │ │ │
│ │ │ │  bool has (protocol_version v) const;
│ │ │ │ -bool has_v2 () const;
│ │ │ │  bool has_v1 () const;
│ │ │ │ +bool has_v2 () const;
│ │ │ │  
│ │ │ │

returns true if the corresponding info hash is present in this │ │ │ │ object.

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

get()

│ │ │ │
│ │ │ │ @@ -689,22 +689,64 @@
│ │ │ │  template <typename F> void for_each (F f) const;
│ │ │ │  
│ │ │ │

calls the function object f for each hash that is available. │ │ │ │ starting with v1. The signature of F is:

│ │ │ │
│ │ │ │  void(sha1_hash const&, protocol_version);
│ │ │ │  
│ │ │ │ -[report issue]
│ │ │ │ + │ │ │ │ + │ │ │ │ +[report issue]
│ │ │ │ │ │ │ │ +
│ │ │ │ +

load_torrent_file() load_torrent_parsed() load_torrent_buffer()

│ │ │ │ +

Declared in "libtorrent/load_torrent.hpp"

│ │ │ │ +
│ │ │ │ +add_torrent_params load_torrent_parsed (
│ │ │ │ +   bdecode_node const& torrent_file);
│ │ │ │ +add_torrent_params load_torrent_buffer (
│ │ │ │ +   span<char const> buffer);
│ │ │ │ +add_torrent_params load_torrent_file (
│ │ │ │ +   std::string const& filename, load_torrent_limits const& cfg);
│ │ │ │ +add_torrent_params load_torrent_parsed (
│ │ │ │ +   bdecode_node const& torrent_file, load_torrent_limits const& cfg);
│ │ │ │ +add_torrent_params load_torrent_buffer (
│ │ │ │ +   span<char const> buffer, load_torrent_limits const& cfg);
│ │ │ │ +add_torrent_params load_torrent_file (
│ │ │ │ +   std::string const& filename);
│ │ │ │ +
│ │ │ │ +

These functions load the content of a .torrent file into an │ │ │ │ +add_torrent_params object. │ │ │ │ +The immutable part of a torrent file (the info-dictionary) is stored in │ │ │ │ +the ti field in the add_torrent_params object (as a torrent_info │ │ │ │ +object). │ │ │ │ +The returned object is suitable to be:

│ │ │ │ +
│ │ │ │ + │ │ │ │ +
│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

truncate_files()

│ │ │ │ +

Declared in "libtorrent/truncate.hpp"

│ │ │ │ +
│ │ │ │ +void truncate_files (file_storage const& fs, std::string const& save_path, storage_error& ec);
│ │ │ │ +
│ │ │ │ +

Truncates files larger than specified in the file_storage, saved under │ │ │ │ +the specified save_path.

│ │ │ │ +[report issue]
│ │ │ │
│ │ │ │

make_magnet_uri()

│ │ │ │

Declared in "libtorrent/magnet_uri.hpp"

│ │ │ │
│ │ │ │ -std::string make_magnet_uri (add_torrent_params const& atp);
│ │ │ │  std::string make_magnet_uri (torrent_info const& info);
│ │ │ │ +std::string make_magnet_uri (add_torrent_params const& atp);
│ │ │ │  std::string make_magnet_uri (torrent_handle const& handle);
│ │ │ │  
│ │ │ │

Generates a magnet URI from the specified torrent.

│ │ │ │

Several fields from the add_torrent_params objects are recorded in the │ │ │ │ magnet link. In order to not include them, they have to be cleared before │ │ │ │ calling make_magnet_uri(). These fields are used:

│ │ │ │
│ │ │ │ @@ -726,80 +768,77 @@ │ │ │ │

For more information about magnet links, see magnet links.

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

parse_magnet_uri()

│ │ │ │

Declared in "libtorrent/magnet_uri.hpp"

│ │ │ │
│ │ │ │  add_torrent_params parse_magnet_uri (string_view uri, error_code& ec);
│ │ │ │ -add_torrent_params parse_magnet_uri (string_view uri);
│ │ │ │  void parse_magnet_uri (string_view uri, add_torrent_params& p, error_code& ec);
│ │ │ │ +add_torrent_params parse_magnet_uri (string_view uri);
│ │ │ │  
│ │ │ │

This function parses out information from the magnet link and populates the │ │ │ │ add_torrent_params object. The overload that does not take an │ │ │ │ error_code reference will throw a system_error on error │ │ │ │ The overload taking an add_torrent_params reference will fill in the │ │ │ │ fields specified in the magnet URI.

│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

torrent_peer_equal()

│ │ │ │

Declared in "libtorrent/torrent_peer.hpp"

│ │ │ │
│ │ │ │  inline bool torrent_peer_equal (torrent_peer const* lhs, torrent_peer const* rhs);
│ │ │ │  
│ │ │ │ - │ │ │ │ - │ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

load_torrent_file() load_torrent_buffer() load_torrent_parsed()

│ │ │ │ -

Declared in "libtorrent/load_torrent.hpp"

│ │ │ │ -
│ │ │ │ -add_torrent_params load_torrent_parsed (
│ │ │ │ -   bdecode_node const& torrent_file);
│ │ │ │ -add_torrent_params load_torrent_file (
│ │ │ │ -   std::string const& filename);
│ │ │ │ -add_torrent_params load_torrent_buffer (
│ │ │ │ -   span<char const> buffer);
│ │ │ │ -add_torrent_params load_torrent_buffer (
│ │ │ │ -   span<char const> buffer, load_torrent_limits const& cfg);
│ │ │ │ -add_torrent_params load_torrent_file (
│ │ │ │ -   std::string const& filename, load_torrent_limits const& cfg);
│ │ │ │ -add_torrent_params load_torrent_parsed (
│ │ │ │ -   bdecode_node const& torrent_file, load_torrent_limits const& cfg);
│ │ │ │ -
│ │ │ │ -

These functions load the content of a .torrent file into an │ │ │ │ -add_torrent_params object. │ │ │ │ -The immutable part of a torrent file (the info-dictionary) is stored in │ │ │ │ -the ti field in the add_torrent_params object (as a torrent_info │ │ │ │ -object). │ │ │ │ -The returned object is suitable to be:

│ │ │ │ -
│ │ │ │ - │ │ │ │ -
│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

version()

│ │ │ │

Declared in "libtorrent/version.hpp"

│ │ │ │
│ │ │ │  char const* version ();
│ │ │ │  
│ │ │ │

returns the libtorrent version as string form in this format: │ │ │ │ "<major>.<minor>.<tiny>.<tag>"

│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

truncate_files()

│ │ │ │ -

Declared in "libtorrent/truncate.hpp"

│ │ │ │ -
│ │ │ │ -void truncate_files (file_storage const& fs, std::string const& save_path, storage_error& ec);
│ │ │ │ -
│ │ │ │ -

Truncates files larger than specified in the file_storage, saved under │ │ │ │ -the specified save_path.

│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

enum event_t

│ │ │ │ +

Declared in "libtorrent/tracker_manager.hpp"

│ │ │ │ + │ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
namevaluedescription
none0 
completed1 
started2 
stopped3 
paused4 
│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

enum portmap_transport

│ │ │ │

Declared in "libtorrent/portmap.hpp"

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -850,14 +889,45 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
udp2 
│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

enum protocol_version

│ │ │ │ +

Declared in "libtorrent/info_hash.hpp"

│ │ │ │ + │ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
namevaluedescription
V10The original BitTorrent version, using SHA-1 hashes
V21Version 2 of the BitTorrent protocol, using SHA-256 hashes
NUM2 
│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

enum socket_type_t

│ │ │ │

Declared in "libtorrent/socket_type.hpp"

│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -936,105 +1006,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
http_seed2 
│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

enum protocol_version

│ │ │ │ -

Declared in "libtorrent/info_hash.hpp"

│ │ │ │ - │ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
namevaluedescription
V10The original BitTorrent version, using SHA-1 hashes
V21Version 2 of the BitTorrent protocol, using SHA-256 hashes
NUM2 
│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

enum event_t

│ │ │ │ -

Declared in "libtorrent/tracker_manager.hpp"

│ │ │ │ - │ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
namevaluedescription
none0 
completed1 
started2 
stopped3 
paused4 
│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

download_priority_t

│ │ │ │ -

Declared in "libtorrent/download_priority.hpp"

│ │ │ │ -
│ │ │ │ -
dont_download
│ │ │ │ -
Don't download the file or piece. Partial pieces may still be downloaded when │ │ │ │ -setting file priorities.
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
default_priority
│ │ │ │ -
The default priority for files and pieces.
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
low_priority
│ │ │ │ -
The lowest priority for files and pieces.
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
top_priority
│ │ │ │ -
The highest priority for files and pieces.
│ │ │ │ -
│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

torrent_flags_t

│ │ │ │

Declared in "libtorrent/torrent_flags.hpp"

│ │ │ │
│ │ │ │
seed_mode
│ │ │ │

If seed_mode is set, libtorrent will assume that all files │ │ │ │ @@ -1261,14 +1240,30 @@ │ │ │ │ URL.

│ │ │ │
│ │ │ │
│ │ │ │
all
│ │ │ │
all torrent flags combined. Can conveniently be used when creating masks │ │ │ │ for flags
│ │ │ │
│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

int

│ │ │ │ +

Declared in "libtorrent/version.hpp"

│ │ │ │ +
│ │ │ │ +
version_major
│ │ │ │ +
the major, minor and tiny versions of libtorrent
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
version_minor
│ │ │ │ +
the major, minor and tiny versions of libtorrent
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
version_tiny
│ │ │ │ +
the major, minor and tiny versions of libtorrent
│ │ │ │ +
│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

pex_flags_t

│ │ │ │

Declared in "libtorrent/pex_flags.hpp"

│ │ │ │
│ │ │ │
pex_encryption
│ │ │ │
the peer supports protocol encryption
│ │ │ │ @@ -1288,30 +1283,14 @@ │ │ │ │ the peer fail │ │ │ │
│ │ │ │
│ │ │ │
pex_lt_v2
│ │ │ │
protocol v2 │ │ │ │ this is not a standard flag, it is only used internally
│ │ │ │
│ │ │ │ -[report issue]
│ │ │ │ -
│ │ │ │ -

int

│ │ │ │ -

Declared in "libtorrent/version.hpp"

│ │ │ │ -
│ │ │ │ -
version_major
│ │ │ │ -
the major, minor and tiny versions of libtorrent
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
version_minor
│ │ │ │ -
the major, minor and tiny versions of libtorrent
│ │ │ │ -
│ │ │ │ -
│ │ │ │ -
version_tiny
│ │ │ │ -
the major, minor and tiny versions of libtorrent
│ │ │ │ -
│ │ │ │ [report issue]
│ │ │ │
│ │ │ │

char const*

│ │ │ │

Declared in "libtorrent/version.hpp"

│ │ │ │
│ │ │ │
version_str
│ │ │ │
the libtorrent version in string form
│ │ │ │ @@ -1320,14 +1299,35 @@ │ │ │ │
│ │ │ │

std::uint64_t

│ │ │ │

Declared in "libtorrent/version.hpp"

│ │ │ │
│ │ │ │
version_revision
│ │ │ │
the git commit of this libtorrent version
│ │ │ │
│ │ │ │ +[report issue]
│ │ │ │ +
│ │ │ │ +

download_priority_t

│ │ │ │ +

Declared in "libtorrent/download_priority.hpp"

│ │ │ │ +
│ │ │ │ +
dont_download
│ │ │ │ +
Don't download the file or piece. Partial pieces may still be downloaded when │ │ │ │ +setting file priorities.
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
default_priority
│ │ │ │ +
The default priority for files and pieces.
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
low_priority
│ │ │ │ +
The lowest priority for files and pieces.
│ │ │ │ +
│ │ │ │ +
│ │ │ │ +
top_priority
│ │ │ │ +
The highest priority for files and pieces.
│ │ │ │ +
│ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │ │ │ │ │
│ │ │ │
│ │ │ │ │ │ │ │ -
│ │ │ │ -

settings_interface

│ │ │ │ -

Declared in "libtorrent/settings_pack.hpp"

│ │ │ │ -

the common interface to settings_pack and the internal representation of │ │ │ │ -settings.

│ │ │ │ -
│ │ │ │ -struct settings_interface
│ │ │ │ -{
│ │ │ │ -   virtual bool has_val (int name) const = 0;
│ │ │ │ -   virtual void set_int (int name, int val) = 0;
│ │ │ │ -   virtual void set_str (int name, std::string val) = 0;
│ │ │ │ -   virtual void set_bool (int name, bool val) = 0;
│ │ │ │ -   virtual int get_int (int name) const = 0;
│ │ │ │ -   virtual std::string const& get_str (int name) const = 0;
│ │ │ │ -   virtual bool get_bool (int name) const = 0;
│ │ │ │ -};
│ │ │ │ -
│ │ │ │ [report issue]
│ │ │ │ +
│ │ │ │
│ │ │ │

file_open_mode_t

│ │ │ │

Declared in "libtorrent/disk_interface.hpp"

│ │ │ │
│ │ │ │
read_only
│ │ │ │
open the file for reading only
│ │ │ │
│ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,17 +1,28 @@ │ │ │ │ │ > │ │ │ │ │ _[_l_i_b_t_o_r_r_e_n_t_ _l_o_g_o_] │ │ │ │ │ VVeerrssiioonn:: 2.0.11 │ │ │ │ │ _h_o_m_e │ │ │ │ │ Table of contents │ │ │ │ │ + * _s_e_t_t_i_n_g_s___i_n_t_e_r_f_a_c_e │ │ │ │ │ + * _b_u_f_f_e_r___a_l_l_o_c_a_t_o_r___i_n_t_e_r_f_a_c_e │ │ │ │ │ + * _d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r │ │ │ │ │ + o _d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r_(_) │ │ │ │ │ + o _d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r_(_) │ │ │ │ │ + o _~_d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r_(_) │ │ │ │ │ + o _d_a_t_a_(_) │ │ │ │ │ + o _r_e_s_e_t_(_) │ │ │ │ │ + o _s_w_a_p_(_) │ │ │ │ │ + o _i_s___m_u_t_a_b_l_e_(_) │ │ │ │ │ + o _b_o_o_l_(_) │ │ │ │ │ * _o_p_e_n___f_i_l_e___s_t_a_t_e │ │ │ │ │ * _d_i_s_k___i_n_t_e_r_f_a_c_e │ │ │ │ │ o _n_e_w___t_o_r_r_e_n_t_(_) │ │ │ │ │ o _r_e_m_o_v_e___t_o_r_r_e_n_t_(_) │ │ │ │ │ - o _a_s_y_n_c___w_r_i_t_e_(_)_ _a_s_y_n_c___r_e_a_d_(_) │ │ │ │ │ + o _a_s_y_n_c___r_e_a_d_(_)_ _a_s_y_n_c___w_r_i_t_e_(_) │ │ │ │ │ o _a_s_y_n_c___h_a_s_h_(_) │ │ │ │ │ o _a_s_y_n_c___h_a_s_h_2_(_) │ │ │ │ │ o _a_s_y_n_c___m_o_v_e___s_t_o_r_a_g_e_(_) │ │ │ │ │ o _a_s_y_n_c___r_e_l_e_a_s_e___f_i_l_e_s_(_) │ │ │ │ │ o _a_s_y_n_c___c_h_e_c_k___f_i_l_e_s_(_) │ │ │ │ │ o _a_s_y_n_c___s_t_o_p___t_o_r_r_e_n_t_(_) │ │ │ │ │ o _a_s_y_n_c___r_e_n_a_m_e___f_i_l_e_(_) │ │ │ │ │ @@ -20,40 +31,393 @@ │ │ │ │ │ o _a_s_y_n_c___c_l_e_a_r___p_i_e_c_e_(_) │ │ │ │ │ o _u_p_d_a_t_e___s_t_a_t_s___c_o_u_n_t_e_r_s_(_) │ │ │ │ │ o _g_e_t___s_t_a_t_u_s_(_) │ │ │ │ │ o _a_b_o_r_t_(_) │ │ │ │ │ o _s_u_b_m_i_t___j_o_b_s_(_) │ │ │ │ │ o _s_e_t_t_i_n_g_s___u_p_d_a_t_e_d_(_) │ │ │ │ │ * _s_t_o_r_a_g_e___h_o_l_d_e_r │ │ │ │ │ - * _b_u_f_f_e_r___a_l_l_o_c_a_t_o_r___i_n_t_e_r_f_a_c_e │ │ │ │ │ - * _d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r │ │ │ │ │ - o _d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r_(_) │ │ │ │ │ - o _d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r_(_) │ │ │ │ │ - o _~_d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r_(_) │ │ │ │ │ - o _d_a_t_a_(_) │ │ │ │ │ - o _r_e_s_e_t_(_) │ │ │ │ │ - o _s_w_a_p_(_) │ │ │ │ │ - o _i_s___m_u_t_a_b_l_e_(_) │ │ │ │ │ - o _b_o_o_l_(_) │ │ │ │ │ * _d_i_s_k___o_b_s_e_r_v_e_r │ │ │ │ │ o _o_n___d_i_s_k_(_) │ │ │ │ │ - * _s_e_t_t_i_n_g_s___i_n_t_e_r_f_a_c_e │ │ │ │ │ * _f_i_l_e___o_p_e_n___m_o_d_e___t │ │ │ │ │ -You have some control over _s_e_s_s_i_o_n configuration through the session:: │ │ │ │ │ -apply_settings() member function. To change one or more configuration options, │ │ │ │ │ -create a _s_e_t_t_i_n_g_s___p_a_c_k object and fill it with the settings to be set and pass │ │ │ │ │ -it in to session::apply_settings(). │ │ │ │ │ -The _s_e_t_t_i_n_g_s___p_a_c_k object is a collection of settings updates that are applied │ │ │ │ │ -to the _s_e_s_s_i_o_n when passed to session::apply_settings(). It's empty when │ │ │ │ │ -constructed. │ │ │ │ │ -You have control over proxy and authorization settings and also the user-agent │ │ │ │ │ -that will be sent to the tracker. The user-agent will also be used to identify │ │ │ │ │ -the client with other peers. │ │ │ │ │ -Each configuration option is named with an enum value inside the _s_e_t_t_i_n_g_s___p_a_c_k │ │ │ │ │ -class. These are the available settings: │ │ │ │ │ +The disk I/O can be customized in libtorrent. In previous versions, the │ │ │ │ │ +customization was at the level of each torrent. Now, the customization point is │ │ │ │ │ +at the _s_e_s_s_i_o_n level. All torrents added to a _s_e_s_s_i_o_n will use the same disk I/ │ │ │ │ │ +O subsystem, as determined by the disk_io_constructor (in _s_e_s_s_i_o_n___p_a_r_a_m_s). │ │ │ │ │ +This allows the disk subsystem to also customize threading and disk job │ │ │ │ │ +management. │ │ │ │ │ +To customize the disk subsystem, implement _d_i_s_k___i_n_t_e_r_f_a_c_e and provide a factory │ │ │ │ │ +function to the _s_e_s_s_i_o_n constructor (via _s_e_s_s_i_o_n___p_a_r_a_m_s). │ │ │ │ │ +Example use: │ │ │ │ │ +struct temp_storage │ │ │ │ │ +{ │ │ │ │ │ + explicit temp_storage(lt::file_storage const& fs) : m_files(fs) {} │ │ │ │ │ + │ │ │ │ │ + lt::span readv(lt::peer_request const r, lt::storage_error& ec) │ │ │ │ │ +const │ │ │ │ │ + { │ │ │ │ │ + auto const i = m_file_data.find(r.piece); │ │ │ │ │ + if (i == m_file_data.end()) │ │ │ │ │ + { │ │ │ │ │ + ec.operation = lt::operation_t::file_read; │ │ │ │ │ + ec.ec = boost::asio::error::eof; │ │ │ │ │ + return {}; │ │ │ │ │ + } │ │ │ │ │ + if (int(i->second.size()) <= r.start) │ │ │ │ │ + { │ │ │ │ │ + ec.operation = lt::operation_t::file_read; │ │ │ │ │ + ec.ec = boost::asio::error::eof; │ │ │ │ │ + return {}; │ │ │ │ │ + } │ │ │ │ │ + return { i->second.data() + r.start, std::min(r.length, int(i->second.size │ │ │ │ │ +()) - r.start) }; │ │ │ │ │ + } │ │ │ │ │ + void writev(lt::span const b, lt::piece_index_t const piece, int │ │ │ │ │ +const offset) │ │ │ │ │ + { │ │ │ │ │ + auto& data = m_file_data[piece]; │ │ │ │ │ + if (data.empty()) │ │ │ │ │ + { │ │ │ │ │ + // allocate the whole piece, otherwise we'll invalidate the pointers │ │ │ │ │ + // we have returned back to libtorrent │ │ │ │ │ + int const size = piece_size(piece); │ │ │ │ │ + data.resize(std::size_t(size)); │ │ │ │ │ + } │ │ │ │ │ + TORRENT_ASSERT(offset + b.size() <= int(data.size())); │ │ │ │ │ + std::memcpy(data.data() + offset, b.data(), std::size_t(b.size())); │ │ │ │ │ + } │ │ │ │ │ + lt::sha1_hash hash(lt::piece_index_t const piece │ │ │ │ │ + , lt::span const block_hashes, lt::storage_error& ec) │ │ │ │ │ +const │ │ │ │ │ + { │ │ │ │ │ + auto const i = m_file_data.find(piece); │ │ │ │ │ + if (i == m_file_data.end()) │ │ │ │ │ + { │ │ │ │ │ + ec.operation = lt::operation_t::file_read; │ │ │ │ │ + ec.ec = boost::asio::error::eof; │ │ │ │ │ + return {}; │ │ │ │ │ + } │ │ │ │ │ + if (!block_hashes.empty()) │ │ │ │ │ + { │ │ │ │ │ + int const piece_size2 = m_files.piece_size2(piece); │ │ │ │ │ + int const blocks_in_piece2 = m_files.blocks_in_piece2(piece); │ │ │ │ │ + char const* buf = i->second.data(); │ │ │ │ │ + std::int64_t offset = 0; │ │ │ │ │ + for (int k = 0; k < blocks_in_piece2; ++k) │ │ │ │ │ + { │ │ │ │ │ + lt::hasher256 h2; │ │ │ │ │ + std::ptrdiff_t const len2 = std::min(lt::default_block_size, int │ │ │ │ │ +(piece_size2 - offset)); │ │ │ │ │ + h2.update({ buf, len2 }); │ │ │ │ │ + buf += len2; │ │ │ │ │ + offset += len2; │ │ │ │ │ + block_hashes[k] = h2.final(); │ │ │ │ │ + } │ │ │ │ │ + } │ │ │ │ │ + return lt::hasher(i->second).final(); │ │ │ │ │ + } │ │ │ │ │ + lt::sha256_hash hash2(lt::piece_index_t const piece, int const offset, lt:: │ │ │ │ │ +storage_error& ec) │ │ │ │ │ + { │ │ │ │ │ + auto const i = m_file_data.find(piece); │ │ │ │ │ + if (i == m_file_data.end()) │ │ │ │ │ + { │ │ │ │ │ + ec.operation = lt::operation_t::file_read; │ │ │ │ │ + ec.ec = boost::asio::error::eof; │ │ │ │ │ + return {}; │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + int const piece_size = m_files.piece_size2(piece); │ │ │ │ │ + │ │ │ │ │ + std::ptrdiff_t const len = std::min(lt::default_block_size, piece_size - │ │ │ │ │ +offset); │ │ │ │ │ + │ │ │ │ │ + lt::span b = {i->second.data() + offset, len}; │ │ │ │ │ + return lt::hasher256(b).final(); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ +private: │ │ │ │ │ + int piece_size(lt::piece_index_t piece) const │ │ │ │ │ + { │ │ │ │ │ + int const num_pieces = static_cast((m_files.total_size() + │ │ │ │ │ +m_files.piece_length() - 1) / m_files.piece_length()); │ │ │ │ │ + return static_cast(piece) < num_pieces - 1 │ │ │ │ │ + ? m_files.piece_length() : static_cast(m_files.total_size() - std:: │ │ │ │ │ +int64_t(num_pieces - 1) * m_files.piece_length()); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + lt::file_storage const& m_files; │ │ │ │ │ + std::map> m_file_data; │ │ │ │ │ +}; │ │ │ │ │ + │ │ │ │ │ +lt::storage_index_t pop(std::vector& q) │ │ │ │ │ +{ │ │ │ │ │ + TORRENT_ASSERT(!q.empty()); │ │ │ │ │ + lt::storage_index_t const ret = q.back(); │ │ │ │ │ + q.pop_back(); │ │ │ │ │ + return ret; │ │ │ │ │ +} │ │ │ │ │ + │ │ │ │ │ +struct temp_disk_io final : lt::disk_interface │ │ │ │ │ + , lt::buffer_allocator_interface │ │ │ │ │ +{ │ │ │ │ │ + explicit temp_disk_io(lt::io_context& ioc): m_ioc(ioc) {} │ │ │ │ │ + │ │ │ │ │ + void settings_updated() override {} │ │ │ │ │ + │ │ │ │ │ + lt::storage_holder new_torrent(lt::storage_params const& params │ │ │ │ │ + , std::shared_ptr const&) override │ │ │ │ │ + { │ │ │ │ │ + lt::storage_index_t const idx = m_free_slots.empty() │ │ │ │ │ + ? m_torrents.end_index() │ │ │ │ │ + : pop(m_free_slots); │ │ │ │ │ + auto storage = std::make_unique(params.files); │ │ │ │ │ + if (idx == m_torrents.end_index()) m_torrents.emplace_back(std::move │ │ │ │ │ +(storage)); │ │ │ │ │ + else m_torrents[idx] = std::move(storage); │ │ │ │ │ + return lt::storage_holder(idx, *this); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void remove_torrent(lt::storage_index_t const idx) override │ │ │ │ │ + { │ │ │ │ │ + m_torrents[idx].reset(); │ │ │ │ │ + m_free_slots.push_back(idx); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void abort(bool) override {} │ │ │ │ │ + │ │ │ │ │ + void async_read(lt::storage_index_t storage, lt::peer_request const& r │ │ │ │ │ + , std::function handler │ │ │ │ │ + , lt::disk_job_flags_t) override │ │ │ │ │ + { │ │ │ │ │ + // this buffer is owned by the storage. It will remain valid for as │ │ │ │ │ + // long as the torrent remains in the session. We don't need any lifetime │ │ │ │ │ + // management of it. │ │ │ │ │ + lt::storage_error error; │ │ │ │ │ + lt::span b = m_torrents[storage]->readv(r, error); │ │ │ │ │ + │ │ │ │ │ + post(m_ioc, [handler, error, b, this] │ │ │ │ │ + { handler(lt::disk_buffer_holder(*this, const_cast(b.data()), int │ │ │ │ │ +(b.size())), error); }); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + bool async_write(lt::storage_index_t storage, lt::peer_request const& r │ │ │ │ │ + , char const* buf, std::shared_ptr │ │ │ │ │ + , std::function handler │ │ │ │ │ + , lt::disk_job_flags_t) override │ │ │ │ │ + { │ │ │ │ │ + lt::span const b = { buf, r.length }; │ │ │ │ │ + │ │ │ │ │ + m_torrents[storage]->writev(b, r.piece, r.start); │ │ │ │ │ + │ │ │ │ │ + post(m_ioc, [=]{ handler(lt::storage_error()); }); │ │ │ │ │ + return false; │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void async_hash(lt::storage_index_t storage, lt::piece_index_t const piece │ │ │ │ │ + , lt::span block_hashes, lt::disk_job_flags_t │ │ │ │ │ + , std::function handler) override │ │ │ │ │ + { │ │ │ │ │ + lt::storage_error error; │ │ │ │ │ + lt::sha1_hash const hash = m_torrents[storage]->hash(piece, block_hashes, │ │ │ │ │ +error); │ │ │ │ │ + post(m_ioc, [=]{ handler(piece, hash, error); }); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void async_hash2(lt::storage_index_t storage, lt::piece_index_t const piece │ │ │ │ │ + , int const offset, lt::disk_job_flags_t │ │ │ │ │ + , std::function handler) override │ │ │ │ │ + { │ │ │ │ │ + lt::storage_error error; │ │ │ │ │ + lt::sha256_hash const hash = m_torrents[storage]->hash2(piece, offset, │ │ │ │ │ +error); │ │ │ │ │ + post(m_ioc, [=]{ handler(piece, hash, error); }); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void async_move_storage(lt::storage_index_t, std::string p, lt::move_flags_t │ │ │ │ │ + , std::function handler) override │ │ │ │ │ + { │ │ │ │ │ + post(m_ioc, [=]{ │ │ │ │ │ + handler(lt::status_t::fatal_disk_error, p │ │ │ │ │ + , lt::storage_error(lt::error_code(boost::system::errc:: │ │ │ │ │ +operation_not_supported, lt::system_category()))); │ │ │ │ │ + }); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void async_release_files(lt::storage_index_t, std::function) override │ │ │ │ │ +{} │ │ │ │ │ + │ │ │ │ │ + void async_delete_files(lt::storage_index_t, lt::remove_flags_t │ │ │ │ │ + , std::function handler) override │ │ │ │ │ + { │ │ │ │ │ + post(m_ioc, [=]{ handler(lt::storage_error()); }); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void async_check_files(lt::storage_index_t │ │ │ │ │ + , lt::add_torrent_params const* │ │ │ │ │ + , lt::aux::vector │ │ │ │ │ + , std::function handler) │ │ │ │ │ +override │ │ │ │ │ + { │ │ │ │ │ + post(m_ioc, [=]{ handler(lt::status_t::no_error, lt::storage_error()); }); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void async_rename_file(lt::storage_index_t │ │ │ │ │ + , lt::file_index_t const idx │ │ │ │ │ + , std::string const name │ │ │ │ │ + , std::function handler) override │ │ │ │ │ + { │ │ │ │ │ + post(m_ioc, [=]{ handler(name, idx, lt::storage_error()); }); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void async_stop_torrent(lt::storage_index_t, std::function handler) │ │ │ │ │ +override │ │ │ │ │ + { │ │ │ │ │ + post(m_ioc, handler); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void async_set_file_priority(lt::storage_index_t │ │ │ │ │ + , lt::aux::vector prio │ │ │ │ │ + , std::function)> handler) │ │ │ │ │ +override │ │ │ │ │ + { │ │ │ │ │ + post(m_ioc, [=]{ │ │ │ │ │ + handler(lt::storage_error(lt::error_code( │ │ │ │ │ + boost::system::errc::operation_not_supported, lt::system_category())), │ │ │ │ │ +std::move(prio)); │ │ │ │ │ + }); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void async_clear_piece(lt::storage_index_t, lt::piece_index_t index │ │ │ │ │ + , std::function handler) override │ │ │ │ │ + { │ │ │ │ │ + post(m_ioc, [=]{ handler(index); }); │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + // implements buffer_allocator_interface │ │ │ │ │ + void free_disk_buffer(char*) override │ │ │ │ │ + { │ │ │ │ │ + // never free any buffer. We only return buffers owned by the storage │ │ │ │ │ + // object │ │ │ │ │ + } │ │ │ │ │ + │ │ │ │ │ + void update_stats_counters(lt::counters&) const override {} │ │ │ │ │ + │ │ │ │ │ + std::vector get_status(lt::storage_index_t) const │ │ │ │ │ +override │ │ │ │ │ + { return {}; } │ │ │ │ │ + │ │ │ │ │ + void submit_jobs() override {} │ │ │ │ │ + │ │ │ │ │ +private: │ │ │ │ │ + │ │ │ │ │ + lt::aux::vector, lt::storage_index_t> │ │ │ │ │ +m_torrents; │ │ │ │ │ + │ │ │ │ │ + // slots that are unused in the m_torrents vector │ │ │ │ │ + std::vector m_free_slots; │ │ │ │ │ + │ │ │ │ │ + // callbacks are posted on this │ │ │ │ │ + lt::io_context& m_ioc; │ │ │ │ │ +}; │ │ │ │ │ + │ │ │ │ │ +std::unique_ptr temp_disk_constructor( │ │ │ │ │ + lt::io_context& ioc, lt::settings_interface const&, lt::counters&) │ │ │ │ │ +{ │ │ │ │ │ + return std::make_unique(ioc); │ │ │ │ │ +} │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +************ sseettttiinnggss__iinntteerrffaaccee ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_t_t_i_n_g_s___p_a_c_k_._h_p_p" │ │ │ │ │ +the common interface to _s_e_t_t_i_n_g_s___p_a_c_k and the internal representation of │ │ │ │ │ +settings. │ │ │ │ │ +struct settings_interface │ │ │ │ │ +{ │ │ │ │ │ + virtual void sseett__iinntt (int name, int val) = 0; │ │ │ │ │ + virtual void sseett__ssttrr (int name, std::string val) = 0; │ │ │ │ │ + virtual void sseett__bbooooll (int name, bool val) = 0; │ │ │ │ │ + virtual bool hhaass__vvaall (int name) const = 0; │ │ │ │ │ + virtual int ggeett__iinntt (int name) const = 0; │ │ │ │ │ + virtual bool ggeett__bbooooll (int name) const = 0; │ │ │ │ │ + virtual std::string const& ggeett__ssttrr (int name) const = 0; │ │ │ │ │ +}; │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +************ bbuuffffeerr__aallllooccaattoorr__iinntteerrffaaccee ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r_._h_p_p" │ │ │ │ │ +the interface for freeing disk buffers, used by the _d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r. when │ │ │ │ │ +implementing _d_i_s_k___i_n_t_e_r_f_a_c_e, this must also be implemented in order to return │ │ │ │ │ +disk buffers back to libtorrent │ │ │ │ │ +struct buffer_allocator_interface │ │ │ │ │ +{ │ │ │ │ │ + virtual void ffrreeee__ddiisskk__bbuuffffeerr (char* b) = 0; │ │ │ │ │ +}; │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +************ ddiisskk__bbuuffffeerr__hhoollddeerr ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r_._h_p_p" │ │ │ │ │ +The disk buffer holder acts like a unique_ptr that frees a disk buffer when │ │ │ │ │ +it's destructed │ │ │ │ │ +If this buffer holder is moved-from, default constructed or reset, data() will │ │ │ │ │ +return nullptr. │ │ │ │ │ +struct disk_buffer_holder │ │ │ │ │ +{ │ │ │ │ │ + disk_buffer_holder& ooppeerraattoorr== (disk_buffer_holder&&) & noexcept; │ │ │ │ │ + ddiisskk__bbuuffffeerr__hhoollddeerr (disk_buffer_holder&&) noexcept; │ │ │ │ │ + disk_buffer_holder& ooppeerraattoorr== (disk_buffer_holder const&) = delete; │ │ │ │ │ + ddiisskk__bbuuffffeerr__hhoollddeerr (disk_buffer_holder const&) = delete; │ │ │ │ │ + ddiisskk__bbuuffffeerr__hhoollddeerr (buffer_allocator_interface& alloc │ │ │ │ │ + , char* buf, int sz) noexcept; │ │ │ │ │ + ddiisskk__bbuuffffeerr__hhoollddeerr () noexcept = default; │ │ │ │ │ + ~~ddiisskk__bbuuffffeerr__hhoollddeerr (); │ │ │ │ │ + char* ddaattaa () const noexcept; │ │ │ │ │ + void rreesseett (); │ │ │ │ │ + void sswwaapp (disk_buffer_holder& h) noexcept; │ │ │ │ │ + bool iiss__mmuuttaabbllee () const noexcept; │ │ │ │ │ + explicit operator bbooooll () const noexcept; │ │ │ │ │ + std::ptrdiff_t ssiizzee () const; │ │ │ │ │ +}; │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +********** ddiisskk__bbuuffffeerr__hhoollddeerr(()) ********** │ │ │ │ │ +ddiisskk__bbuuffffeerr__hhoollddeerr (buffer_allocator_interface& alloc │ │ │ │ │ + , char* buf, int sz) noexcept; │ │ │ │ │ +construct a buffer holder that will free the held buffer using a disk buffer │ │ │ │ │ +pool directly (there's only one disk_buffer_pool per _s_e_s_s_i_o_n) │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +********** ddiisskk__bbuuffffeerr__hhoollddeerr(()) ********** │ │ │ │ │ +ddiisskk__bbuuffffeerr__hhoollddeerr () noexcept = default; │ │ │ │ │ +default construct a holder that does not own any buffer │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +********** ~~ddiisskk__bbuuffffeerr__hhoollddeerr(()) ********** │ │ │ │ │ +~~ddiisskk__bbuuffffeerr__hhoollddeerr (); │ │ │ │ │ +frees disk buffer held by this object │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +********** ddaattaa(()) ********** │ │ │ │ │ +char* ddaattaa () const noexcept; │ │ │ │ │ +return a pointer to the held buffer, if any. Otherwise returns nullptr. │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +********** rreesseett(()) ********** │ │ │ │ │ +void rreesseett (); │ │ │ │ │ +free the held disk buffer, if any, and clear the holder. This sets the holder │ │ │ │ │ +object to a default-constructed state │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +********** sswwaapp(()) ********** │ │ │ │ │ +void sswwaapp (disk_buffer_holder& h) noexcept; │ │ │ │ │ +swap pointers of two disk buffer holders. │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +********** iiss__mmuuttaabbllee(()) ********** │ │ │ │ │ +bool iiss__mmuuttaabbllee () const noexcept; │ │ │ │ │ +if this returns true, the buffer may not be modified in place │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +********** bbooooll(()) ********** │ │ │ │ │ +explicit operator bbooooll () const noexcept; │ │ │ │ │ +implicitly convertible to true if the object is currently holding a buffer │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ooppeenn__ffiillee__ssttaattee ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_d_i_s_k___i_n_t_e_r_f_a_c_e_._h_p_p" │ │ │ │ │ this contains information about a file that's currently open by the libtorrent │ │ │ │ │ disk I/O subsystem. It's associated with a single torrent. │ │ │ │ │ struct open_file_state │ │ │ │ │ { │ │ │ │ │ @@ -90,21 +454,21 @@ │ │ │ │ │ thread via the io_context object passed into the constructor. The callbacks │ │ │ │ │ will be run in the network thread. │ │ │ │ │ struct disk_interface │ │ │ │ │ { │ │ │ │ │ virtual storage_holder nneeww__ttoorrrreenntt (storage_params const& p │ │ │ │ │ , std::shared_ptr const& torrent) = 0; │ │ │ │ │ virtual void rreemmoovvee__ttoorrrreenntt (storage_index_t) = 0; │ │ │ │ │ + virtual void aassyynncc__rreeaadd (storage_index_t storage, peer_request const& r │ │ │ │ │ + , std::function handler │ │ │ │ │ + , disk_job_flags_t flags = {}) = 0; │ │ │ │ │ virtual bool aassyynncc__wwrriittee (storage_index_t storage, peer_request const& r │ │ │ │ │ , char const* buf, std::shared_ptr o │ │ │ │ │ , std::function handler │ │ │ │ │ , disk_job_flags_t flags = {}) = 0; │ │ │ │ │ - virtual void aassyynncc__rreeaadd (storage_index_t storage, peer_request const& r │ │ │ │ │ - , std::function handler │ │ │ │ │ - , disk_job_flags_t flags = {}) = 0; │ │ │ │ │ virtual void aassyynncc__hhaasshh (storage_index_t storage, piece_index_t piece, │ │ │ │ │ span v2 │ │ │ │ │ , disk_job_flags_t flags │ │ │ │ │ , std::function handler) = 0; │ │ │ │ │ virtual void aassyynncc__hhaasshh22 (storage_index_t storage, piece_index_t piece, int │ │ │ │ │ offset, disk_job_flags_t flags │ │ │ │ │ @@ -159,22 +523,22 @@ │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** rreemmoovvee__ttoorrrreenntt(()) ********** │ │ │ │ │ virtual void rreemmoovvee__ttoorrrreenntt (storage_index_t) = 0; │ │ │ │ │ remove the storage with the specified index. This is not expected to delete any │ │ │ │ │ files from disk, just to clean up any resources associated with the specified │ │ │ │ │ storage. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** aassyynncc__wwrriittee(()) aassyynncc__rreeaadd(()) ********** │ │ │ │ │ +********** aassyynncc__rreeaadd(()) aassyynncc__wwrriittee(()) ********** │ │ │ │ │ +virtual void aassyynncc__rreeaadd (storage_index_t storage, peer_request const& r │ │ │ │ │ + , std::function handler │ │ │ │ │ + , disk_job_flags_t flags = {}) = 0; │ │ │ │ │ virtual bool aassyynncc__wwrriittee (storage_index_t storage, peer_request const& r │ │ │ │ │ , char const* buf, std::shared_ptr o │ │ │ │ │ , std::function handler │ │ │ │ │ , disk_job_flags_t flags = {}) = 0; │ │ │ │ │ -virtual void aassyynncc__rreeaadd (storage_index_t storage, peer_request const& r │ │ │ │ │ - , std::function handler │ │ │ │ │ - , disk_job_flags_t flags = {}) = 0; │ │ │ │ │ perform a read or write operation from/to the specified storage index and the │ │ │ │ │ specified request. When the operation completes, call handler possibly with a │ │ │ │ │ _d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r, holding the buffer with the result. Flags may be set to │ │ │ │ │ affect the read operation. See disk_job_flags_t. │ │ │ │ │ The _d_i_s_k___o_b_s_e_r_v_e_r is a callback to indicate that the store buffer/disk write │ │ │ │ │ queue is below the watermark to let peers start writing buffers to disk again. │ │ │ │ │ When async_write() returns true, indicating the write queue is full, the peer │ │ │ │ │ @@ -373,110 +737,26 @@ │ │ │ │ │ void rreesseett (); │ │ │ │ │ ssttoorraaggee__hhoollddeerr (storage_holder const&) = delete; │ │ │ │ │ storage_holder& ooppeerraattoorr== (storage_holder const&) = delete; │ │ │ │ │ ssttoorraaggee__hhoollddeerr (storage_holder&& rhs) noexcept; │ │ │ │ │ storage_holder& ooppeerraattoorr== (storage_holder&& rhs) noexcept; │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ bbuuffffeerr__aallllooccaattoorr__iinntteerrffaaccee ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r_._h_p_p" │ │ │ │ │ -the interface for freeing disk buffers, used by the _d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r. when │ │ │ │ │ -implementing _d_i_s_k___i_n_t_e_r_f_a_c_e, this must also be implemented in order to return │ │ │ │ │ -disk buffers back to libtorrent │ │ │ │ │ -struct buffer_allocator_interface │ │ │ │ │ -{ │ │ │ │ │ - virtual void ffrreeee__ddiisskk__bbuuffffeerr (char* b) = 0; │ │ │ │ │ -}; │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ ddiisskk__bbuuffffeerr__hhoollddeerr ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_d_i_s_k___b_u_f_f_e_r___h_o_l_d_e_r_._h_p_p" │ │ │ │ │ -The disk buffer holder acts like a unique_ptr that frees a disk buffer when │ │ │ │ │ -it's destructed │ │ │ │ │ -If this buffer holder is moved-from, default constructed or reset, data() will │ │ │ │ │ -return nullptr. │ │ │ │ │ -struct disk_buffer_holder │ │ │ │ │ -{ │ │ │ │ │ - ddiisskk__bbuuffffeerr__hhoollddeerr (disk_buffer_holder&&) noexcept; │ │ │ │ │ - disk_buffer_holder& ooppeerraattoorr== (disk_buffer_holder&&) & noexcept; │ │ │ │ │ - disk_buffer_holder& ooppeerraattoorr== (disk_buffer_holder const&) = delete; │ │ │ │ │ - ddiisskk__bbuuffffeerr__hhoollddeerr (disk_buffer_holder const&) = delete; │ │ │ │ │ - ddiisskk__bbuuffffeerr__hhoollddeerr (buffer_allocator_interface& alloc │ │ │ │ │ - , char* buf, int sz) noexcept; │ │ │ │ │ - ddiisskk__bbuuffffeerr__hhoollddeerr () noexcept = default; │ │ │ │ │ - ~~ddiisskk__bbuuffffeerr__hhoollddeerr (); │ │ │ │ │ - char* ddaattaa () const noexcept; │ │ │ │ │ - void rreesseett (); │ │ │ │ │ - void sswwaapp (disk_buffer_holder& h) noexcept; │ │ │ │ │ - bool iiss__mmuuttaabbllee () const noexcept; │ │ │ │ │ - explicit operator bbooooll () const noexcept; │ │ │ │ │ - std::ptrdiff_t ssiizzee () const; │ │ │ │ │ -}; │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ddiisskk__bbuuffffeerr__hhoollddeerr(()) ********** │ │ │ │ │ -ddiisskk__bbuuffffeerr__hhoollddeerr (buffer_allocator_interface& alloc │ │ │ │ │ - , char* buf, int sz) noexcept; │ │ │ │ │ -construct a buffer holder that will free the held buffer using a disk buffer │ │ │ │ │ -pool directly (there's only one disk_buffer_pool per _s_e_s_s_i_o_n) │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ddiisskk__bbuuffffeerr__hhoollddeerr(()) ********** │ │ │ │ │ -ddiisskk__bbuuffffeerr__hhoollddeerr () noexcept = default; │ │ │ │ │ -default construct a holder that does not own any buffer │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ~~ddiisskk__bbuuffffeerr__hhoollddeerr(()) ********** │ │ │ │ │ -~~ddiisskk__bbuuffffeerr__hhoollddeerr (); │ │ │ │ │ -frees disk buffer held by this object │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ddaattaa(()) ********** │ │ │ │ │ -char* ddaattaa () const noexcept; │ │ │ │ │ -return a pointer to the held buffer, if any. Otherwise returns nullptr. │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** rreesseett(()) ********** │ │ │ │ │ -void rreesseett (); │ │ │ │ │ -free the held disk buffer, if any, and clear the holder. This sets the holder │ │ │ │ │ -object to a default-constructed state │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** sswwaapp(()) ********** │ │ │ │ │ -void sswwaapp (disk_buffer_holder& h) noexcept; │ │ │ │ │ -swap pointers of two disk buffer holders. │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** iiss__mmuuttaabbllee(()) ********** │ │ │ │ │ -bool iiss__mmuuttaabbllee () const noexcept; │ │ │ │ │ -if this returns true, the buffer may not be modified in place │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** bbooooll(()) ********** │ │ │ │ │ -explicit operator bbooooll () const noexcept; │ │ │ │ │ -implicitly convertible to true if the object is currently holding a buffer │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ddiisskk__oobbsseerrvveerr ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_d_i_s_k___o_b_s_e_r_v_e_r_._h_p_p" │ │ │ │ │ struct disk_observer │ │ │ │ │ { │ │ │ │ │ virtual void oonn__ddiisskk () = 0; │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** oonn__ddiisskk(()) ********** │ │ │ │ │ virtual void oonn__ddiisskk () = 0; │ │ │ │ │ called when the disk cache size has dropped below the low watermark again and │ │ │ │ │ we can resume downloading from peers │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ sseettttiinnggss__iinntteerrffaaccee ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_t_t_i_n_g_s___p_a_c_k_._h_p_p" │ │ │ │ │ -the common interface to _s_e_t_t_i_n_g_s___p_a_c_k and the internal representation of │ │ │ │ │ -settings. │ │ │ │ │ -struct settings_interface │ │ │ │ │ -{ │ │ │ │ │ - virtual bool hhaass__vvaall (int name) const = 0; │ │ │ │ │ - virtual void sseett__iinntt (int name, int val) = 0; │ │ │ │ │ - virtual void sseett__ssttrr (int name, std::string val) = 0; │ │ │ │ │ - virtual void sseett__bbooooll (int name, bool val) = 0; │ │ │ │ │ - virtual int ggeett__iinntt (int name) const = 0; │ │ │ │ │ - virtual std::string const& ggeett__ssttrr (int name) const = 0; │ │ │ │ │ - virtual bool ggeett__bbooooll (int name) const = 0; │ │ │ │ │ -}; │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ffiillee__ooppeenn__mmooddee__tt ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_d_i_s_k___i_n_t_e_r_f_a_c_e_._h_p_p" │ │ │ │ │ read_only │ │ │ │ │ open the file for reading only │ │ │ │ │ write_only │ │ │ │ │ open the file for writing only │ │ │ │ │ read_write │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-DHT.html │ │ │ │ @@ -47,16 +47,16 @@ │ │ │ │
  • get_mutable_item()
  • │ │ │ │
  • put_mutable_item()
  • │ │ │ │
  • get_infohashes_sample()
  • │ │ │ │
  • tick()
  • │ │ │ │
  • counters()
  • │ │ │ │ │ │ │ │ │ │ │ │ -
  • sign_mutable_item()
  • │ │ │ │ -
  • dht_default_storage_constructor()
  • │ │ │ │ +
  • dht_default_storage_constructor()
  • │ │ │ │ +
  • sign_mutable_item()
  • │ │ │ │
  • announce_flags_t
  • │ │ │ │ │ │ │ │
    │ │ │ │ [report issue]
    │ │ │ │

    dht_state

    │ │ │ │

    Declared in "libtorrent/kademlia/dht_state.hpp"

    │ │ │ │

    This structure helps to store and load the state │ │ │ │ @@ -308,16 +308,27 @@ │ │ │ │ [report issue]

    │ │ │ │
    │ │ │ │

    counters()

    │ │ │ │
    │ │ │ │  virtual dht_storage_counters counters () const = 0;
    │ │ │ │  
    │ │ │ │

    return stats counters for the store

    │ │ │ │ -[report issue]
    │ │ │ │ +[report issue] │ │ │ │ │ │ │ │ +
    │ │ │ │ +

    dht_default_storage_constructor()

    │ │ │ │ +

    Declared in "libtorrent/kademlia/dht_storage.hpp"

    │ │ │ │ +
    │ │ │ │ +std::unique_ptr<dht_storage_interface> dht_default_storage_constructor (
    │ │ │ │ +   settings_interface const& settings);
    │ │ │ │ +
    │ │ │ │ +

    constructor for the default DHT storage. The DHT storage is responsible │ │ │ │ +for maintaining peers and mutable and immutable items announced and │ │ │ │ +stored/put to the DHT node.

    │ │ │ │ +[report issue]
    │ │ │ │
    │ │ │ │

    sign_mutable_item()

    │ │ │ │

    Declared in "libtorrent/kademlia/item.hpp"

    │ │ │ │
    │ │ │ │  signature sign_mutable_item (
    │ │ │ │     span<char const> v
    │ │ │ │     , span<char const> salt
    │ │ │ │ @@ -327,25 +338,14 @@
    │ │ │ │  
    │ │ │ │

    given a byte range v and an optional byte range salt, a │ │ │ │ sequence number, public key pk (must be 32 bytes) and a secret key │ │ │ │ sk (must be 64 bytes), this function produces a signature which │ │ │ │ is written into a 64 byte buffer pointed to by sig. The caller │ │ │ │ is responsible for allocating the destination buffer that's passed in │ │ │ │ as the sig argument. Typically it would be allocated on the stack.

    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    dht_default_storage_constructor()

    │ │ │ │ -

    Declared in "libtorrent/kademlia/dht_storage.hpp"

    │ │ │ │ -
    │ │ │ │ -std::unique_ptr<dht_storage_interface> dht_default_storage_constructor (
    │ │ │ │ -   settings_interface const& settings);
    │ │ │ │ -
    │ │ │ │ -

    constructor for the default DHT storage. The DHT storage is responsible │ │ │ │ -for maintaining peers and mutable and immutable items announced and │ │ │ │ -stored/put to the DHT node.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    announce_flags_t

    │ │ │ │

    Declared in "libtorrent/kademlia/announce_flags.hpp"

    │ │ │ │
    │ │ │ │
    seed
    │ │ │ │
    announce to DHT as a seed
    │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -14,16 +14,16 @@ │ │ │ │ │ o _p_u_t___i_m_m_u_t_a_b_l_e___i_t_e_m_(_) │ │ │ │ │ o _g_e_t___m_u_t_a_b_l_e___i_t_e_m___s_e_q_(_) │ │ │ │ │ o _g_e_t___m_u_t_a_b_l_e___i_t_e_m_(_) │ │ │ │ │ o _p_u_t___m_u_t_a_b_l_e___i_t_e_m_(_) │ │ │ │ │ o _g_e_t___i_n_f_o_h_a_s_h_e_s___s_a_m_p_l_e_(_) │ │ │ │ │ o _t_i_c_k_(_) │ │ │ │ │ o _c_o_u_n_t_e_r_s_(_) │ │ │ │ │ - * _s_i_g_n___m_u_t_a_b_l_e___i_t_e_m_(_) │ │ │ │ │ * _d_h_t___d_e_f_a_u_l_t___s_t_o_r_a_g_e___c_o_n_s_t_r_u_c_t_o_r_(_) │ │ │ │ │ + * _s_i_g_n___m_u_t_a_b_l_e___i_t_e_m_(_) │ │ │ │ │ * _a_n_n_o_u_n_c_e___f_l_a_g_s___t │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ddhhtt__ssttaattee ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_k_a_d_e_m_l_i_a_/_d_h_t___s_t_a_t_e_._h_p_p" │ │ │ │ │ This structure helps to store and load the state of the dht_tracker. At this │ │ │ │ │ moment the library is only a dual stack implementation of the DHT. See _B_E_P_ _3_2 │ │ │ │ │ struct dht_state │ │ │ │ │ @@ -210,36 +210,36 @@ │ │ │ │ │ For implementers: Use this functions for expire peers or items or any other │ │ │ │ │ storage cleanup. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ccoouunntteerrss(()) ********** │ │ │ │ │ virtual dht_storage_counters ccoouunntteerrss () const = 0; │ │ │ │ │ return stats _c_o_u_n_t_e_r_s for the store │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +************ ddhhtt__ddeeffaauulltt__ssttoorraaggee__ccoonnssttrruuccttoorr(()) ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_k_a_d_e_m_l_i_a_/_d_h_t___s_t_o_r_a_g_e_._h_p_p" │ │ │ │ │ +std::unique_ptr ddhhtt__ddeeffaauulltt__ssttoorraaggee__ccoonnssttrruuccttoorr ( │ │ │ │ │ + settings_interface const& settings); │ │ │ │ │ +constructor for the default DHT storage. The DHT storage is responsible for │ │ │ │ │ +maintaining peers and mutable and immutable items announced and stored/put to │ │ │ │ │ +the DHT node. │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ssiiggnn__mmuuttaabbllee__iitteemm(()) ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_k_a_d_e_m_l_i_a_/_i_t_e_m_._h_p_p" │ │ │ │ │ signature ssiiggnn__mmuuttaabbllee__iitteemm ( │ │ │ │ │ span v │ │ │ │ │ , span salt │ │ │ │ │ , sequence_number seq │ │ │ │ │ , public_key const& pk │ │ │ │ │ , secret_key const& sk); │ │ │ │ │ given a byte range v and an optional byte range salt, a sequence number, public │ │ │ │ │ key pk (must be 32 bytes) and a secret key sk (must be 64 bytes), this function │ │ │ │ │ produces a signature which is written into a 64 byte buffer pointed to by sig. │ │ │ │ │ The caller is responsible for allocating the destination buffer that's passed │ │ │ │ │ in as the sig argument. Typically it would be allocated on the stack. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ ddhhtt__ddeeffaauulltt__ssttoorraaggee__ccoonnssttrruuccttoorr(()) ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_k_a_d_e_m_l_i_a_/_d_h_t___s_t_o_r_a_g_e_._h_p_p" │ │ │ │ │ -std::unique_ptr ddhhtt__ddeeffaauulltt__ssttoorraaggee__ccoonnssttrruuccttoorr ( │ │ │ │ │ - settings_interface const& settings); │ │ │ │ │ -constructor for the default DHT storage. The DHT storage is responsible for │ │ │ │ │ -maintaining peers and mutable and immutable items announced and stored/put to │ │ │ │ │ -the DHT node. │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ aannnnoouunnccee__ffllaaggss__tt ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_k_a_d_e_m_l_i_a_/_a_n_n_o_u_n_c_e___f_l_a_g_s_._h_p_p" │ │ │ │ │ seed │ │ │ │ │ announce to DHT as a seed │ │ │ │ │ implied_port │ │ │ │ │ announce to DHT with the implied-port flag set. This tells the network to │ │ │ │ │ use your source UDP port as your listen port, rather than the one │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Error_Codes.html │ │ │ │ @@ -33,44 +33,44 @@ │ │ │ │

    Table of contents

    │ │ │ │ │ │ │ │
    │ │ │ │ [report issue]
    │ │ │ │

    storage_error

    │ │ │ │

    Declared in "libtorrent/error_code.hpp"

    │ │ │ │

    used by storage to return errors │ │ │ │ also includes which underlying file the │ │ │ │ error happened on

    │ │ │ │
    │ │ │ │  struct storage_error
    │ │ │ │  {
    │ │ │ │     explicit operator bool () const;
    │ │ │ │ -   file_index_t file () const;
    │ │ │ │     void file (file_index_t f);
    │ │ │ │ +   file_index_t file () const;
    │ │ │ │  
    │ │ │ │     error_code ec;
    │ │ │ │     operation_t operation;
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ [report issue]
    │ │ │ │

    bool()

    │ │ │ │ @@ -79,31 +79,61 @@ │ │ │ │ │ │ │ │

    explicitly converts to true if this object represents an error, and │ │ │ │ false if it does not.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    file()

    │ │ │ │
    │ │ │ │ -file_index_t file () const;
    │ │ │ │  void file (file_index_t f);
    │ │ │ │ +file_index_t file () const;
    │ │ │ │  
    │ │ │ │

    set and query the index (in the torrent) of the file this error │ │ │ │ occurred on. This may also have special values defined in │ │ │ │ torrent_status.

    │ │ │ │ [report issue]
    │ │ │ │
    ec
    │ │ │ │
    the error that occurred
    │ │ │ │
    │ │ │ │ [report issue]
    │ │ │ │
    operation
    │ │ │ │
    A code from operation_t enum, indicating what │ │ │ │ kind of operation failed.
    │ │ │ │
    │ │ │ │ -[report issue]
    │ │ │ │ +[report issue]
    │ │ │ │ │ │ │ │ +
    │ │ │ │ +

    gzip_category()

    │ │ │ │ +

    Declared in "libtorrent/gzip.hpp"

    │ │ │ │ +
    │ │ │ │ +boost::system::error_category& gzip_category ();
    │ │ │ │ +
    │ │ │ │ +

    get the error_category for zip errors

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    upnp_category()

    │ │ │ │ +

    Declared in "libtorrent/upnp.hpp"

    │ │ │ │ +
    │ │ │ │ +boost::system::error_category& upnp_category ();
    │ │ │ │ +
    │ │ │ │ +

    the boost.system error category for UPnP errors

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    bdecode_category()

    │ │ │ │ +

    Declared in "libtorrent/bdecode.hpp"

    │ │ │ │ +
    │ │ │ │ +boost::system::error_category& bdecode_category ();
    │ │ │ │ +
    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    pcp_category()

    │ │ │ │ +

    Declared in "libtorrent/natpmp.hpp"

    │ │ │ │ +
    │ │ │ │ +boost::system::error_category& pcp_category ();
    │ │ │ │ +
    │ │ │ │ +[report issue]
    │ │ │ │
    │ │ │ │

    i2p_category()

    │ │ │ │

    Declared in "libtorrent/i2p_stream.hpp"

    │ │ │ │
    │ │ │ │  boost::system::error_category& i2p_category ();
    │ │ │ │  
    │ │ │ │

    returns the error category for I2P errors

    │ │ │ │ @@ -120,52 +150,309 @@ │ │ │ │
    │ │ │ │

    http_category()

    │ │ │ │

    Declared in "libtorrent/error_code.hpp"

    │ │ │ │
    │ │ │ │  boost::system::error_category& http_category ();
    │ │ │ │  
    │ │ │ │

    returns the error_category for HTTP errors

    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    bdecode_category()

    │ │ │ │ -

    Declared in "libtorrent/bdecode.hpp"

    │ │ │ │ -
    │ │ │ │ -boost::system::error_category& bdecode_category ();
    │ │ │ │ -
    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    socks_category()

    │ │ │ │

    Declared in "libtorrent/socks5_stream.hpp"

    │ │ │ │
    │ │ │ │  boost::system::error_category& socks_category ();
    │ │ │ │  
    │ │ │ │

    returns the error_category for SOCKS5 errors

    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    gzip_category()

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    enum error_code_enum

    │ │ │ │

    Declared in "libtorrent/gzip.hpp"

    │ │ │ │ -
    │ │ │ │ -boost::system::error_category& gzip_category ();
    │ │ │ │ -
    │ │ │ │ -

    get the error_category for zip errors

    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    pcp_category()

    │ │ │ │ -

    Declared in "libtorrent/natpmp.hpp"

    │ │ │ │ -
    │ │ │ │ -boost::system::error_category& pcp_category ();
    │ │ │ │ -
    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    upnp_category()

    │ │ │ │ + │ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    namevaluedescription
    no_error0Not an error
    invalid_gzip_header1the supplied gzip buffer has invalid header
    inflated_data_too_large2the gzip buffer would inflate to more bytes than the specified │ │ │ │ +maximum size, and was rejected.
    data_did_not_terminate3available inflate data did not terminate
    space_exhausted4output space exhausted before completing inflate
    invalid_block_type5invalid block type (type == 3)
    invalid_stored_block_length6stored block length did not match one's complement
    too_many_length_or_distance_codes7dynamic block code description: too many length or distance codes
    code_lengths_codes_incomplete8dynamic block code description: code lengths codes incomplete
    repeat_lengths_with_no_first_length9dynamic block code description: repeat lengths with no first length
    repeat_more_than_specified_lengths10dynamic block code description: repeat more than specified lengths
    invalid_literal_length_code_lengths11dynamic block code description: invalid literal/length code lengths
    invalid_distance_code_lengths12dynamic block code description: invalid distance code lengths
    invalid_literal_code_in_block13invalid literal/length or distance code in fixed or dynamic block
    distance_too_far_back_in_block14distance is too far back in fixed or dynamic block
    unknown_gzip_error15an unknown error occurred during gzip inflation
    error_code_max16the number of error codes
    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    enum error_code_enum

    │ │ │ │

    Declared in "libtorrent/upnp.hpp"

    │ │ │ │ -
    │ │ │ │ -boost::system::error_category& upnp_category ();
    │ │ │ │ -
    │ │ │ │ -

    the boost.system error category for UPnP errors

    │ │ │ │ + │ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    namevaluedescription
    no_error0No error
    invalid_argument402One of the arguments in the request is invalid
    action_failed501The request failed
    value_not_in_array714The specified value does not exist in the array
    source_ip_cannot_be_wildcarded715The source IP address cannot be wild-carded, but │ │ │ │ +must be fully specified
    external_port_cannot_be_wildcarded716The external port cannot be a wildcard, but must │ │ │ │ +be specified
    port_mapping_conflict718The port mapping entry specified conflicts with a │ │ │ │ +mapping assigned previously to another client
    internal_port_must_match_external724Internal and external port value must be the same
    only_permanent_leases_supported725The NAT implementation only supports permanent │ │ │ │ +lease times on port mappings
    remote_host_must_be_wildcard726RemoteHost must be a wildcard and cannot be a │ │ │ │ +specific IP address or DNS name
    external_port_must_be_wildcard727ExternalPort must be a wildcard and cannot be a │ │ │ │ +specific port
    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    enum error_code_enum

    │ │ │ │ +

    Declared in "libtorrent/bdecode.hpp"

    │ │ │ │ + │ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    namevaluedescription
    no_error0Not an error
    expected_digit1expected digit in bencoded string
    expected_colon2expected colon in bencoded string
    unexpected_eof3unexpected end of file in bencoded string
    expected_value4expected value (list, dict, int or string) in bencoded string
    depth_exceeded5bencoded recursion depth limit exceeded
    limit_exceeded6bencoded item count limit exceeded
    overflow7integer overflow
    error_code_max8the number of error codes
    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    enum pcp_errors

    │ │ │ │ +

    Declared in "libtorrent/natpmp.hpp"

    │ │ │ │ + │ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ +│ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +
    namevaluedescription
    pcp_success0 
    pcp_unsupp_version1 
    pcp_not_authorized2 
    pcp_malformed_request3 
    pcp_unsupp_opcode4 
    pcp_unsupp_option5 
    pcp_malformed_option6 
    pcp_network_failure7 
    pcp_no_resources8 
    pcp_unsupp_protocol9 
    pcp_user_ex_quota10 
    pcp_cannot_provide_external11 
    pcp_address_mismatch12 
    pcp_excessive_remote_peers13 
    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    enum i2p_error_code

    │ │ │ │

    Declared in "libtorrent/i2p_stream.hpp"

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -218,15 +505,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    num_errors9 
    │ │ │ │ [report issue]
    │ │ │ │ -
    │ │ │ │ +
    │ │ │ │

    enum error_code_enum

    │ │ │ │

    Declared in "libtorrent/error_code.hpp"

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1050,69 +1337,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    service_unavailable503 
    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    enum error_code_enum

    │ │ │ │ -

    Declared in "libtorrent/bdecode.hpp"

    │ │ │ │ - │ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    namevaluedescription
    no_error0Not an error
    expected_digit1expected digit in bencoded string
    expected_colon2expected colon in bencoded string
    unexpected_eof3unexpected end of file in bencoded string
    expected_value4expected value (list, dict, int or string) in bencoded string
    depth_exceeded5bencoded recursion depth limit exceeded
    limit_exceeded6bencoded item count limit exceeded
    overflow7integer overflow
    error_code_max8the number of error codes
    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    enum socks_error_code

    │ │ │ │

    Declared in "libtorrent/socks5_stream.hpp"

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -1168,246 +1400,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    num_errors10 
    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    enum error_code_enum

    │ │ │ │ -

    Declared in "libtorrent/gzip.hpp"

    │ │ │ │ - │ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    namevaluedescription
    no_error0Not an error
    invalid_gzip_header1the supplied gzip buffer has invalid header
    inflated_data_too_large2the gzip buffer would inflate to more bytes than the specified │ │ │ │ -maximum size, and was rejected.
    data_did_not_terminate3available inflate data did not terminate
    space_exhausted4output space exhausted before completing inflate
    invalid_block_type5invalid block type (type == 3)
    invalid_stored_block_length6stored block length did not match one's complement
    too_many_length_or_distance_codes7dynamic block code description: too many length or distance codes
    code_lengths_codes_incomplete8dynamic block code description: code lengths codes incomplete
    repeat_lengths_with_no_first_length9dynamic block code description: repeat lengths with no first length
    repeat_more_than_specified_lengths10dynamic block code description: repeat more than specified lengths
    invalid_literal_length_code_lengths11dynamic block code description: invalid literal/length code lengths
    invalid_distance_code_lengths12dynamic block code description: invalid distance code lengths
    invalid_literal_code_in_block13invalid literal/length or distance code in fixed or dynamic block
    distance_too_far_back_in_block14distance is too far back in fixed or dynamic block
    unknown_gzip_error15an unknown error occurred during gzip inflation
    error_code_max16the number of error codes
    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    enum pcp_errors

    │ │ │ │ -

    Declared in "libtorrent/natpmp.hpp"

    │ │ │ │ - │ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    namevaluedescription
    pcp_success0 
    pcp_unsupp_version1 
    pcp_not_authorized2 
    pcp_malformed_request3 
    pcp_unsupp_opcode4 
    pcp_unsupp_option5 
    pcp_malformed_option6 
    pcp_network_failure7 
    pcp_no_resources8 
    pcp_unsupp_protocol9 
    pcp_user_ex_quota10 
    pcp_cannot_provide_external11 
    pcp_address_mismatch12 
    pcp_excessive_remote_peers13 
    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    enum error_code_enum

    │ │ │ │ -

    Declared in "libtorrent/upnp.hpp"

    │ │ │ │ - │ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ -│ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ -
    namevaluedescription
    no_error0No error
    invalid_argument402One of the arguments in the request is invalid
    action_failed501The request failed
    value_not_in_array714The specified value does not exist in the array
    source_ip_cannot_be_wildcarded715The source IP address cannot be wild-carded, but │ │ │ │ -must be fully specified
    external_port_cannot_be_wildcarded716The external port cannot be a wildcard, but must │ │ │ │ -be specified
    port_mapping_conflict718The port mapping entry specified conflicts with a │ │ │ │ -mapping assigned previously to another client
    internal_port_must_match_external724Internal and external port value must be the same
    only_permanent_leases_supported725The NAT implementation only supports permanent │ │ │ │ -lease times on port mappings
    remote_host_must_be_wildcard726RemoteHost must be a wildcard and cannot be a │ │ │ │ -specific IP address or DNS name
    external_port_must_be_wildcard727ExternalPort must be a wildcard and cannot be a │ │ │ │ -specific port
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │

    bt_peer_connection_handle

    │ │ │ │ @@ -415,19 +415,19 @@ │ │ │ │

    Torrent plugins are associated with a single torrent and have a number │ │ │ │ of functions called at certain events. Many of its functions have the │ │ │ │ ability to change or override the default libtorrent behavior.

    │ │ │ │
    │ │ │ │  struct torrent_plugin
    │ │ │ │  {
    │ │ │ │     virtual std::shared_ptr<peer_plugin> new_connection (peer_connection_handle const&);
    │ │ │ │ -   virtual void on_piece_failed (piece_index_t);
    │ │ │ │     virtual void on_piece_pass (piece_index_t);
    │ │ │ │ +   virtual void on_piece_failed (piece_index_t);
    │ │ │ │     virtual void tick ();
    │ │ │ │ -   virtual bool on_resume ();
    │ │ │ │     virtual bool on_pause ();
    │ │ │ │ +   virtual bool on_resume ();
    │ │ │ │     virtual void on_files_checked ();
    │ │ │ │     virtual void on_state (torrent_status::state_t);
    │ │ │ │     virtual void on_add_peer (tcp::endpoint const&,
    │ │ │ │        peer_source_flags_t, add_peer_flags_t);
    │ │ │ │  
    │ │ │ │     static constexpr add_peer_flags_t first_time  = 1_bit;
    │ │ │ │     static constexpr add_peer_flags_t filtered  = 2_bit;
    │ │ │ │ @@ -446,21 +446,21 @@
    │ │ │ │  are supposed to return an instance of your peer_plugin class. Which in
    │ │ │ │  turn will have its hook functions called on event specific to that peer.

    │ │ │ │

    The peer_connection_handle will be valid as long as the shared_ptr │ │ │ │ is being held by the torrent object. So, it is generally a good idea to not │ │ │ │ keep a shared_ptr to your own peer_plugin. If you want to keep references │ │ │ │ to it, use weak_ptr.

    │ │ │ │

    If this function throws an exception, the connection will be closed.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    on_piece_pass() on_piece_failed()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    on_piece_failed() on_piece_pass()

    │ │ │ │
    │ │ │ │ -virtual void on_piece_failed (piece_index_t);
    │ │ │ │  virtual void on_piece_pass (piece_index_t);
    │ │ │ │ +virtual void on_piece_failed (piece_index_t);
    │ │ │ │  
    │ │ │ │

    These hooks are called when a piece passes the hash check or fails the hash │ │ │ │ check, respectively. The index is the piece index that was downloaded. │ │ │ │ It is possible to access the list of peers that participated in sending the │ │ │ │ piece through the torrent and the piece_picker.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │ @@ -471,16 +471,16 @@ │ │ │ │

    This hook is called approximately once per second. It is a way of making it │ │ │ │ easy for plugins to do timed events, for sending messages or whatever.

    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    on_resume() on_pause()

    │ │ │ │
    │ │ │ │ -virtual bool on_resume ();
    │ │ │ │  virtual bool on_pause ();
    │ │ │ │ +virtual bool on_resume ();
    │ │ │ │  
    │ │ │ │

    These hooks are called when the torrent is paused and resumed respectively. │ │ │ │ The return value indicates if the event was handled. A return value of │ │ │ │ true indicates that it was handled, and no other plugin after this one │ │ │ │ will have this hook function called, and the standard handler will also not be │ │ │ │ invoked. So, returning true effectively overrides the standard behavior of │ │ │ │ pause or resume.

    │ │ │ │ @@ -545,51 +545,51 @@ │ │ │ │ { │ │ │ │ virtual string_view type () const; │ │ │ │ virtual void add_handshake (entry&); │ │ │ │ virtual void on_disconnect (error_code const&); │ │ │ │ virtual void on_connected (); │ │ │ │ virtual bool on_handshake (span<char const>); │ │ │ │ virtual bool on_extension_handshake (bdecode_node const&); │ │ │ │ - virtual bool on_unchoke (); │ │ │ │ + virtual bool on_not_interested (); │ │ │ │ + virtual bool on_interested (); │ │ │ │ + virtual bool on_choke (); │ │ │ │ + virtual bool on_allowed_fast (piece_index_t); │ │ │ │ + virtual bool on_bitfield (bitfield const& /*bitfield*/); │ │ │ │ virtual bool on_have (piece_index_t); │ │ │ │ virtual bool on_request (peer_request const&); │ │ │ │ - virtual bool on_choke (); │ │ │ │ - virtual bool on_have_none (); │ │ │ │ - virtual bool on_interested (); │ │ │ │ virtual bool on_dont_have (piece_index_t); │ │ │ │ - virtual bool on_bitfield (bitfield const& /*bitfield*/); │ │ │ │ + virtual bool on_have_none (); │ │ │ │ + virtual bool on_unchoke (); │ │ │ │ virtual bool on_have_all (); │ │ │ │ - virtual bool on_allowed_fast (piece_index_t); │ │ │ │ - virtual bool on_not_interested (); │ │ │ │ virtual bool on_piece (peer_request const& /*piece*/ │ │ │ │ , span<char const> /*buf*/); │ │ │ │ - virtual bool on_suggest (piece_index_t); │ │ │ │ virtual bool on_reject (peer_request const&); │ │ │ │ virtual bool on_cancel (peer_request const&); │ │ │ │ - virtual void sent_suggest (piece_index_t); │ │ │ │ + virtual bool on_suggest (piece_index_t); │ │ │ │ + virtual void sent_choke (); │ │ │ │ virtual void sent_have_all (); │ │ │ │ + virtual void sent_have_none (); │ │ │ │ virtual void sent_allow_fast (piece_index_t); │ │ │ │ - virtual void sent_cancel (peer_request const&); │ │ │ │ - virtual void sent_choke (); │ │ │ │ - virtual void sent_reject_request (peer_request const&); │ │ │ │ + virtual void sent_suggest (piece_index_t); │ │ │ │ virtual void sent_request (peer_request const&); │ │ │ │ - virtual void sent_have_none (); │ │ │ │ + virtual void sent_reject_request (peer_request const&); │ │ │ │ + virtual void sent_cancel (peer_request const&); │ │ │ │ + virtual void sent_piece (peer_request const&); │ │ │ │ virtual void sent_not_interested (); │ │ │ │ - virtual void sent_unchoke (); │ │ │ │ virtual void sent_have (piece_index_t); │ │ │ │ - virtual void sent_piece (peer_request const&); │ │ │ │ virtual void sent_interested (); │ │ │ │ + virtual void sent_unchoke (); │ │ │ │ virtual void sent_payload (int /* bytes */); │ │ │ │ virtual bool can_disconnect (error_code const& /*ec*/); │ │ │ │ virtual bool on_extended (int /*length*/, int /*msg*/, │ │ │ │ span<char const> /*body*/); │ │ │ │ virtual bool on_unknown_message (int /*length*/, int /*msg*/, │ │ │ │ span<char const> /*body*/); │ │ │ │ - virtual void on_piece_failed (piece_index_t); │ │ │ │ virtual void on_piece_pass (piece_index_t); │ │ │ │ + virtual void on_piece_failed (piece_index_t); │ │ │ │ virtual void tick (); │ │ │ │ virtual bool write_request (peer_request const&); │ │ │ │ }; │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │

    type()

    │ │ │ │
    │ │ │ │ @@ -639,39 +639,39 @@
    │ │ │ │  virtual bool on_extension_handshake (bdecode_node const&);
    │ │ │ │  
    │ │ │ │

    called when the extension handshake from the other end is received │ │ │ │ if this returns false, it means that this extension isn't │ │ │ │ supported by this peer. It will result in this peer_plugin │ │ │ │ being removed from the peer_connection and destructed. │ │ │ │ this is not called for web seeds

    │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    on_interested() on_have_all() on_have_none() on_unchoke() on_bitfield() on_dont_have() on_choke() on_allowed_fast() on_not_interested() on_request() on_have()

    │ │ │ │ + │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    on_dont_have() on_choke() on_bitfield() on_not_interested() on_unchoke() on_allowed_fast() on_interested() on_request() on_have_none() on_have_all() on_have()

    │ │ │ │
    │ │ │ │ -virtual bool on_unchoke ();
    │ │ │ │ +virtual bool on_not_interested ();
    │ │ │ │ +virtual bool on_interested ();
    │ │ │ │ +virtual bool on_choke ();
    │ │ │ │ +virtual bool on_allowed_fast (piece_index_t);
    │ │ │ │ +virtual bool on_bitfield (bitfield const& /*bitfield*/);
    │ │ │ │  virtual bool on_have (piece_index_t);
    │ │ │ │  virtual bool on_request (peer_request const&);
    │ │ │ │ -virtual bool on_choke ();
    │ │ │ │ -virtual bool on_have_none ();
    │ │ │ │ -virtual bool on_interested ();
    │ │ │ │  virtual bool on_dont_have (piece_index_t);
    │ │ │ │ -virtual bool on_bitfield (bitfield const& /*bitfield*/);
    │ │ │ │ +virtual bool on_have_none ();
    │ │ │ │ +virtual bool on_unchoke ();
    │ │ │ │  virtual bool on_have_all ();
    │ │ │ │ -virtual bool on_allowed_fast (piece_index_t);
    │ │ │ │ -virtual bool on_not_interested ();
    │ │ │ │  
    │ │ │ │

    returning true from any of the message handlers │ │ │ │ indicates that the plugin has handled the message. │ │ │ │ it will break the plugin chain traversing and not let │ │ │ │ anyone else handle the message, including the default │ │ │ │ handler.

    │ │ │ │ [report issue]
    │ │ │ │ @@ -683,27 +683,27 @@ │ │ │ │ │ │ │ │

    This function is called when the peer connection is receiving │ │ │ │ a piece. buf points (non-owning pointer) to the data in an │ │ │ │ internal immutable disk buffer. The length of the data is specified │ │ │ │ in the length member of the piece parameter. │ │ │ │ returns true to indicate that the piece is handled and the │ │ │ │ rest of the logic should be ignored.

    │ │ │ │ - │ │ │ │ │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    sent_have() sent_unchoke() sent_piece() sent_interested() sent_not_interested()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    sent_unchoke() sent_not_interested() sent_piece() sent_have() sent_interested()

    │ │ │ │
    │ │ │ │ +virtual void sent_piece (peer_request const&);
    │ │ │ │  virtual void sent_not_interested ();
    │ │ │ │ -virtual void sent_unchoke ();
    │ │ │ │  virtual void sent_have (piece_index_t);
    │ │ │ │ -virtual void sent_piece (peer_request const&);
    │ │ │ │  virtual void sent_interested ();
    │ │ │ │ +virtual void sent_unchoke ();
    │ │ │ │  
    │ │ │ │

    called after a choke message has been sent to the peer

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    sent_payload()

    │ │ │ │
    │ │ │ │  virtual void sent_payload (int /* bytes */);
    │ │ │ │ @@ -739,21 +739,21 @@
    │ │ │ │  
    │ │ │ │

    on_unknown_message()

    │ │ │ │
    │ │ │ │  virtual bool on_unknown_message (int /*length*/, int /*msg*/,
    │ │ │ │        span<char const> /*body*/);
    │ │ │ │  
    │ │ │ │

    this is not called for web seeds

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    on_piece_pass() on_piece_failed()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    on_piece_failed() on_piece_pass()

    │ │ │ │
    │ │ │ │ -virtual void on_piece_failed (piece_index_t);
    │ │ │ │  virtual void on_piece_pass (piece_index_t);
    │ │ │ │ +virtual void on_piece_failed (piece_index_t);
    │ │ │ │  
    │ │ │ │

    called when a piece that this peer participated in either │ │ │ │ fails or passes the hash_check

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    tick()

    │ │ │ │
    │ │ │ │ @@ -773,16 +773,16 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │

    crypto_plugin

    │ │ │ │

    Declared in "libtorrent/extensions.hpp"

    │ │ │ │
    │ │ │ │  struct crypto_plugin
    │ │ │ │  {
    │ │ │ │ -   virtual void set_outgoing_key (span<char const> key) = 0;
    │ │ │ │     virtual void set_incoming_key (span<char const> key) = 0;
    │ │ │ │ +   virtual void set_outgoing_key (span<char const> key) = 0;
    │ │ │ │     encrypt (span<span<char>> /*send_vec*/) = 0;
    │ │ │ │     virtual std::tuple<int, int, int> decrypt (span<span<char>> /*receive_vec*/) = 0;
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ [report issue]
    │ │ │ │

    decrypt()

    │ │ │ │
    │ │ │ │ @@ -793,27 +793,26 @@
    │ │ │ │  (consume, produce, packet_size)

    │ │ │ │

    consume is set to the number of bytes which should be trimmed from the │ │ │ │ head of the buffers, default is 0

    │ │ │ │

    produce is set to the number of bytes of payload which are now ready to │ │ │ │ be sent to the upper layer. default is the number of bytes passed in receive_vec

    │ │ │ │

    packet_size is set to the minimum number of bytes which must be read to │ │ │ │ advance the next step of decryption. default is 0

    │ │ │ │ -[report issue]
    │ │ │ │ +[report issue]
    │ │ │ │
    │ │ │ │ -
    │ │ │ │ -

    create_ut_metadata_plugin()

    │ │ │ │ -

    Declared in "libtorrent/extensions/ut_metadata.hpp"

    │ │ │ │ +
    │ │ │ │ +

    create_ut_pex_plugin()

    │ │ │ │ +

    Declared in "libtorrent/extensions/ut_pex.hpp"

    │ │ │ │
    │ │ │ │ -std::shared_ptr<torrent_plugin> create_ut_metadata_plugin (torrent_handle const&, client_data_t);
    │ │ │ │ +std::shared_ptr<torrent_plugin> create_ut_pex_plugin (torrent_handle const&, client_data_t);
    │ │ │ │  
    │ │ │ │ -

    constructor function for the ut_metadata extension. The ut_metadata │ │ │ │ -extension allows peers to request the .torrent file (or more │ │ │ │ -specifically the info-dictionary of the .torrent file) from each │ │ │ │ -other. This is the main building block in making magnet links work. │ │ │ │ -This extension is enabled by default unless explicitly disabled in │ │ │ │ +

    constructor function for the ut_pex extension. The ut_pex │ │ │ │ +extension allows peers to gossip about their connections, allowing │ │ │ │ +the swarm stay well connected and peers aware of more peers in the │ │ │ │ +swarm. This extension is enabled by default unless explicitly disabled in │ │ │ │ the session constructor.

    │ │ │ │

    This can either be passed in the add_torrent_params::extensions field, or │ │ │ │ via torrent_handle::add_extension().

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    create_smart_ban_plugin()

    │ │ │ │

    Declared in "libtorrent/extensions/smart_ban.hpp"

    │ │ │ │ @@ -822,25 +821,26 @@ │ │ │ │ │ │ │ │

    constructor function for the smart ban extension. The extension keeps │ │ │ │ track of the data peers have sent us for failing pieces and once the │ │ │ │ piece completes and passes the hash check bans the peers that turned │ │ │ │ out to have sent corrupt data. │ │ │ │ This function can either be passed in the add_torrent_params::extensions │ │ │ │ field, or via torrent_handle::add_extension().

    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    create_ut_pex_plugin()

    │ │ │ │ -

    Declared in "libtorrent/extensions/ut_pex.hpp"

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    create_ut_metadata_plugin()

    │ │ │ │ +

    Declared in "libtorrent/extensions/ut_metadata.hpp"

    │ │ │ │
    │ │ │ │ -std::shared_ptr<torrent_plugin> create_ut_pex_plugin (torrent_handle const&, client_data_t);
    │ │ │ │ +std::shared_ptr<torrent_plugin> create_ut_metadata_plugin (torrent_handle const&, client_data_t);
    │ │ │ │  
    │ │ │ │ -

    constructor function for the ut_pex extension. The ut_pex │ │ │ │ -extension allows peers to gossip about their connections, allowing │ │ │ │ -the swarm stay well connected and peers aware of more peers in the │ │ │ │ -swarm. This extension is enabled by default unless explicitly disabled in │ │ │ │ +

    constructor function for the ut_metadata extension. The ut_metadata │ │ │ │ +extension allows peers to request the .torrent file (or more │ │ │ │ +specifically the info-dictionary of the .torrent file) from each │ │ │ │ +other. This is the main building block in making magnet links work. │ │ │ │ +This extension is enabled by default unless explicitly disabled in │ │ │ │ the session constructor.

    │ │ │ │

    This can either be passed in the add_torrent_params::extensions field, or │ │ │ │ via torrent_handle::add_extension().

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -17,45 +17,45 @@ │ │ │ │ │ o _o_n___a_l_e_r_t_(_) │ │ │ │ │ o _o_n___u_n_k_n_o_w_n___t_o_r_r_e_n_t_(_) │ │ │ │ │ o _o_n___t_i_c_k_(_) │ │ │ │ │ o _g_e_t___u_n_c_h_o_k_e___p_r_i_o_r_i_t_y_(_) │ │ │ │ │ o _l_o_a_d___s_t_a_t_e_(_) │ │ │ │ │ * _t_o_r_r_e_n_t___p_l_u_g_i_n │ │ │ │ │ o _n_e_w___c_o_n_n_e_c_t_i_o_n_(_) │ │ │ │ │ - o _o_n___p_i_e_c_e___p_a_s_s_(_)_ _o_n___p_i_e_c_e___f_a_i_l_e_d_(_) │ │ │ │ │ + o _o_n___p_i_e_c_e___f_a_i_l_e_d_(_)_ _o_n___p_i_e_c_e___p_a_s_s_(_) │ │ │ │ │ o _t_i_c_k_(_) │ │ │ │ │ o _o_n___r_e_s_u_m_e_(_)_ _o_n___p_a_u_s_e_(_) │ │ │ │ │ o _o_n___f_i_l_e_s___c_h_e_c_k_e_d_(_) │ │ │ │ │ o _o_n___s_t_a_t_e_(_) │ │ │ │ │ o _o_n___a_d_d___p_e_e_r_(_) │ │ │ │ │ * _p_e_e_r___p_l_u_g_i_n │ │ │ │ │ o _t_y_p_e_(_) │ │ │ │ │ o _a_d_d___h_a_n_d_s_h_a_k_e_(_) │ │ │ │ │ o _o_n___d_i_s_c_o_n_n_e_c_t_(_) │ │ │ │ │ o _o_n___c_o_n_n_e_c_t_e_d_(_) │ │ │ │ │ o _o_n___h_a_n_d_s_h_a_k_e_(_) │ │ │ │ │ o _o_n___e_x_t_e_n_s_i_o_n___h_a_n_d_s_h_a_k_e_(_) │ │ │ │ │ - o _o_n___i_n_t_e_r_e_s_t_e_d_(_)_ _o_n___h_a_v_e___a_l_l_(_)_ _o_n___h_a_v_e___n_o_n_e_(_)_ _o_n___u_n_c_h_o_k_e_(_) │ │ │ │ │ - _o_n___b_i_t_f_i_e_l_d_(_)_ _o_n___d_o_n_t___h_a_v_e_(_)_ _o_n___c_h_o_k_e_(_)_ _o_n___a_l_l_o_w_e_d___f_a_s_t_(_) │ │ │ │ │ - _o_n___n_o_t___i_n_t_e_r_e_s_t_e_d_(_)_ _o_n___r_e_q_u_e_s_t_(_)_ _o_n___h_a_v_e_(_) │ │ │ │ │ + o _o_n___d_o_n_t___h_a_v_e_(_)_ _o_n___c_h_o_k_e_(_)_ _o_n___b_i_t_f_i_e_l_d_(_)_ _o_n___n_o_t___i_n_t_e_r_e_s_t_e_d_(_) │ │ │ │ │ + _o_n___u_n_c_h_o_k_e_(_)_ _o_n___a_l_l_o_w_e_d___f_a_s_t_(_)_ _o_n___i_n_t_e_r_e_s_t_e_d_(_)_ _o_n___r_e_q_u_e_s_t_(_) │ │ │ │ │ + _o_n___h_a_v_e___n_o_n_e_(_)_ _o_n___h_a_v_e___a_l_l_(_)_ _o_n___h_a_v_e_(_) │ │ │ │ │ o _o_n___p_i_e_c_e_(_) │ │ │ │ │ - o _s_e_n_t___h_a_v_e_(_)_ _s_e_n_t___u_n_c_h_o_k_e_(_)_ _s_e_n_t___p_i_e_c_e_(_)_ _s_e_n_t___i_n_t_e_r_e_s_t_e_d_(_) │ │ │ │ │ - _s_e_n_t___n_o_t___i_n_t_e_r_e_s_t_e_d_(_) │ │ │ │ │ + o _s_e_n_t___u_n_c_h_o_k_e_(_)_ _s_e_n_t___n_o_t___i_n_t_e_r_e_s_t_e_d_(_)_ _s_e_n_t___p_i_e_c_e_(_)_ _s_e_n_t___h_a_v_e_(_) │ │ │ │ │ + _s_e_n_t___i_n_t_e_r_e_s_t_e_d_(_) │ │ │ │ │ o _s_e_n_t___p_a_y_l_o_a_d_(_) │ │ │ │ │ o _c_a_n___d_i_s_c_o_n_n_e_c_t_(_) │ │ │ │ │ o _o_n___e_x_t_e_n_d_e_d_(_) │ │ │ │ │ o _o_n___u_n_k_n_o_w_n___m_e_s_s_a_g_e_(_) │ │ │ │ │ - o _o_n___p_i_e_c_e___p_a_s_s_(_)_ _o_n___p_i_e_c_e___f_a_i_l_e_d_(_) │ │ │ │ │ + o _o_n___p_i_e_c_e___f_a_i_l_e_d_(_)_ _o_n___p_i_e_c_e___p_a_s_s_(_) │ │ │ │ │ o _t_i_c_k_(_) │ │ │ │ │ o _w_r_i_t_e___r_e_q_u_e_s_t_(_) │ │ │ │ │ * _c_r_y_p_t_o___p_l_u_g_i_n │ │ │ │ │ o _d_e_c_r_y_p_t_(_) │ │ │ │ │ - * _c_r_e_a_t_e___u_t___m_e_t_a_d_a_t_a___p_l_u_g_i_n_(_) │ │ │ │ │ - * _c_r_e_a_t_e___s_m_a_r_t___b_a_n___p_l_u_g_i_n_(_) │ │ │ │ │ * _c_r_e_a_t_e___u_t___p_e_x___p_l_u_g_i_n_(_) │ │ │ │ │ + * _c_r_e_a_t_e___s_m_a_r_t___b_a_n___p_l_u_g_i_n_(_) │ │ │ │ │ + * _c_r_e_a_t_e___u_t___m_e_t_a_d_a_t_a___p_l_u_g_i_n_(_) │ │ │ │ │ libtorrent has a _p_l_u_g_i_n interface for implementing extensions to the protocol. │ │ │ │ │ These can be general extensions for transferring metadata or peer exchange │ │ │ │ │ extensions, or it could be used to provide a way to customize the protocol to │ │ │ │ │ fit a particular (closed) network. │ │ │ │ │ In short, the _p_l_u_g_i_n interface makes it possible to: │ │ │ │ │ * register extension messages (sent in the extension handshake), see │ │ │ │ │ _e_x_t_e_n_s_i_o_n_s. │ │ │ │ │ @@ -144,46 +144,46 @@ │ │ │ │ │ { │ │ │ │ │ explicit ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee (std::weak_ptr impl); │ │ │ │ │ connection_type ttyyppee () const; │ │ │ │ │ void aadddd__eexxtteennssiioonn (std::shared_ptr); │ │ │ │ │ peer_plugin const* ffiinndd__pplluuggiinn (string_view type) const; │ │ │ │ │ bool iiss__sseeeedd () const; │ │ │ │ │ bool uuppllooaadd__oonnllyy () const; │ │ │ │ │ - peer_id const& ppiidd () const; │ │ │ │ │ bool hhaass__ppiieeccee (piece_index_t i) const; │ │ │ │ │ - bool iiss__cchhookkeedd () const; │ │ │ │ │ + peer_id const& ppiidd () const; │ │ │ │ │ bool iiss__iinntteerreessttiinngg () const; │ │ │ │ │ - bool hhaass__ppeeeerr__cchhookkeedd () const; │ │ │ │ │ + bool iiss__cchhookkeedd () const; │ │ │ │ │ bool iiss__ppeeeerr__iinntteerreesstteedd () const; │ │ │ │ │ + bool hhaass__ppeeeerr__cchhookkeedd () const; │ │ │ │ │ void cchhookkee__tthhiiss__ppeeeerr (); │ │ │ │ │ void mmaayybbee__uunncchhookkee__tthhiiss__ppeeeerr (); │ │ │ │ │ void ggeett__ppeeeerr__iinnffoo (peer_info& p) const; │ │ │ │ │ torrent_handle aassssoocciiaatteedd__ttoorrrreenntt () const; │ │ │ │ │ - _t_c_p_:_:_e_n_d_p_o_i_n_t llooccaall__eennddppooiinntt () const; │ │ │ │ │ _t_c_p_:_:_e_n_d_p_o_i_n_t const& rreemmoottee () const; │ │ │ │ │ - bool iiss__ddiissccoonnnneeccttiinngg () const; │ │ │ │ │ + _t_c_p_:_:_e_n_d_p_o_i_n_t llooccaall__eennddppooiinntt () const; │ │ │ │ │ void ddiissccoonnnneecctt (error_code const& ec, operation_t op │ │ │ │ │ , disconnect_severity_t = peer_connection_interface::normal); │ │ │ │ │ + bool iiss__ddiissccoonnnneeccttiinngg () const; │ │ │ │ │ bool iiss__oouuttggooiinngg () const; │ │ │ │ │ bool iiss__ccoonnnneeccttiinngg () const; │ │ │ │ │ - bool iiggnnoorree__uunncchhookkee__sslloottss () const; │ │ │ │ │ bool oonn__llooccaall__nneettwwoorrkk () const; │ │ │ │ │ + bool iiggnnoorree__uunncchhookkee__sslloottss () const; │ │ │ │ │ bool ffaaiilleedd () const; │ │ │ │ │ - bool sshhoouulldd__lloogg (peer_log_alert::direction_t direction) const; │ │ │ │ │ void ppeeeerr__lloogg (peer_log_alert::direction_t direction │ │ │ │ │ , char const* event, char const* fmt = "", ...) const TORRENT_FORMAT │ │ │ │ │ (4,5); │ │ │ │ │ + bool sshhoouulldd__lloogg (peer_log_alert::direction_t direction) const; │ │ │ │ │ bool ccaann__ddiissccoonnnneecctt (error_code const& ec) const; │ │ │ │ │ bool hhaass__mmeettaaddaattaa () const; │ │ │ │ │ bool iinn__hhaannddsshhaakkee () const; │ │ │ │ │ void sseenndd__bbuuffffeerr (char const* begin, int size); │ │ │ │ │ time_point ttiimmee__ooff__llaasstt__uunncchhookkee () const; │ │ │ │ │ std::time_t llaasstt__sseeeenn__ccoommpplleettee () const; │ │ │ │ │ - bool ooppeerraattoorr!!== (peer_connection_handle const& o) const; │ │ │ │ │ bool ooppeerraattoorr<< (peer_connection_handle const& o) const; │ │ │ │ │ + bool ooppeerraattoorr!!== (peer_connection_handle const& o) const; │ │ │ │ │ bool ooppeerraattoorr==== (peer_connection_handle const& o) const; │ │ │ │ │ std::shared_ptr nnaattiivvee__hhaannddllee () const; │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ bbtt__ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e_._h_p_p" │ │ │ │ │ The _b_t___p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e provides a handle to the internal bittorrent peer │ │ │ │ │ @@ -321,19 +321,19 @@ │ │ │ │ │ Torrent plugins are associated with a single torrent and have a number of │ │ │ │ │ functions called at certain events. Many of its functions have the ability to │ │ │ │ │ change or override the default libtorrent behavior. │ │ │ │ │ struct torrent_plugin │ │ │ │ │ { │ │ │ │ │ virtual std::shared_ptr nneeww__ccoonnnneeccttiioonn (peer_connection_handle │ │ │ │ │ const&); │ │ │ │ │ - virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ │ virtual void oonn__ppiieeccee__ppaassss (piece_index_t); │ │ │ │ │ + virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ │ virtual void ttiicckk (); │ │ │ │ │ - virtual bool oonn__rreessuummee (); │ │ │ │ │ virtual bool oonn__ppaauussee (); │ │ │ │ │ + virtual bool oonn__rreessuummee (); │ │ │ │ │ virtual void oonn__ffiilleess__cchheecckkeedd (); │ │ │ │ │ virtual void oonn__ssttaattee (torrent_status::state_t); │ │ │ │ │ virtual void oonn__aadddd__ppeeeerr (tcp::endpoint const&, │ │ │ │ │ peer_source_flags_t, add_peer_flags_t); │ │ │ │ │ │ │ │ │ │ static constexpr add_peer_flags_t ffiirrsstt__ttiimmee = 1_bit; │ │ │ │ │ static constexpr add_peer_flags_t ffiilltteerreedd = 2_bit; │ │ │ │ │ @@ -350,30 +350,30 @@ │ │ │ │ │ have its hook functions called on event specific to that peer. │ │ │ │ │ The peer_connection_handle will be valid as long as the shared_ptr is being │ │ │ │ │ held by the torrent object. So, it is generally a good idea to not keep a │ │ │ │ │ shared_ptr to your own _p_e_e_r___p_l_u_g_i_n. If you want to keep references to it, use │ │ │ │ │ weak_ptr. │ │ │ │ │ If this function throws an exception, the connection will be closed. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** oonn__ppiieeccee__ppaassss(()) oonn__ppiieeccee__ffaaiilleedd(()) ********** │ │ │ │ │ -virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ │ +********** oonn__ppiieeccee__ffaaiilleedd(()) oonn__ppiieeccee__ppaassss(()) ********** │ │ │ │ │ virtual void oonn__ppiieeccee__ppaassss (piece_index_t); │ │ │ │ │ +virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ │ These hooks are called when a piece passes the hash check or fails the hash │ │ │ │ │ check, respectively. The index is the piece index that was downloaded. It is │ │ │ │ │ possible to access the list of peers that participated in sending the piece │ │ │ │ │ through the torrent and the piece_picker. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ttiicckk(()) ********** │ │ │ │ │ virtual void ttiicckk (); │ │ │ │ │ This hook is called approximately once per second. It is a way of making it │ │ │ │ │ easy for plugins to do timed events, for sending messages or whatever. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** oonn__rreessuummee(()) oonn__ppaauussee(()) ********** │ │ │ │ │ -virtual bool oonn__rreessuummee (); │ │ │ │ │ virtual bool oonn__ppaauussee (); │ │ │ │ │ +virtual bool oonn__rreessuummee (); │ │ │ │ │ These hooks are called when the torrent is paused and resumed respectively. The │ │ │ │ │ return value indicates if the event was handled. A return value of true │ │ │ │ │ indicates that it was handled, and no other _p_l_u_g_i_n after this one will have │ │ │ │ │ this hook function called, and the standard handler will also not be invoked. │ │ │ │ │ So, returning true effectively overrides the standard behavior of pause or │ │ │ │ │ resume. │ │ │ │ │ Note that if you call pause() or resume() on the torrent from your handler it │ │ │ │ │ @@ -419,51 +419,51 @@ │ │ │ │ │ { │ │ │ │ │ virtual string_view ttyyppee () const; │ │ │ │ │ virtual void aadddd__hhaannddsshhaakkee (entry&); │ │ │ │ │ virtual void oonn__ddiissccoonnnneecctt (error_code const&); │ │ │ │ │ virtual void oonn__ccoonnnneecctteedd (); │ │ │ │ │ virtual bool oonn__hhaannddsshhaakkee (span); │ │ │ │ │ virtual bool oonn__eexxtteennssiioonn__hhaannddsshhaakkee (bdecode_node const&); │ │ │ │ │ - virtual bool oonn__uunncchhookkee (); │ │ │ │ │ + virtual bool oonn__nnoott__iinntteerreesstteedd (); │ │ │ │ │ + virtual bool oonn__iinntteerreesstteedd (); │ │ │ │ │ + virtual bool oonn__cchhookkee (); │ │ │ │ │ + virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t); │ │ │ │ │ + virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//); │ │ │ │ │ virtual bool oonn__hhaavvee (piece_index_t); │ │ │ │ │ virtual bool oonn__rreeqquueesstt (peer_request const&); │ │ │ │ │ - virtual bool oonn__cchhookkee (); │ │ │ │ │ - virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ │ - virtual bool oonn__iinntteerreesstteedd (); │ │ │ │ │ virtual bool oonn__ddoonntt__hhaavvee (piece_index_t); │ │ │ │ │ - virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//); │ │ │ │ │ + virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ │ + virtual bool oonn__uunncchhookkee (); │ │ │ │ │ virtual bool oonn__hhaavvee__aallll (); │ │ │ │ │ - virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t); │ │ │ │ │ - virtual bool oonn__nnoott__iinntteerreesstteedd (); │ │ │ │ │ virtual bool oonn__ppiieeccee (peer_request const& //**ppiieeccee**// │ │ │ │ │ , span //**bbuuff**//); │ │ │ │ │ - virtual bool oonn__ssuuggggeesstt (piece_index_t); │ │ │ │ │ virtual bool oonn__rreejjeecctt (peer_request const&); │ │ │ │ │ virtual bool oonn__ccaanncceell (peer_request const&); │ │ │ │ │ - virtual void sseenntt__ssuuggggeesstt (piece_index_t); │ │ │ │ │ + virtual bool oonn__ssuuggggeesstt (piece_index_t); │ │ │ │ │ + virtual void sseenntt__cchhookkee (); │ │ │ │ │ virtual void sseenntt__hhaavvee__aallll (); │ │ │ │ │ + virtual void sseenntt__hhaavvee__nnoonnee (); │ │ │ │ │ virtual void sseenntt__aallllooww__ffaasstt (piece_index_t); │ │ │ │ │ - virtual void sseenntt__ccaanncceell (peer_request const&); │ │ │ │ │ - virtual void sseenntt__cchhookkee (); │ │ │ │ │ - virtual void sseenntt__rreejjeecctt__rreeqquueesstt (peer_request const&); │ │ │ │ │ + virtual void sseenntt__ssuuggggeesstt (piece_index_t); │ │ │ │ │ virtual void sseenntt__rreeqquueesstt (peer_request const&); │ │ │ │ │ - virtual void sseenntt__hhaavvee__nnoonnee (); │ │ │ │ │ + virtual void sseenntt__rreejjeecctt__rreeqquueesstt (peer_request const&); │ │ │ │ │ + virtual void sseenntt__ccaanncceell (peer_request const&); │ │ │ │ │ + virtual void sseenntt__ppiieeccee (peer_request const&); │ │ │ │ │ virtual void sseenntt__nnoott__iinntteerreesstteedd (); │ │ │ │ │ - virtual void sseenntt__uunncchhookkee (); │ │ │ │ │ virtual void sseenntt__hhaavvee (piece_index_t); │ │ │ │ │ - virtual void sseenntt__ppiieeccee (peer_request const&); │ │ │ │ │ virtual void sseenntt__iinntteerreesstteedd (); │ │ │ │ │ + virtual void sseenntt__uunncchhookkee (); │ │ │ │ │ virtual void sseenntt__ppaayyllooaadd (int //** bbyytteess **//); │ │ │ │ │ virtual bool ccaann__ddiissccoonnnneecctt (error_code const& //**eecc**//); │ │ │ │ │ virtual bool oonn__eexxtteennddeedd (int //**lleennggtthh**//, int //**mmssgg**//, │ │ │ │ │ span //**bbooddyy**//); │ │ │ │ │ virtual bool oonn__uunnkknnoowwnn__mmeessssaaggee (int //**lleennggtthh**//, int //**mmssgg**//, │ │ │ │ │ span //**bbooddyy**//); │ │ │ │ │ - virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ │ virtual void oonn__ppiieeccee__ppaassss (piece_index_t); │ │ │ │ │ + virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ │ virtual void ttiicckk (); │ │ │ │ │ virtual bool wwrriittee__rreeqquueesstt (peer_request const&); │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ttyyppee(()) ********** │ │ │ │ │ virtual string_view ttyyppee () const; │ │ │ │ │ This function is expected to return the name of the _p_l_u_g_i_n. │ │ │ │ │ @@ -491,48 +491,48 @@ │ │ │ │ │ ********** oonn__eexxtteennssiioonn__hhaannddsshhaakkee(()) ********** │ │ │ │ │ virtual bool oonn__eexxtteennssiioonn__hhaannddsshhaakkee (bdecode_node const&); │ │ │ │ │ called when the extension handshake from the other end is received if this │ │ │ │ │ returns false, it means that this extension isn't supported by this peer. It │ │ │ │ │ will result in this _p_e_e_r___p_l_u_g_i_n being removed from the peer_connection and │ │ │ │ │ destructed. this is not called for web seeds │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** oonn__iinntteerreesstteedd(()) oonn__hhaavvee__aallll(()) oonn__hhaavvee__nnoonnee(()) oonn__uunncchhookkee(()) oonn__bbiittffiieelldd(()) │ │ │ │ │ -oonn__ddoonntt__hhaavvee(()) oonn__cchhookkee(()) oonn__aalllloowweedd__ffaasstt(()) oonn__nnoott__iinntteerreesstteedd(()) oonn__rreeqquueesstt(()) │ │ │ │ │ +********** oonn__ddoonntt__hhaavvee(()) oonn__cchhookkee(()) oonn__bbiittffiieelldd(()) oonn__nnoott__iinntteerreesstteedd(()) oonn__uunncchhookkee(()) │ │ │ │ │ +oonn__aalllloowweedd__ffaasstt(()) oonn__iinntteerreesstteedd(()) oonn__rreeqquueesstt(()) oonn__hhaavvee__nnoonnee(()) oonn__hhaavvee__aallll(()) │ │ │ │ │ oonn__hhaavvee(()) ********** │ │ │ │ │ -virtual bool oonn__uunncchhookkee (); │ │ │ │ │ +virtual bool oonn__nnoott__iinntteerreesstteedd (); │ │ │ │ │ +virtual bool oonn__iinntteerreesstteedd (); │ │ │ │ │ +virtual bool oonn__cchhookkee (); │ │ │ │ │ +virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t); │ │ │ │ │ +virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//); │ │ │ │ │ virtual bool oonn__hhaavvee (piece_index_t); │ │ │ │ │ virtual bool oonn__rreeqquueesstt (peer_request const&); │ │ │ │ │ -virtual bool oonn__cchhookkee (); │ │ │ │ │ -virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ │ -virtual bool oonn__iinntteerreesstteedd (); │ │ │ │ │ virtual bool oonn__ddoonntt__hhaavvee (piece_index_t); │ │ │ │ │ -virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//); │ │ │ │ │ +virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ │ +virtual bool oonn__uunncchhookkee (); │ │ │ │ │ virtual bool oonn__hhaavvee__aallll (); │ │ │ │ │ -virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t); │ │ │ │ │ -virtual bool oonn__nnoott__iinntteerreesstteedd (); │ │ │ │ │ returning true from any of the message handlers indicates that the _p_l_u_g_i_n has │ │ │ │ │ handled the message. it will break the _p_l_u_g_i_n chain traversing and not let │ │ │ │ │ anyone else handle the message, including the default handler. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** oonn__ppiieeccee(()) ********** │ │ │ │ │ virtual bool oonn__ppiieeccee (peer_request const& //**ppiieeccee**// │ │ │ │ │ , span //**bbuuff**//); │ │ │ │ │ This function is called when the peer connection is receiving a piece. buf │ │ │ │ │ points (non-owning pointer) to the data in an internal immutable disk buffer. │ │ │ │ │ The length of the data is specified in the length member of the piece │ │ │ │ │ parameter. returns true to indicate that the piece is handled and the rest of │ │ │ │ │ the logic should be ignored. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** sseenntt__hhaavvee(()) sseenntt__uunncchhookkee(()) sseenntt__ppiieeccee(()) sseenntt__iinntteerreesstteedd(()) │ │ │ │ │ -sseenntt__nnoott__iinntteerreesstteedd(()) ********** │ │ │ │ │ +********** sseenntt__uunncchhookkee(()) sseenntt__nnoott__iinntteerreesstteedd(()) sseenntt__ppiieeccee(()) sseenntt__hhaavvee(()) │ │ │ │ │ +sseenntt__iinntteerreesstteedd(()) ********** │ │ │ │ │ +virtual void sseenntt__ppiieeccee (peer_request const&); │ │ │ │ │ virtual void sseenntt__nnoott__iinntteerreesstteedd (); │ │ │ │ │ -virtual void sseenntt__uunncchhookkee (); │ │ │ │ │ virtual void sseenntt__hhaavvee (piece_index_t); │ │ │ │ │ -virtual void sseenntt__ppiieeccee (peer_request const&); │ │ │ │ │ virtual void sseenntt__iinntteerreesstteedd (); │ │ │ │ │ +virtual void sseenntt__uunncchhookkee (); │ │ │ │ │ called after a choke message has been sent to the peer │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sseenntt__ppaayyllooaadd(()) ********** │ │ │ │ │ virtual void sseenntt__ppaayyllooaadd (int //** bbyytteess **//); │ │ │ │ │ called after piece data has been sent to the peer this can be used for stats │ │ │ │ │ book keeping │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ @@ -555,17 +555,17 @@ │ │ │ │ │ receiving large messages. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** oonn__uunnkknnoowwnn__mmeessssaaggee(()) ********** │ │ │ │ │ virtual bool oonn__uunnkknnoowwnn__mmeessssaaggee (int //**lleennggtthh**//, int //**mmssgg**//, │ │ │ │ │ span //**bbooddyy**//); │ │ │ │ │ this is not called for web seeds │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** oonn__ppiieeccee__ppaassss(()) oonn__ppiieeccee__ffaaiilleedd(()) ********** │ │ │ │ │ -virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ │ +********** oonn__ppiieeccee__ffaaiilleedd(()) oonn__ppiieeccee__ppaassss(()) ********** │ │ │ │ │ virtual void oonn__ppiieeccee__ppaassss (piece_index_t); │ │ │ │ │ +virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ │ called when a piece that this peer participated in either fails or passes the │ │ │ │ │ hash_check │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ttiicckk(()) ********** │ │ │ │ │ virtual void ttiicckk (); │ │ │ │ │ called approximately once every second │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ @@ -575,16 +575,16 @@ │ │ │ │ │ original request message won't be sent and no other _p_l_u_g_i_n will have this │ │ │ │ │ function called. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ccrryyppttoo__pplluuggiinn ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_._h_p_p" │ │ │ │ │ struct crypto_plugin │ │ │ │ │ { │ │ │ │ │ - virtual void sseett__oouuttggooiinngg__kkeeyy (span key) = 0; │ │ │ │ │ virtual void sseett__iinnccoommiinngg__kkeeyy (span key) = 0; │ │ │ │ │ + virtual void sseett__oouuttggooiinngg__kkeeyy (span key) = 0; │ │ │ │ │ eennccrryypptt (span> //**sseenndd__vveecc**//) = 0; │ │ │ │ │ virtual std::tuple ddeeccrryypptt (span> //**rreecceeiivvee__vveecc**// │ │ │ │ │ ) = 0; │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ddeeccrryypptt(()) ********** │ │ │ │ │ virtual std::tuple ddeeccrryypptt (span> //**rreecceeiivvee__vveecc**//) = │ │ │ │ │ @@ -594,44 +594,44 @@ │ │ │ │ │ consume is set to the number of bytes which should be trimmed from the head of │ │ │ │ │ the buffers, default is 0 │ │ │ │ │ produce is set to the number of bytes of payload which are now ready to be sent │ │ │ │ │ to the upper layer. default is the number of bytes passed in receive_vec │ │ │ │ │ packet_size is set to the minimum number of bytes which must be read to advance │ │ │ │ │ the next step of decryption. default is 0 │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ ccrreeaattee__uutt__mmeettaaddaattaa__pplluuggiinn(()) ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_/_u_t___m_e_t_a_d_a_t_a_._h_p_p" │ │ │ │ │ -std::shared_ptr ccrreeaattee__uutt__mmeettaaddaattaa__pplluuggiinn (torrent_handle │ │ │ │ │ -const&, client_data_t); │ │ │ │ │ -constructor function for the ut_metadata extension. The ut_metadata extension │ │ │ │ │ -allows peers to request the .torrent file (or more specifically the info- │ │ │ │ │ -dictionary of the .torrent file) from each other. This is the main building │ │ │ │ │ -block in making magnet links work. This extension is enabled by default unless │ │ │ │ │ -explicitly disabled in the _s_e_s_s_i_o_n constructor. │ │ │ │ │ +************ ccrreeaattee__uutt__ppeexx__pplluuggiinn(()) ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_/_u_t___p_e_x_._h_p_p" │ │ │ │ │ +std::shared_ptr ccrreeaattee__uutt__ppeexx__pplluuggiinn (torrent_handle const&, │ │ │ │ │ +client_data_t); │ │ │ │ │ +constructor function for the ut_pex extension. The ut_pex extension allows │ │ │ │ │ +peers to gossip about their connections, allowing the swarm stay well connected │ │ │ │ │ +and peers aware of more peers in the swarm. This extension is enabled by │ │ │ │ │ +default unless explicitly disabled in the _s_e_s_s_i_o_n constructor. │ │ │ │ │ This can either be passed in the add_torrent_params::extensions field, or via │ │ │ │ │ _t_o_r_r_e_n_t___h_a_n_d_l_e_:_:_a_d_d___e_x_t_e_n_s_i_o_n_(_). │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ccrreeaattee__ssmmaarrtt__bbaann__pplluuggiinn(()) ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_/_s_m_a_r_t___b_a_n_._h_p_p" │ │ │ │ │ std::shared_ptr ccrreeaattee__ssmmaarrtt__bbaann__pplluuggiinn (torrent_handle const&, │ │ │ │ │ client_data_t); │ │ │ │ │ constructor function for the smart ban extension. The extension keeps track of │ │ │ │ │ the data peers have sent us for failing pieces and once the piece completes and │ │ │ │ │ passes the hash check bans the peers that turned out to have sent corrupt data. │ │ │ │ │ This function can either be passed in the add_torrent_params::extensions field, │ │ │ │ │ or via _t_o_r_r_e_n_t___h_a_n_d_l_e_:_:_a_d_d___e_x_t_e_n_s_i_o_n_(_). │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ ccrreeaattee__uutt__ppeexx__pplluuggiinn(()) ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_/_u_t___p_e_x_._h_p_p" │ │ │ │ │ -std::shared_ptr ccrreeaattee__uutt__ppeexx__pplluuggiinn (torrent_handle const&, │ │ │ │ │ -client_data_t); │ │ │ │ │ -constructor function for the ut_pex extension. The ut_pex extension allows │ │ │ │ │ -peers to gossip about their connections, allowing the swarm stay well connected │ │ │ │ │ -and peers aware of more peers in the swarm. This extension is enabled by │ │ │ │ │ -default unless explicitly disabled in the _s_e_s_s_i_o_n constructor. │ │ │ │ │ +************ ccrreeaattee__uutt__mmeettaaddaattaa__pplluuggiinn(()) ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_/_u_t___m_e_t_a_d_a_t_a_._h_p_p" │ │ │ │ │ +std::shared_ptr ccrreeaattee__uutt__mmeettaaddaattaa__pplluuggiinn (torrent_handle │ │ │ │ │ +const&, client_data_t); │ │ │ │ │ +constructor function for the ut_metadata extension. The ut_metadata extension │ │ │ │ │ +allows peers to request the .torrent file (or more specifically the info- │ │ │ │ │ +dictionary of the .torrent file) from each other. This is the main building │ │ │ │ │ +block in making magnet links work. This extension is enabled by default unless │ │ │ │ │ +explicitly disabled in the _s_e_s_s_i_o_n constructor. │ │ │ │ │ This can either be passed in the add_torrent_params::extensions field, or via │ │ │ │ │ _t_o_r_r_e_n_t___h_a_n_d_l_e_:_:_a_d_d___e_x_t_e_n_s_i_o_n_(_). │ │ │ │ │ _h_o_m_e │ │ │ │ │ _b_l_o_g │ │ │ │ │ _u_T_P │ │ │ │ │ _d_o_w_n_l_o_a_d │ │ │ │ │ _d_o_c_u_m_e_n_t_a_t_i_o_n │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Resume_Data.html │ │ │ │ @@ -28,64 +28,32 @@ │ │ │ │ 2.0.11 │ │ │ │ │ │ │ │ │ │ │ │

    home

    │ │ │ │
    │ │ │ │

    Table of contents

    │ │ │ │ │ │ │ │
    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -

    write_resume_data_buf() write_resume_data()

    │ │ │ │ -

    Declared in "libtorrent/write_resume_data.hpp"

    │ │ │ │ -
    │ │ │ │ -std::vector<char> write_resume_data_buf (add_torrent_params const& atp);
    │ │ │ │ -entry write_resume_data (add_torrent_params const& atp);
    │ │ │ │ -
    │ │ │ │ -

    this function turns the resume data in an add_torrent_params object │ │ │ │ -into a bencoded structure

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    write_torrent_file_buf() write_torrent_file()

    │ │ │ │ -

    Declared in "libtorrent/write_resume_data.hpp"

    │ │ │ │ -
    │ │ │ │ -std::vector<char> write_torrent_file_buf (add_torrent_params const& atp
    │ │ │ │ -   , write_torrent_flags_t flags);
    │ │ │ │ -entry write_torrent_file (add_torrent_params const& atp);
    │ │ │ │ -entry write_torrent_file (add_torrent_params const& atp, write_torrent_flags_t flags);
    │ │ │ │ -
    │ │ │ │ -

    writes only the fields to create a .torrent file. This function may fail │ │ │ │ -with a std::system_error exception if:

    │ │ │ │ -
      │ │ │ │ -
    • The add_torrent_params object passed to this function does not contain the │ │ │ │ -info dictionary (the ti field)
    • │ │ │ │ -
    • The piece layers are not complete for all files that need them
    • │ │ │ │ -
    │ │ │ │ -

    The write_torrent_file_buf() overload returns the torrent file in │ │ │ │ -bencoded buffer form. This overload may be faster at the expense of lost │ │ │ │ -flexibility to add custom fields.

    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ +[report issue]
    │ │ │ │

    read_resume_data()

    │ │ │ │

    Declared in "libtorrent/read_resume_data.hpp"

    │ │ │ │
    │ │ │ │ +add_torrent_params read_resume_data (span<char const> buffer
    │ │ │ │ +   , load_torrent_limits const& cfg = {});
    │ │ │ │  add_torrent_params read_resume_data (bdecode_node const& rd
    │ │ │ │     , error_code& ec, int piece_limit = 0x200000);
    │ │ │ │  add_torrent_params read_resume_data (bdecode_node const& rd
    │ │ │ │     , int piece_limit = 0x200000);
    │ │ │ │  add_torrent_params read_resume_data (span<char const> buffer
    │ │ │ │     , error_code& ec, load_torrent_limits const& cfg = {});
    │ │ │ │ -add_torrent_params read_resume_data (span<char const> buffer
    │ │ │ │ -   , load_torrent_limits const& cfg = {});
    │ │ │ │  
    │ │ │ │

    these functions are used to parse resume data and populate the appropriate │ │ │ │ fields in an add_torrent_params object. This object can then be used to add │ │ │ │ the actual torrent_info object to and pass to session::add_torrent() or │ │ │ │ session::async_add_torrent().

    │ │ │ │

    If the client wants to override any field that was loaded from the resume │ │ │ │ data, e.g. save_path, those fields must be changed after loading resume │ │ │ │ @@ -93,14 +61,46 @@ │ │ │ │

    The piece_limit parameter determines the largest number of pieces │ │ │ │ allowed in the torrent that may be loaded as part of the resume data, if │ │ │ │ it contains an info field. The overloads that take a flat buffer are │ │ │ │ instead configured with limits on torrent sizes via load_torrent limits.

    │ │ │ │

    In order to support large torrents, it may also be necessary to raise the │ │ │ │ settings_pack::max_piece_count setting and pass a higher limit to calls │ │ │ │ to torrent_info::parse_info_section().

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    write_resume_data() write_resume_data_buf()

    │ │ │ │ +

    Declared in "libtorrent/write_resume_data.hpp"

    │ │ │ │ +
    │ │ │ │ +entry write_resume_data (add_torrent_params const& atp);
    │ │ │ │ +std::vector<char> write_resume_data_buf (add_torrent_params const& atp);
    │ │ │ │ +
    │ │ │ │ +

    this function turns the resume data in an add_torrent_params object │ │ │ │ +into a bencoded structure

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    write_torrent_file() write_torrent_file_buf()

    │ │ │ │ +

    Declared in "libtorrent/write_resume_data.hpp"

    │ │ │ │ +
    │ │ │ │ +entry write_torrent_file (add_torrent_params const& atp);
    │ │ │ │ +entry write_torrent_file (add_torrent_params const& atp, write_torrent_flags_t flags);
    │ │ │ │ +std::vector<char> write_torrent_file_buf (add_torrent_params const& atp
    │ │ │ │ +   , write_torrent_flags_t flags);
    │ │ │ │ +
    │ │ │ │ +

    writes only the fields to create a .torrent file. This function may fail │ │ │ │ +with a std::system_error exception if:

    │ │ │ │ +
      │ │ │ │ +
    • The add_torrent_params object passed to this function does not contain the │ │ │ │ +info dictionary (the ti field)
    • │ │ │ │ +
    • The piece layers are not complete for all files that need them
    • │ │ │ │ +
    │ │ │ │ +

    The write_torrent_file_buf() overload returns the torrent file in │ │ │ │ +bencoded buffer form. This overload may be faster at the expense of lost │ │ │ │ +flexibility to add custom fields.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    write_torrent_flags_t

    │ │ │ │

    Declared in "libtorrent/write_resume_data.hpp"

    │ │ │ │
    │ │ │ │
    allow_missing_piece_layer
    │ │ │ │
    this makes write_torrent_file() not fail when attempting to write a │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,50 +1,27 @@ │ │ │ │ │ > │ │ │ │ │ _[_l_i_b_t_o_r_r_e_n_t_ _l_o_g_o_] │ │ │ │ │ VVeerrssiioonn:: 2.0.11 │ │ │ │ │ _h_o_m_e │ │ │ │ │ Table of contents │ │ │ │ │ - * _w_r_i_t_e___r_e_s_u_m_e___d_a_t_a___b_u_f_(_)_ _w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_(_) │ │ │ │ │ - * _w_r_i_t_e___t_o_r_r_e_n_t___f_i_l_e___b_u_f_(_)_ _w_r_i_t_e___t_o_r_r_e_n_t___f_i_l_e_(_) │ │ │ │ │ * _r_e_a_d___r_e_s_u_m_e___d_a_t_a_(_) │ │ │ │ │ + * _w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_(_)_ _w_r_i_t_e___r_e_s_u_m_e___d_a_t_a___b_u_f_(_) │ │ │ │ │ + * _w_r_i_t_e___t_o_r_r_e_n_t___f_i_l_e_(_)_ _w_r_i_t_e___t_o_r_r_e_n_t___f_i_l_e___b_u_f_(_) │ │ │ │ │ * _w_r_i_t_e___t_o_r_r_e_n_t___f_l_a_g_s___t │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ wwrriittee__rreessuummee__ddaattaa__bbuuff(()) wwrriittee__rreessuummee__ddaattaa(()) ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_._h_p_p" │ │ │ │ │ -std::vector wwrriittee__rreessuummee__ddaattaa__bbuuff (add_torrent_params const& atp); │ │ │ │ │ -entry wwrriittee__rreessuummee__ddaattaa (add_torrent_params const& atp); │ │ │ │ │ -this function turns the resume data in an add_torrent_params object into a │ │ │ │ │ -bencoded structure │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ wwrriittee__ttoorrrreenntt__ffiillee__bbuuff(()) wwrriittee__ttoorrrreenntt__ffiillee(()) ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_._h_p_p" │ │ │ │ │ -std::vector wwrriittee__ttoorrrreenntt__ffiillee__bbuuff (add_torrent_params const& atp │ │ │ │ │ - , write_torrent_flags_t flags); │ │ │ │ │ -entry wwrriittee__ttoorrrreenntt__ffiillee (add_torrent_params const& atp); │ │ │ │ │ -entry wwrriittee__ttoorrrreenntt__ffiillee (add_torrent_params const& atp, write_torrent_flags_t │ │ │ │ │ -flags); │ │ │ │ │ -writes only the fields to create a .torrent file. This function may fail with a │ │ │ │ │ -std::system_error exception if: │ │ │ │ │ - * The _a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s object passed to this function does not contain │ │ │ │ │ - the info dictionary (the ti field) │ │ │ │ │ - * The piece layers are not complete for all files that need them │ │ │ │ │ -The write_torrent_file_buf() overload returns the torrent file in bencoded │ │ │ │ │ -buffer form. This overload may be faster at the expense of lost flexibility to │ │ │ │ │ -add custom fields. │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ rreeaadd__rreessuummee__ddaattaa(()) ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_r_e_a_d___r_e_s_u_m_e___d_a_t_a_._h_p_p" │ │ │ │ │ +add_torrent_params rreeaadd__rreessuummee__ddaattaa (span buffer │ │ │ │ │ + , load_torrent_limits const& cfg = {}); │ │ │ │ │ add_torrent_params rreeaadd__rreessuummee__ddaattaa (bdecode_node const& rd │ │ │ │ │ , error_code& ec, int piece_limit = 0x200000); │ │ │ │ │ add_torrent_params rreeaadd__rreessuummee__ddaattaa (bdecode_node const& rd │ │ │ │ │ , int piece_limit = 0x200000); │ │ │ │ │ add_torrent_params rreeaadd__rreessuummee__ddaattaa (span buffer │ │ │ │ │ , error_code& ec, load_torrent_limits const& cfg = {}); │ │ │ │ │ -add_torrent_params rreeaadd__rreessuummee__ddaattaa (span buffer │ │ │ │ │ - , load_torrent_limits const& cfg = {}); │ │ │ │ │ these functions are used to parse resume data and populate the appropriate │ │ │ │ │ fields in an _a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s object. This object can then be used to add the │ │ │ │ │ actual _t_o_r_r_e_n_t___i_n_f_o object to and pass to session::add_torrent() or session:: │ │ │ │ │ async_add_torrent(). │ │ │ │ │ If the client wants to override any field that was loaded from the resume data, │ │ │ │ │ e.g. save_path, those fields must be changed after loading resume data but │ │ │ │ │ before adding the torrent. │ │ │ │ │ @@ -52,14 +29,37 @@ │ │ │ │ │ the torrent that may be loaded as part of the resume data, if it contains an │ │ │ │ │ info field. The overloads that take a flat buffer are instead configured with │ │ │ │ │ limits on torrent sizes via load_torrent limits. │ │ │ │ │ In order to support large torrents, it may also be necessary to raise the │ │ │ │ │ _s_e_t_t_i_n_g_s___p_a_c_k_:_:_m_a_x___p_i_e_c_e___c_o_u_n_t setting and pass a higher limit to calls to │ │ │ │ │ _t_o_r_r_e_n_t___i_n_f_o_:_:_p_a_r_s_e___i_n_f_o___s_e_c_t_i_o_n_(_). │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +************ wwrriittee__rreessuummee__ddaattaa(()) wwrriittee__rreessuummee__ddaattaa__bbuuff(()) ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_._h_p_p" │ │ │ │ │ +entry wwrriittee__rreessuummee__ddaattaa (add_torrent_params const& atp); │ │ │ │ │ +std::vector wwrriittee__rreessuummee__ddaattaa__bbuuff (add_torrent_params const& atp); │ │ │ │ │ +this function turns the resume data in an add_torrent_params object into a │ │ │ │ │ +bencoded structure │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +************ wwrriittee__ttoorrrreenntt__ffiillee(()) wwrriittee__ttoorrrreenntt__ffiillee__bbuuff(()) ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_._h_p_p" │ │ │ │ │ +entry wwrriittee__ttoorrrreenntt__ffiillee (add_torrent_params const& atp); │ │ │ │ │ +entry wwrriittee__ttoorrrreenntt__ffiillee (add_torrent_params const& atp, write_torrent_flags_t │ │ │ │ │ +flags); │ │ │ │ │ +std::vector wwrriittee__ttoorrrreenntt__ffiillee__bbuuff (add_torrent_params const& atp │ │ │ │ │ + , write_torrent_flags_t flags); │ │ │ │ │ +writes only the fields to create a .torrent file. This function may fail with a │ │ │ │ │ +std::system_error exception if: │ │ │ │ │ + * The _a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s object passed to this function does not contain │ │ │ │ │ + the info dictionary (the ti field) │ │ │ │ │ + * The piece layers are not complete for all files that need them │ │ │ │ │ +The write_torrent_file_buf() overload returns the torrent file in bencoded │ │ │ │ │ +buffer form. This overload may be faster at the expense of lost flexibility to │ │ │ │ │ +add custom fields. │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ wwrriittee__ttoorrrreenntt__ffllaaggss__tt ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_._h_p_p" │ │ │ │ │ allow_missing_piece_layer │ │ │ │ │ this makes _w_r_i_t_e___t_o_r_r_e_n_t___f_i_l_e_(_) not fail when attempting to write a v2 │ │ │ │ │ torrent file that does not have all the piece layers │ │ │ │ │ no_http_seeds │ │ │ │ │ don't include http seeds in the torrent file, even if some are present in │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Session.html │ │ │ │ @@ -29,102 +29,102 @@ │ │ │ │ │ │ │ │ │ │ │ │

    home

    │ │ │ │
    │ │ │ │

    Table of contents

    │ │ │ │
    │ │ │ │ [report issue]
    │ │ │ │

    session_proxy

    │ │ │ │

    Declared in "libtorrent/session.hpp"

    │ │ │ │

    this is a holder for the internal session implementation object. Once the │ │ │ │ session destruction is explicitly initiated, this holder is used to │ │ │ │ synchronize the completion of the shutdown. The lifetime of this object │ │ │ │ may outlive session, causing the session destructor to not block. The │ │ │ │ session_proxy destructor will block however, until the underlying session │ │ │ │ is done shutting down.

    │ │ │ │
    │ │ │ │  struct session_proxy
    │ │ │ │  {
    │ │ │ │ -   session_proxy (session_proxy&&) noexcept;
    │ │ │ │ -   session_proxy& operator= (session_proxy&&) & noexcept;
    │ │ │ │ -   session_proxy (session_proxy const&);
    │ │ │ │     session_proxy ();
    │ │ │ │     ~session_proxy ();
    │ │ │ │     session_proxy& operator= (session_proxy const&) &;
    │ │ │ │ +   session_proxy (session_proxy const&);
    │ │ │ │ +   session_proxy (session_proxy&&) noexcept;
    │ │ │ │ +   session_proxy& operator= (session_proxy&&) & noexcept;
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -

    operator=() session_proxy() ~session_proxy()

    │ │ │ │ +[report issue]
    │ │ │ │ +

    ~session_proxy() session_proxy() operator=()

    │ │ │ │
    │ │ │ │ -session_proxy (session_proxy&&) noexcept;
    │ │ │ │ -session_proxy& operator= (session_proxy&&) & noexcept;
    │ │ │ │ -session_proxy (session_proxy const&);
    │ │ │ │  session_proxy ();
    │ │ │ │  ~session_proxy ();
    │ │ │ │  session_proxy& operator= (session_proxy const&) &;
    │ │ │ │ +session_proxy (session_proxy const&);
    │ │ │ │ +session_proxy (session_proxy&&) noexcept;
    │ │ │ │ +session_proxy& operator= (session_proxy&&) & noexcept;
    │ │ │ │  
    │ │ │ │

    default constructor, does not refer to any session │ │ │ │ implementation object.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │
    │ │ │ │

    session

    │ │ │ │ @@ -138,52 +138,52 @@ │ │ │ │ session_handle::apply_settings() member function. To change one or more │ │ │ │ configuration options, create a settings_pack. object and fill it with │ │ │ │ the settings to be set and pass it in to session::apply_settings().

    │ │ │ │

    see apply_settings().

    │ │ │ │
    │ │ │ │  struct session : session_handle
    │ │ │ │  {
    │ │ │ │ +   explicit session (session_params const& params);
    │ │ │ │     session (session_params const& params, session_flags_t flags);
    │ │ │ │ +   session (session_params&& params, session_flags_t flags);
    │ │ │ │     session ();
    │ │ │ │ -   explicit session (session_params const& params);
    │ │ │ │     explicit session (session_params&& params);
    │ │ │ │ -   session (session_params&& params, session_flags_t flags);
    │ │ │ │     session (session_params&& params, io_context& ios, session_flags_t);
    │ │ │ │ +   session (session_params const& params, io_context& ios);
    │ │ │ │     session (session_params&& params, io_context& ios);
    │ │ │ │     session (session_params const& params, io_context& ios, session_flags_t);
    │ │ │ │ -   session (session_params const& params, io_context& ios);
    │ │ │ │     ~session ();
    │ │ │ │     session_proxy abort ();
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ [report issue]
    │ │ │ │

    session()

    │ │ │ │
    │ │ │ │ +explicit session (session_params const& params);
    │ │ │ │  session (session_params const& params, session_flags_t flags);
    │ │ │ │ +session (session_params&& params, session_flags_t flags);
    │ │ │ │  session ();
    │ │ │ │ -explicit session (session_params const& params);
    │ │ │ │  explicit session (session_params&& params);
    │ │ │ │ -session (session_params&& params, session_flags_t flags);
    │ │ │ │  
    │ │ │ │

    Constructs the session objects which acts as the container of torrents. │ │ │ │ In order to avoid a race condition between starting the session and │ │ │ │ configuring it, you can pass in a session_params object. Its settings │ │ │ │ will take effect before the session starts up.

    │ │ │ │

    The overloads taking flags can be used to start a session in │ │ │ │ paused mode (by passing in session::paused). Note that │ │ │ │ add_default_plugins do not have an affect on constructors that │ │ │ │ take a session_params object. It already contains the plugins to use.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    session()

    │ │ │ │
    │ │ │ │  session (session_params&& params, io_context& ios, session_flags_t);
    │ │ │ │ +session (session_params const& params, io_context& ios);
    │ │ │ │  session (session_params&& params, io_context& ios);
    │ │ │ │  session (session_params const& params, io_context& ios, session_flags_t);
    │ │ │ │ -session (session_params const& params, io_context& ios);
    │ │ │ │  
    │ │ │ │

    Overload of the constructor that takes an external io_context to run │ │ │ │ the session object on. This is primarily useful for tests that may want │ │ │ │ to run multiple sessions on a single io_context, or low resource │ │ │ │ systems where additional threads are expensive and sharing an │ │ │ │ io_context with other events is fine.

    │ │ │ │
    │ │ │ │ @@ -223,22 +223,102 @@ │ │ │ │ session destructor call until the session_proxy destructor │ │ │ │ call. The session_proxy does not have any operations on it (since │ │ │ │ the session is being closed down, no operations are allowed on it). │ │ │ │ The only valid operation is calling the destructor:

    │ │ │ │
    │ │ │ │  struct session_proxy {};
    │ │ │ │  
    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +
    │ │ │ │ +

    session_params

    │ │ │ │ +

    Declared in "libtorrent/session_params.hpp"

    │ │ │ │ +

    The session_params is a parameters pack for configuring the session │ │ │ │ +before it's started.

    │ │ │ │ +
    │ │ │ │ +struct session_params
    │ │ │ │ +{
    │ │ │ │ +   session_params (settings_pack&& sp);
    │ │ │ │ +   session_params (settings_pack const& sp);
    │ │ │ │ +   session_params ();
    │ │ │ │ +   session_params (settings_pack const& sp
    │ │ │ │ +      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ +   session_params (settings_pack&& sp
    │ │ │ │ +      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ +
    │ │ │ │ +   settings_pack settings;
    │ │ │ │ +   std::vector<std::shared_ptr<plugin>> extensions;
    │ │ │ │ +   dht::dht_state dht_state;
    │ │ │ │ +   dht::dht_storage_constructor_type dht_storage_constructor;
    │ │ │ │ +   disk_io_constructor_type disk_io_constructor;
    │ │ │ │ +   std::map<std::string, std::string> ext_state;
    │ │ │ │ +   libtorrent::ip_filter ip_filter;
    │ │ │ │ +};
    │ │ │ │ +
    │ │ │ │ +[report issue]
    │ │ │ │ +

    session_params()

    │ │ │ │ +
    │ │ │ │ +session_params (settings_pack&& sp);
    │ │ │ │ +session_params (settings_pack const& sp);
    │ │ │ │ +session_params ();
    │ │ │ │ +
    │ │ │ │ +

    This constructor can be used to start with the default plugins │ │ │ │ +(ut_metadata, ut_pex and smart_ban). Pass a settings_pack to set the │ │ │ │ +initial settings when the session starts.

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    session_params()

    │ │ │ │ +
    │ │ │ │ +session_params (settings_pack const& sp
    │ │ │ │ +      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ +session_params (settings_pack&& sp
    │ │ │ │ +      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ +
    │ │ │ │ +

    This constructor helps to configure the set of initial plugins │ │ │ │ +to be added to the session before it's started.

    │ │ │ │ +[report issue]
    │ │ │ │ +
    settings
    │ │ │ │ +
    The settings to configure the session with
    │ │ │ │ +
    │ │ │ │ +[report issue]
    │ │ │ │ +
    extensions
    │ │ │ │ +
    the plugins to add to the session as it is constructed
    │ │ │ │ +
    │ │ │ │ +[report issue]
    │ │ │ │ +
    dht_state
    │ │ │ │ +
    DHT node ID and node addresses to bootstrap the DHT with.
    │ │ │ │ +
    │ │ │ │ +[report issue]
    │ │ │ │ +
    dht_storage_constructor
    │ │ │ │ +
    function object to construct the storage object for DHT items.
    │ │ │ │ +
    │ │ │ │ +[report issue]
    │ │ │ │ +
    disk_io_constructor
    │ │ │ │ +
    function object to create the disk I/O subsystem. Defaults to │ │ │ │ +default_disk_io_constructor.
    │ │ │ │ +
    │ │ │ │ +[report issue]
    │ │ │ │ +
    ext_state
    │ │ │ │ +
    this container can be used by extensions/plugins to store settings. It's │ │ │ │ +primarily here to make it convenient to save and restore state across │ │ │ │ +sessions, using read_session_params() and write_session_params().
    │ │ │ │ +
    │ │ │ │ +[report issue]
    │ │ │ │ +
    ip_filter
    │ │ │ │ +
    the IP filter to use for the session. This restricts which peers are allowed │ │ │ │ +to connect. As if passed to set_ip_filter().
    │ │ │ │ +
    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │
    │ │ │ │

    session_handle

    │ │ │ │

    Declared in "libtorrent/session_handle.hpp"

    │ │ │ │

    this class provides a non-owning handle to a session and a subset of the │ │ │ │ interface of the session class. If the underlying session is destructed │ │ │ │ -any handle to it will no longer be valid. is_valid() will return false and │ │ │ │ +any handle to it will no longer be valid. is_valid() will return false and │ │ │ │ any operation on it will throw a system_error exception, with error code │ │ │ │ invalid_session_handle.

    │ │ │ │
    │ │ │ │  struct session_handle
    │ │ │ │  {
    │ │ │ │     bool is_valid () const;
    │ │ │ │     session_params session_state (save_state_flags_t flags = save_state_flags_t::all()) const;
    │ │ │ │ @@ -246,27 +326,27 @@
    │ │ │ │        std::function<bool(torrent_status const&)> const& pred
    │ │ │ │        , status_flags_t flags = {}) const;
    │ │ │ │     void refresh_torrent_status (std::vector<torrent_status>* ret
    │ │ │ │        , status_flags_t flags = {}) const;
    │ │ │ │     void post_torrent_updates (status_flags_t flags = status_flags_t::all());
    │ │ │ │     void post_session_stats ();
    │ │ │ │     void post_dht_stats ();
    │ │ │ │ -   void set_dht_state (dht::dht_state&& st);
    │ │ │ │     void set_dht_state (dht::dht_state const& st);
    │ │ │ │ -   torrent_handle find_torrent (sha1_hash const& info_hash) const;
    │ │ │ │ +   void set_dht_state (dht::dht_state&& st);
    │ │ │ │     std::vector<torrent_handle> get_torrents () const;
    │ │ │ │ -   void async_add_torrent (add_torrent_params&& params);
    │ │ │ │ -   torrent_handle add_torrent (add_torrent_params const& params, error_code& ec);
    │ │ │ │ +   torrent_handle find_torrent (sha1_hash const& info_hash) const;
    │ │ │ │     torrent_handle add_torrent (add_torrent_params&& params);
    │ │ │ │     void async_add_torrent (add_torrent_params const& params);
    │ │ │ │     torrent_handle add_torrent (add_torrent_params const& params);
    │ │ │ │ +   torrent_handle add_torrent (add_torrent_params const& params, error_code& ec);
    │ │ │ │     torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
    │ │ │ │ +   void async_add_torrent (add_torrent_params&& params);
    │ │ │ │     bool is_paused () const;
    │ │ │ │ -   void pause ();
    │ │ │ │     void resume ();
    │ │ │ │ +   void pause ();
    │ │ │ │     bool is_dht_running () const;
    │ │ │ │     void set_dht_storage (dht::dht_storage_constructor_type sc);
    │ │ │ │     void add_dht_node (std::pair<std::string, int> const& node);
    │ │ │ │     void dht_get_item (sha1_hash const& target);
    │ │ │ │     void dht_get_item (std::array<char, 32> key
    │ │ │ │        , std::string salt = std::string());
    │ │ │ │     sha1_hash dht_put_item (entry data);
    │ │ │ │ @@ -278,35 +358,35 @@
    │ │ │ │     void dht_get_peers (sha1_hash const& info_hash);
    │ │ │ │     void dht_live_nodes (sha1_hash const& nid);
    │ │ │ │     void dht_sample_infohashes (udp::endpoint const& ep, sha1_hash const& target);
    │ │ │ │     void dht_direct_request (udp::endpoint const& ep, entry const& e, client_data_t userdata = {});
    │ │ │ │     void add_extension (std::function<std::shared_ptr<torrent_plugin>(
    │ │ │ │        torrent_handle const&, client_data_t)> ext);
    │ │ │ │     void add_extension (std::shared_ptr<plugin> ext);
    │ │ │ │ -   ip_filter get_ip_filter () const;
    │ │ │ │     void set_ip_filter (ip_filter f);
    │ │ │ │ +   ip_filter get_ip_filter () const;
    │ │ │ │     void set_port_filter (port_filter const& f);
    │ │ │ │ -   unsigned short ssl_listen_port () const;
    │ │ │ │ -   unsigned short listen_port () const;
    │ │ │ │     bool is_listening () const;
    │ │ │ │ +   unsigned short listen_port () const;
    │ │ │ │ +   unsigned short ssl_listen_port () const;
    │ │ │ │     ip_filter get_peer_class_filter () const;
    │ │ │ │     void set_peer_class_filter (ip_filter const& f);
    │ │ │ │     peer_class_type_filter get_peer_class_type_filter () const;
    │ │ │ │     void set_peer_class_type_filter (peer_class_type_filter const& f);
    │ │ │ │     peer_class_t create_peer_class (char const* name);
    │ │ │ │     void delete_peer_class (peer_class_t cid);
    │ │ │ │ -   void set_peer_class (peer_class_t cid, peer_class_info const& pci);
    │ │ │ │     peer_class_info get_peer_class (peer_class_t cid) const;
    │ │ │ │ +   void set_peer_class (peer_class_t cid, peer_class_info const& pci);
    │ │ │ │     void remove_torrent (const torrent_handle&, remove_flags_t = {});
    │ │ │ │ -   settings_pack get_settings () const;
    │ │ │ │     void apply_settings (settings_pack&&);
    │ │ │ │     void apply_settings (settings_pack const&);
    │ │ │ │ +   settings_pack get_settings () const;
    │ │ │ │ +   void set_alert_notify (std::function<void()> const& fun);
    │ │ │ │     void pop_alerts (std::vector<alert*>* alerts);
    │ │ │ │     alert* wait_for_alert (time_duration max_wait);
    │ │ │ │ -   void set_alert_notify (std::function<void()> const& fun);
    │ │ │ │     std::vector<port_mapping_t> add_port_mapping (portmap_protocol t, int external_port, int local_port);
    │ │ │ │     void delete_port_mapping (port_mapping_t handle);
    │ │ │ │     void reopen_network_sockets (reopen_network_flags_t options = reopen_map_ports);
    │ │ │ │     std::shared_ptr<aux::session_impl> native_handle () const;
    │ │ │ │  
    │ │ │ │     static constexpr save_state_flags_t save_settings  = 0_bit;
    │ │ │ │     static constexpr save_state_flags_t save_dht_state  = 2_bit;
    │ │ │ │ @@ -340,18 +420,18 @@
    │ │ │ │  

    returns the current session state. This can be passed to │ │ │ │ write_session_params() to save the state to disk and restored using │ │ │ │ read_session_params() when constructing a new session. The kind of │ │ │ │ state that's included is all settings, the DHT routing table, possibly │ │ │ │ plugin-specific state. │ │ │ │ the flags parameter can be used to only save certain parts of the │ │ │ │ session state

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    refresh_torrent_status() get_torrent_status()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    get_torrent_status() refresh_torrent_status()

    │ │ │ │
    │ │ │ │  std::vector<torrent_status> get_torrent_status (
    │ │ │ │        std::function<bool(torrent_status const&)> const& pred
    │ │ │ │        , status_flags_t flags = {}) const;
    │ │ │ │  void refresh_torrent_status (std::vector<torrent_status>* ret
    │ │ │ │        , status_flags_t flags = {}) const;
    │ │ │ │  
    │ │ │ │ @@ -421,47 +501,47 @@ │ │ │ │ void post_dht_stats (); │ │ │ │ │ │ │ │

    This will cause a dht_stats_alert to be posted.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    set_dht_state()

    │ │ │ │
    │ │ │ │ -void set_dht_state (dht::dht_state&& st);
    │ │ │ │  void set_dht_state (dht::dht_state const& st);
    │ │ │ │ +void set_dht_state (dht::dht_state&& st);
    │ │ │ │  
    │ │ │ │

    set the DHT state for the session. This will be taken into account the │ │ │ │ next time the DHT is started, as if it had been passed in via the │ │ │ │ session_params on startup.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    get_torrents() find_torrent()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    find_torrent() get_torrents()

    │ │ │ │
    │ │ │ │ -torrent_handle find_torrent (sha1_hash const& info_hash) const;
    │ │ │ │  std::vector<torrent_handle> get_torrents () const;
    │ │ │ │ +torrent_handle find_torrent (sha1_hash const& info_hash) const;
    │ │ │ │  
    │ │ │ │

    find_torrent() looks for a torrent with the given info-hash. In │ │ │ │ case there is such a torrent in the session, a torrent_handle to that │ │ │ │ torrent is returned. In case the torrent cannot be found, an invalid │ │ │ │ torrent_handle is returned.

    │ │ │ │

    See torrent_handle::is_valid() to know if the torrent was found or │ │ │ │ not.

    │ │ │ │

    get_torrents() returns a vector of torrent_handles to all the │ │ │ │ torrents currently in the session.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    add_torrent() async_add_torrent()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    async_add_torrent() add_torrent()

    │ │ │ │
    │ │ │ │ -void async_add_torrent (add_torrent_params&& params);
    │ │ │ │ -torrent_handle add_torrent (add_torrent_params const& params, error_code& ec);
    │ │ │ │  torrent_handle add_torrent (add_torrent_params&& params);
    │ │ │ │  void async_add_torrent (add_torrent_params const& params);
    │ │ │ │  torrent_handle add_torrent (add_torrent_params const& params);
    │ │ │ │ +torrent_handle add_torrent (add_torrent_params const& params, error_code& ec);
    │ │ │ │  torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
    │ │ │ │ +void async_add_torrent (add_torrent_params&& params);
    │ │ │ │  
    │ │ │ │

    You add torrents through the add_torrent() function where you give an │ │ │ │ object with all the parameters. The add_torrent() overloads will block │ │ │ │ until the torrent has been added (or failed to be added) and returns │ │ │ │ an error code and a torrent_handle. In order to add torrents more │ │ │ │ efficiently, consider using async_add_torrent() which returns │ │ │ │ immediately, without waiting for the torrent to add. Notification of │ │ │ │ @@ -486,23 +566,23 @@ │ │ │ │ want to control are torrent_flags::paused and │ │ │ │ torrent_flags::auto_managed. In order to add a magnet link that will │ │ │ │ just download the metadata, but no payload, set the │ │ │ │ torrent_flags::upload_mode flag.

    │ │ │ │

    Special consideration has to be taken when adding hybrid torrents │ │ │ │ (i.e. torrents that are BitTorrent v2 torrents that are backwards │ │ │ │ compatible with v1). For more details, see BitTorrent v2 torrents.

    │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    is_paused() resume() pause()

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    pause() resume() is_paused()

    │ │ │ │
    │ │ │ │  bool is_paused () const;
    │ │ │ │ -void pause ();
    │ │ │ │  void resume ();
    │ │ │ │ +void pause ();
    │ │ │ │  
    │ │ │ │

    Pausing the session has the same effect as pausing every torrent in │ │ │ │ it, except that torrents will not be resumed by the auto-manage │ │ │ │ mechanism. Resuming will restore the torrents to their previous paused │ │ │ │ state. i.e. the session pause state is separate from the torrent pause │ │ │ │ state. A torrent is inactive if it is paused or if the session is │ │ │ │ paused.

    │ │ │ │ @@ -610,18 +690,18 @@ │ │ │ │ with the function object's context and make the function entirely │ │ │ │ self-contained. The only reason data blob's value is computed │ │ │ │ via a function instead of just passing in the new value is to avoid │ │ │ │ race conditions. If you want to update the value in the DHT, you │ │ │ │ must first retrieve it, then modify it, then write it back. The way │ │ │ │ the DHT works, it is natural to always do a lookup before storing and │ │ │ │ calling the callback in between is convenient.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    dht_announce() dht_get_peers()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    dht_get_peers() dht_announce()

    │ │ │ │
    │ │ │ │  void dht_announce (sha1_hash const& info_hash, int port = 0, dht::announce_flags_t flags = {});
    │ │ │ │  void dht_get_peers (sha1_hash const& info_hash);
    │ │ │ │  
    │ │ │ │

    dht_get_peers() will issue a DHT get_peer request to the DHT for the │ │ │ │ specified info-hash. The response (the peers) will be posted back in a │ │ │ │ dht_get_peers_reply_alert.

    │ │ │ │ @@ -712,16 +792,16 @@ │ │ │ │ ses.add_extension(&lt::create_smart_ban_plugin); │ │ │ │ │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    set_ip_filter() get_ip_filter()

    │ │ │ │
    │ │ │ │ -ip_filter get_ip_filter () const;
    │ │ │ │  void set_ip_filter (ip_filter f);
    │ │ │ │ +ip_filter get_ip_filter () const;
    │ │ │ │  
    │ │ │ │

    Sets a filter that will be used to reject and accept incoming as well │ │ │ │ as outgoing connections based on their originating ip address. The │ │ │ │ default filter will allow connections to any ip address. To build a │ │ │ │ set of rules for which addresses are accepted and not, see ip_filter.

    │ │ │ │

    Each time a peer is blocked because of the IP filter, a │ │ │ │ peer_blocked_alert is generated. get_ip_filter() Returns the │ │ │ │ @@ -738,17 +818,17 @@ │ │ │ │ anti-virus software by connecting to SMTP, FTP ports.

    │ │ │ │ │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    is_listening() listen_port() ssl_listen_port()

    │ │ │ │
    │ │ │ │ -unsigned short ssl_listen_port () const;
    │ │ │ │ -unsigned short listen_port () const;
    │ │ │ │  bool is_listening () const;
    │ │ │ │ +unsigned short listen_port () const;
    │ │ │ │ +unsigned short ssl_listen_port () const;
    │ │ │ │  
    │ │ │ │

    is_listening() will tell you whether or not the session has │ │ │ │ successfully opened a listening port. If it hasn't, this function will │ │ │ │ return false, and then you can set a new │ │ │ │ settings_pack::listen_interfaces to try another interface and port to │ │ │ │ bind to.

    │ │ │ │

    listen_port() returns the port we ended up listening on.

    │ │ │ │ @@ -835,21 +915,21 @@ │ │ │ │ remove the peer class if it's still assigned to torrents or peers. It │ │ │ │ will however remove it once the last peer and torrent drops their │ │ │ │ references to it.

    │ │ │ │

    There is no need to call this function for custom peer classes. All │ │ │ │ peer classes will be properly destructed when the session object │ │ │ │ destructs.

    │ │ │ │

    For more information on peer classes, see peer classes.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    set_peer_class() get_peer_class()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    get_peer_class() set_peer_class()

    │ │ │ │
    │ │ │ │ -void set_peer_class (peer_class_t cid, peer_class_info const& pci);
    │ │ │ │  peer_class_info get_peer_class (peer_class_t cid) const;
    │ │ │ │ +void set_peer_class (peer_class_t cid, peer_class_info const& pci);
    │ │ │ │  
    │ │ │ │

    These functions queries information from a peer class and updates the │ │ │ │ configuration of a peer class, respectively.

    │ │ │ │

    cid must refer to an existing peer class. If it does not, the │ │ │ │ return value of get_peer_class() is undefined.

    │ │ │ │

    set_peer_class() sets all the information in the │ │ │ │ peer_class_info object in the specified peer class. There is no │ │ │ │ @@ -894,30 +974,30 @@ │ │ │ │ advised to remove them from the back of the queue, to minimize the │ │ │ │ shifting.

    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    get_settings() apply_settings()

    │ │ │ │
    │ │ │ │ -settings_pack get_settings () const;
    │ │ │ │  void apply_settings (settings_pack&&);
    │ │ │ │  void apply_settings (settings_pack const&);
    │ │ │ │ +settings_pack get_settings () const;
    │ │ │ │  
    │ │ │ │

    Applies the settings specified by the settings_pack s. This is an │ │ │ │ asynchronous operation that will return immediately and actually apply │ │ │ │ the settings to the main thread of libtorrent some time later.

    │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    wait_for_alert() set_alert_notify() pop_alerts()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    wait_for_alert() pop_alerts() set_alert_notify()

    │ │ │ │
    │ │ │ │ +void set_alert_notify (std::function<void()> const& fun);
    │ │ │ │  void pop_alerts (std::vector<alert*>* alerts);
    │ │ │ │  alert* wait_for_alert (time_duration max_wait);
    │ │ │ │ -void set_alert_notify (std::function<void()> const& fun);
    │ │ │ │  
    │ │ │ │

    Alerts is the main mechanism for libtorrent to report errors and │ │ │ │ events. pop_alerts fills in the vector passed to it with pointers │ │ │ │ to new alerts. The session still owns these alerts and they will stay │ │ │ │ valid until the next time pop_alerts is called. You may not delete │ │ │ │ the alert objects.

    │ │ │ │

    It is safe to call pop_alerts from multiple different threads, as │ │ │ │ @@ -1043,110 +1123,30 @@ │ │ │ │ [report issue]

    │ │ │ │
    reopen_map_ports
    │ │ │ │
    This option indicates if the ports are mapped using natpmp │ │ │ │ and upnp. If mapping was already made, they are deleted and added │ │ │ │ again. This only works if natpmp and/or upnp are configured to be │ │ │ │ enable.
    │ │ │ │
    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -
    │ │ │ │ -

    session_params

    │ │ │ │ -

    Declared in "libtorrent/session_params.hpp"

    │ │ │ │ -

    The session_params is a parameters pack for configuring the session │ │ │ │ -before it's started.

    │ │ │ │ -
    │ │ │ │ -struct session_params
    │ │ │ │ -{
    │ │ │ │ -   session_params (settings_pack&& sp);
    │ │ │ │ -   session_params ();
    │ │ │ │ -   session_params (settings_pack const& sp);
    │ │ │ │ -   session_params (settings_pack&& sp
    │ │ │ │ -      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ -   session_params (settings_pack const& sp
    │ │ │ │ -      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ -
    │ │ │ │ -   settings_pack settings;
    │ │ │ │ -   std::vector<std::shared_ptr<plugin>> extensions;
    │ │ │ │ -   dht::dht_state dht_state;
    │ │ │ │ -   dht::dht_storage_constructor_type dht_storage_constructor;
    │ │ │ │ -   disk_io_constructor_type disk_io_constructor;
    │ │ │ │ -   std::map<std::string, std::string> ext_state;
    │ │ │ │ -   libtorrent::ip_filter ip_filter;
    │ │ │ │ -};
    │ │ │ │ -
    │ │ │ │ -[report issue]
    │ │ │ │ -

    session_params()

    │ │ │ │ -
    │ │ │ │ -session_params (settings_pack&& sp);
    │ │ │ │ -session_params ();
    │ │ │ │ -session_params (settings_pack const& sp);
    │ │ │ │ -
    │ │ │ │ -

    This constructor can be used to start with the default plugins │ │ │ │ -(ut_metadata, ut_pex and smart_ban). Pass a settings_pack to set the │ │ │ │ -initial settings when the session starts.

    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    session_params()

    │ │ │ │ -
    │ │ │ │ -session_params (settings_pack&& sp
    │ │ │ │ -      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ -session_params (settings_pack const& sp
    │ │ │ │ -      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ -
    │ │ │ │ -

    This constructor helps to configure the set of initial plugins │ │ │ │ -to be added to the session before it's started.

    │ │ │ │ -[report issue]
    │ │ │ │ -
    settings
    │ │ │ │ -
    The settings to configure the session with
    │ │ │ │ -
    │ │ │ │ -[report issue]
    │ │ │ │ -
    extensions
    │ │ │ │ -
    the plugins to add to the session as it is constructed
    │ │ │ │ -
    │ │ │ │ -[report issue]
    │ │ │ │ -
    dht_state
    │ │ │ │ -
    DHT node ID and node addresses to bootstrap the DHT with.
    │ │ │ │ -
    │ │ │ │ -[report issue]
    │ │ │ │ -
    dht_storage_constructor
    │ │ │ │ -
    function object to construct the storage object for DHT items.
    │ │ │ │ -
    │ │ │ │ -[report issue]
    │ │ │ │ -
    disk_io_constructor
    │ │ │ │ -
    function object to create the disk I/O subsystem. Defaults to │ │ │ │ -default_disk_io_constructor.
    │ │ │ │ -
    │ │ │ │ -[report issue]
    │ │ │ │ -
    ext_state
    │ │ │ │ -
    this container can be used by extensions/plugins to store settings. It's │ │ │ │ -primarily here to make it convenient to save and restore state across │ │ │ │ -sessions, using read_session_params() and write_session_params().
    │ │ │ │ -
    │ │ │ │ -[report issue]
    │ │ │ │ -
    ip_filter
    │ │ │ │ -
    the IP filter to use for the session. This restricts which peers are allowed │ │ │ │ -to connect. As if passed to set_ip_filter().
    │ │ │ │ -
    │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │
    │ │ │ │ -
    │ │ │ │ -

    write_session_params_buf() read_session_params() write_session_params()

    │ │ │ │ +
    │ │ │ │ +

    write_session_params_buf() write_session_params() read_session_params()

    │ │ │ │

    Declared in "libtorrent/session_params.hpp"

    │ │ │ │
    │ │ │ │ -session_params read_session_params (span<char const> buf
    │ │ │ │ -   , save_state_flags_t flags = save_state_flags_t::all());
    │ │ │ │ -entry write_session_params (session_params const& sp
    │ │ │ │ -   , save_state_flags_t flags = save_state_flags_t::all());
    │ │ │ │  std::vector<char> write_session_params_buf (session_params const& sp
    │ │ │ │     , save_state_flags_t flags = save_state_flags_t::all());
    │ │ │ │  session_params read_session_params (bdecode_node const& e
    │ │ │ │     , save_state_flags_t flags = save_state_flags_t::all());
    │ │ │ │ +session_params read_session_params (span<char const> buf
    │ │ │ │ +   , save_state_flags_t flags = save_state_flags_t::all());
    │ │ │ │ +entry write_session_params (session_params const& sp
    │ │ │ │ +   , save_state_flags_t flags = save_state_flags_t::all());
    │ │ │ │  
    │ │ │ │

    These functions serialize and de-serialize a session_params object to and │ │ │ │ from bencoded form. The session_params object is used to initialize a new │ │ │ │ session using the state from a previous one (or by programmatically configure │ │ │ │ the session up-front). │ │ │ │ The flags parameter can be used to only save and load certain aspects of the │ │ │ │ session's state. │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,86 +1,86 @@ │ │ │ │ │ > │ │ │ │ │ _[_l_i_b_t_o_r_r_e_n_t_ _l_o_g_o_] │ │ │ │ │ VVeerrssiioonn:: 2.0.11 │ │ │ │ │ _h_o_m_e │ │ │ │ │ Table of contents │ │ │ │ │ * _s_e_s_s_i_o_n___p_r_o_x_y │ │ │ │ │ - o _o_p_e_r_a_t_o_r_=_(_)_ _s_e_s_s_i_o_n___p_r_o_x_y_(_)_ _~_s_e_s_s_i_o_n___p_r_o_x_y_(_) │ │ │ │ │ + o _~_s_e_s_s_i_o_n___p_r_o_x_y_(_)_ _s_e_s_s_i_o_n___p_r_o_x_y_(_)_ _o_p_e_r_a_t_o_r_=_(_) │ │ │ │ │ * _s_e_s_s_i_o_n │ │ │ │ │ o _s_e_s_s_i_o_n_(_) │ │ │ │ │ o _s_e_s_s_i_o_n_(_) │ │ │ │ │ o _~_s_e_s_s_i_o_n_(_) │ │ │ │ │ o _a_b_o_r_t_(_) │ │ │ │ │ + * _s_e_s_s_i_o_n___p_a_r_a_m_s │ │ │ │ │ + o _s_e_s_s_i_o_n___p_a_r_a_m_s_(_) │ │ │ │ │ + o _s_e_s_s_i_o_n___p_a_r_a_m_s_(_) │ │ │ │ │ * _s_e_s_s_i_o_n___h_a_n_d_l_e │ │ │ │ │ o _i_s___v_a_l_i_d_(_) │ │ │ │ │ o _s_e_s_s_i_o_n___s_t_a_t_e_(_) │ │ │ │ │ - o _r_e_f_r_e_s_h___t_o_r_r_e_n_t___s_t_a_t_u_s_(_)_ _g_e_t___t_o_r_r_e_n_t___s_t_a_t_u_s_(_) │ │ │ │ │ + o _g_e_t___t_o_r_r_e_n_t___s_t_a_t_u_s_(_)_ _r_e_f_r_e_s_h___t_o_r_r_e_n_t___s_t_a_t_u_s_(_) │ │ │ │ │ o _p_o_s_t___t_o_r_r_e_n_t___u_p_d_a_t_e_s_(_) │ │ │ │ │ o _p_o_s_t___s_e_s_s_i_o_n___s_t_a_t_s_(_) │ │ │ │ │ o _p_o_s_t___d_h_t___s_t_a_t_s_(_) │ │ │ │ │ o _s_e_t___d_h_t___s_t_a_t_e_(_) │ │ │ │ │ - o _g_e_t___t_o_r_r_e_n_t_s_(_)_ _f_i_n_d___t_o_r_r_e_n_t_(_) │ │ │ │ │ - o _a_d_d___t_o_r_r_e_n_t_(_)_ _a_s_y_n_c___a_d_d___t_o_r_r_e_n_t_(_) │ │ │ │ │ - o _i_s___p_a_u_s_e_d_(_)_ _r_e_s_u_m_e_(_)_ _p_a_u_s_e_(_) │ │ │ │ │ + o _f_i_n_d___t_o_r_r_e_n_t_(_)_ _g_e_t___t_o_r_r_e_n_t_s_(_) │ │ │ │ │ + o _a_s_y_n_c___a_d_d___t_o_r_r_e_n_t_(_)_ _a_d_d___t_o_r_r_e_n_t_(_) │ │ │ │ │ + o _p_a_u_s_e_(_)_ _r_e_s_u_m_e_(_)_ _i_s___p_a_u_s_e_d_(_) │ │ │ │ │ o _i_s___d_h_t___r_u_n_n_i_n_g_(_) │ │ │ │ │ o _s_e_t___d_h_t___s_t_o_r_a_g_e_(_) │ │ │ │ │ o _a_d_d___d_h_t___n_o_d_e_(_) │ │ │ │ │ o _d_h_t___g_e_t___i_t_e_m_(_) │ │ │ │ │ o _d_h_t___g_e_t___i_t_e_m_(_) │ │ │ │ │ o _d_h_t___p_u_t___i_t_e_m_(_) │ │ │ │ │ o _d_h_t___p_u_t___i_t_e_m_(_) │ │ │ │ │ - o _d_h_t___a_n_n_o_u_n_c_e_(_)_ _d_h_t___g_e_t___p_e_e_r_s_(_) │ │ │ │ │ + o _d_h_t___g_e_t___p_e_e_r_s_(_)_ _d_h_t___a_n_n_o_u_n_c_e_(_) │ │ │ │ │ o _d_h_t___l_i_v_e___n_o_d_e_s_(_) │ │ │ │ │ o _d_h_t___s_a_m_p_l_e___i_n_f_o_h_a_s_h_e_s_(_) │ │ │ │ │ o _d_h_t___d_i_r_e_c_t___r_e_q_u_e_s_t_(_) │ │ │ │ │ o _a_d_d___e_x_t_e_n_s_i_o_n_(_) │ │ │ │ │ o _s_e_t___i_p___f_i_l_t_e_r_(_)_ _g_e_t___i_p___f_i_l_t_e_r_(_) │ │ │ │ │ o _s_e_t___p_o_r_t___f_i_l_t_e_r_(_) │ │ │ │ │ o _i_s___l_i_s_t_e_n_i_n_g_(_)_ _l_i_s_t_e_n___p_o_r_t_(_)_ _s_s_l___l_i_s_t_e_n___p_o_r_t_(_) │ │ │ │ │ o _s_e_t___p_e_e_r___c_l_a_s_s___f_i_l_t_e_r_(_)_ _g_e_t___p_e_e_r___c_l_a_s_s___f_i_l_t_e_r_(_) │ │ │ │ │ o _g_e_t___p_e_e_r___c_l_a_s_s___t_y_p_e___f_i_l_t_e_r_(_)_ _s_e_t___p_e_e_r___c_l_a_s_s___t_y_p_e___f_i_l_t_e_r_(_) │ │ │ │ │ o _c_r_e_a_t_e___p_e_e_r___c_l_a_s_s_(_) │ │ │ │ │ o _d_e_l_e_t_e___p_e_e_r___c_l_a_s_s_(_) │ │ │ │ │ - o _s_e_t___p_e_e_r___c_l_a_s_s_(_)_ _g_e_t___p_e_e_r___c_l_a_s_s_(_) │ │ │ │ │ + o _g_e_t___p_e_e_r___c_l_a_s_s_(_)_ _s_e_t___p_e_e_r___c_l_a_s_s_(_) │ │ │ │ │ o _r_e_m_o_v_e___t_o_r_r_e_n_t_(_) │ │ │ │ │ o _g_e_t___s_e_t_t_i_n_g_s_(_)_ _a_p_p_l_y___s_e_t_t_i_n_g_s_(_) │ │ │ │ │ - o _w_a_i_t___f_o_r___a_l_e_r_t_(_)_ _s_e_t___a_l_e_r_t___n_o_t_i_f_y_(_)_ _p_o_p___a_l_e_r_t_s_(_) │ │ │ │ │ + o _w_a_i_t___f_o_r___a_l_e_r_t_(_)_ _p_o_p___a_l_e_r_t_s_(_)_ _s_e_t___a_l_e_r_t___n_o_t_i_f_y_(_) │ │ │ │ │ o _a_d_d___p_o_r_t___m_a_p_p_i_n_g_(_)_ _d_e_l_e_t_e___p_o_r_t___m_a_p_p_i_n_g_(_) │ │ │ │ │ o _r_e_o_p_e_n___n_e_t_w_o_r_k___s_o_c_k_e_t_s_(_) │ │ │ │ │ o _n_a_t_i_v_e___h_a_n_d_l_e_(_) │ │ │ │ │ - * _s_e_s_s_i_o_n___p_a_r_a_m_s │ │ │ │ │ - o _s_e_s_s_i_o_n___p_a_r_a_m_s_(_) │ │ │ │ │ - o _s_e_s_s_i_o_n___p_a_r_a_m_s_(_) │ │ │ │ │ - * _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s___b_u_f_(_)_ _r_e_a_d___s_e_s_s_i_o_n___p_a_r_a_m_s_(_)_ _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s_(_) │ │ │ │ │ + * _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s___b_u_f_(_)_ _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s_(_)_ _r_e_a_d___s_e_s_s_i_o_n___p_a_r_a_m_s_(_) │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ sseessssiioonn__pprrooxxyy ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n_._h_p_p" │ │ │ │ │ this is a holder for the internal _s_e_s_s_i_o_n implementation object. Once the │ │ │ │ │ _s_e_s_s_i_o_n destruction is explicitly initiated, this holder is used to synchronize │ │ │ │ │ the completion of the shutdown. The lifetime of this object may outlive │ │ │ │ │ _s_e_s_s_i_o_n, causing the _s_e_s_s_i_o_n destructor to not block. The _s_e_s_s_i_o_n___p_r_o_x_y │ │ │ │ │ destructor will block however, until the underlying _s_e_s_s_i_o_n is done shutting │ │ │ │ │ down. │ │ │ │ │ struct session_proxy │ │ │ │ │ { │ │ │ │ │ - sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ │ - session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept; │ │ │ │ │ - sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ │ sseessssiioonn__pprrooxxyy (); │ │ │ │ │ ~~sseessssiioonn__pprrooxxyy (); │ │ │ │ │ session_proxy& ooppeerraattoorr== (session_proxy const&) &; │ │ │ │ │ + sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ │ + sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ │ + session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept; │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ooppeerraattoorr==(()) sseessssiioonn__pprrooxxyy(()) ~~sseessssiioonn__pprrooxxyy(()) ********** │ │ │ │ │ -sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ │ -session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept; │ │ │ │ │ -sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ │ +********** ~~sseessssiioonn__pprrooxxyy(()) sseessssiioonn__pprrooxxyy(()) ooppeerraattoorr==(()) ********** │ │ │ │ │ sseessssiioonn__pprrooxxyy (); │ │ │ │ │ ~~sseessssiioonn__pprrooxxyy (); │ │ │ │ │ session_proxy& ooppeerraattoorr== (session_proxy const&) &; │ │ │ │ │ +sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ │ +sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ │ +session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept; │ │ │ │ │ default constructor, does not refer to any _s_e_s_s_i_o_n implementation object. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ sseessssiioonn ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n_._h_p_p" │ │ │ │ │ The _s_e_s_s_i_o_n holds all state that spans multiple torrents. Among other things it │ │ │ │ │ runs the network loop and manages all torrents. Once it's created, the _s_e_s_s_i_o_n │ │ │ │ │ object will spawn the main thread that will do all the work. The main thread │ │ │ │ │ @@ -88,47 +88,47 @@ │ │ │ │ │ You have some control over _s_e_s_s_i_o_n configuration through the session_handle:: │ │ │ │ │ apply_settings() member function. To change one or more configuration options, │ │ │ │ │ create a _s_e_t_t_i_n_g_s___p_a_c_k. object and fill it with the settings to be set and pass │ │ │ │ │ it in to session::apply_settings(). │ │ │ │ │ see _a_p_p_l_y___s_e_t_t_i_n_g_s_(_). │ │ │ │ │ struct session : session_handle │ │ │ │ │ { │ │ │ │ │ + explicit sseessssiioonn (session_params const& params); │ │ │ │ │ sseessssiioonn (session_params const& params, session_flags_t flags); │ │ │ │ │ + sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ │ sseessssiioonn (); │ │ │ │ │ - explicit sseessssiioonn (session_params const& params); │ │ │ │ │ explicit sseessssiioonn (session_params&& params); │ │ │ │ │ - sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ │ sseessssiioonn (session_params&& params, io_context& ios, session_flags_t); │ │ │ │ │ + sseessssiioonn (session_params const& params, io_context& ios); │ │ │ │ │ sseessssiioonn (session_params&& params, io_context& ios); │ │ │ │ │ sseessssiioonn (session_params const& params, io_context& ios, session_flags_t); │ │ │ │ │ - sseessssiioonn (session_params const& params, io_context& ios); │ │ │ │ │ ~~sseessssiioonn (); │ │ │ │ │ session_proxy aabboorrtt (); │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sseessssiioonn(()) ********** │ │ │ │ │ +explicit sseessssiioonn (session_params const& params); │ │ │ │ │ sseessssiioonn (session_params const& params, session_flags_t flags); │ │ │ │ │ +sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ │ sseessssiioonn (); │ │ │ │ │ -explicit sseessssiioonn (session_params const& params); │ │ │ │ │ explicit sseessssiioonn (session_params&& params); │ │ │ │ │ -sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ │ Constructs the _s_e_s_s_i_o_n objects which acts as the container of torrents. In │ │ │ │ │ order to avoid a race condition between starting the _s_e_s_s_i_o_n and configuring │ │ │ │ │ it, you can pass in a _s_e_s_s_i_o_n___p_a_r_a_m_s object. Its settings will take effect │ │ │ │ │ before the _s_e_s_s_i_o_n starts up. │ │ │ │ │ The overloads taking flags can be used to start a _s_e_s_s_i_o_n in paused mode (by │ │ │ │ │ passing in session::paused). Note that add_default_plugins do not have an │ │ │ │ │ affect on constructors that take a _s_e_s_s_i_o_n___p_a_r_a_m_s object. It already contains │ │ │ │ │ the plugins to use. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sseessssiioonn(()) ********** │ │ │ │ │ sseessssiioonn (session_params&& params, io_context& ios, session_flags_t); │ │ │ │ │ +sseessssiioonn (session_params const& params, io_context& ios); │ │ │ │ │ sseessssiioonn (session_params&& params, io_context& ios); │ │ │ │ │ sseessssiioonn (session_params const& params, io_context& ios, session_flags_t); │ │ │ │ │ -sseessssiioonn (session_params const& params, io_context& ios); │ │ │ │ │ Overload of the constructor that takes an external io_context to run the │ │ │ │ │ _s_e_s_s_i_o_n object on. This is primarily useful for tests that may want to run │ │ │ │ │ multiple sessions on a single io_context, or low resource systems where │ │ │ │ │ additional threads are expensive and sharing an io_context with other events is │ │ │ │ │ fine. │ │ │ │ │ Warning │ │ │ │ │ The _s_e_s_s_i_o_n object does not cleanly terminate with an external io_context. The │ │ │ │ │ @@ -156,14 +156,78 @@ │ │ │ │ │ then synchronize the threads. So, the destruction of the _s_e_s_s_i_o_n is performed │ │ │ │ │ from the session destructor call until the session_proxy destructor call. The │ │ │ │ │ session_proxy does not have any operations on it (since the _s_e_s_s_i_o_n is being │ │ │ │ │ closed down, no operations are allowed on it). The only valid operation is │ │ │ │ │ calling the destructor: │ │ │ │ │ struct session_proxy {}; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +************ sseessssiioonn__ppaarraammss ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n___p_a_r_a_m_s_._h_p_p" │ │ │ │ │ +The _s_e_s_s_i_o_n___p_a_r_a_m_s is a parameters pack for configuring the _s_e_s_s_i_o_n before it's │ │ │ │ │ +started. │ │ │ │ │ +struct session_params │ │ │ │ │ +{ │ │ │ │ │ + sseessssiioonn__ppaarraammss (settings_pack&& sp); │ │ │ │ │ + sseessssiioonn__ppaarraammss (settings_pack const& sp); │ │ │ │ │ + sseessssiioonn__ppaarraammss (); │ │ │ │ │ + sseessssiioonn__ppaarraammss (settings_pack const& sp │ │ │ │ │ + , std::vector> exts); │ │ │ │ │ + sseessssiioonn__ppaarraammss (settings_pack&& sp │ │ │ │ │ + , std::vector> exts); │ │ │ │ │ + │ │ │ │ │ + settings_pack settings; │ │ │ │ │ + std::vector> extensions; │ │ │ │ │ + dht::dht_state dht_state; │ │ │ │ │ + dht::dht_storage_constructor_type dht_storage_constructor; │ │ │ │ │ + disk_io_constructor_type disk_io_constructor; │ │ │ │ │ + std::map ext_state; │ │ │ │ │ + libtorrent::ip_filter ip_filter; │ │ │ │ │ +}; │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +********** sseessssiioonn__ppaarraammss(()) ********** │ │ │ │ │ +sseessssiioonn__ppaarraammss (settings_pack&& sp); │ │ │ │ │ +sseessssiioonn__ppaarraammss (settings_pack const& sp); │ │ │ │ │ +sseessssiioonn__ppaarraammss (); │ │ │ │ │ +This constructor can be used to start with the default plugins (ut_metadata, │ │ │ │ │ +ut_pex and smart_ban). Pass a _s_e_t_t_i_n_g_s___p_a_c_k to set the initial settings when │ │ │ │ │ +the _s_e_s_s_i_o_n starts. │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +********** sseessssiioonn__ppaarraammss(()) ********** │ │ │ │ │ +sseessssiioonn__ppaarraammss (settings_pack const& sp │ │ │ │ │ + , std::vector> exts); │ │ │ │ │ +sseessssiioonn__ppaarraammss (settings_pack&& sp │ │ │ │ │ + , std::vector> exts); │ │ │ │ │ +This constructor helps to configure the set of initial plugins to be added to │ │ │ │ │ +the _s_e_s_s_i_o_n before it's started. │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ + settings │ │ │ │ │ + The settings to configure the _s_e_s_s_i_o_n with │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ + extensions │ │ │ │ │ + the plugins to add to the _s_e_s_s_i_o_n as it is constructed │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ + dht_state │ │ │ │ │ + DHT node ID and node addresses to bootstrap the DHT with. │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ + dht_storage_constructor │ │ │ │ │ + function object to construct the storage object for DHT items. │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ + disk_io_constructor │ │ │ │ │ + function object to create the disk I/O subsystem. Defaults to │ │ │ │ │ + default_disk_io_constructor. │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ + ext_state │ │ │ │ │ + this container can be used by extensions/plugins to store settings. It's │ │ │ │ │ + primarily here to make it convenient to save and restore state across │ │ │ │ │ + sessions, using _r_e_a_d___s_e_s_s_i_o_n___p_a_r_a_m_s_(_) and _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s_(_). │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ + ip_filter │ │ │ │ │ + the IP filter to use for the _s_e_s_s_i_o_n. This restricts which peers are │ │ │ │ │ + allowed to connect. As if passed to _s_e_t___i_p___f_i_l_t_e_r_(_). │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ sseessssiioonn__hhaannddllee ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n___h_a_n_d_l_e_._h_p_p" │ │ │ │ │ this class provides a non-owning handle to a _s_e_s_s_i_o_n and a subset of the │ │ │ │ │ interface of the _s_e_s_s_i_o_n class. If the underlying _s_e_s_s_i_o_n is destructed any │ │ │ │ │ handle to it will no longer be valid. _i_s___v_a_l_i_d_(_) will return false and any │ │ │ │ │ operation on it will throw a system_error exception, with error code │ │ │ │ │ invalid_session_handle. │ │ │ │ │ @@ -176,28 +240,28 @@ │ │ │ │ │ std::function const& pred │ │ │ │ │ , status_flags_t flags = {}) const; │ │ │ │ │ void rreeffrreesshh__ttoorrrreenntt__ssttaattuuss (std::vector* ret │ │ │ │ │ , status_flags_t flags = {}) const; │ │ │ │ │ void ppoosstt__ttoorrrreenntt__uuppddaatteess (status_flags_t flags = status_flags_t::all()); │ │ │ │ │ void ppoosstt__sseessssiioonn__ssttaattss (); │ │ │ │ │ void ppoosstt__ddhhtt__ssttaattss (); │ │ │ │ │ - void sseett__ddhhtt__ssttaattee (dht::dht_state&& st); │ │ │ │ │ void sseett__ddhhtt__ssttaattee (dht::dht_state const& st); │ │ │ │ │ - torrent_handle ffiinndd__ttoorrrreenntt (sha1_hash const& info_hash) const; │ │ │ │ │ + void sseett__ddhhtt__ssttaattee (dht::dht_state&& st); │ │ │ │ │ std::vector ggeett__ttoorrrreennttss () const; │ │ │ │ │ - void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ │ - torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& │ │ │ │ │ -ec); │ │ │ │ │ + torrent_handle ffiinndd__ttoorrrreenntt (sha1_hash const& info_hash) const; │ │ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ │ void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params); │ │ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params); │ │ │ │ │ + torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& │ │ │ │ │ +ec); │ │ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec); │ │ │ │ │ + void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ │ bool iiss__ppaauusseedd () const; │ │ │ │ │ - void ppaauussee (); │ │ │ │ │ void rreessuummee (); │ │ │ │ │ + void ppaauussee (); │ │ │ │ │ bool iiss__ddhhtt__rruunnnniinngg () const; │ │ │ │ │ void sseett__ddhhtt__ssttoorraaggee (dht::dht_storage_constructor_type sc); │ │ │ │ │ void aadddd__ddhhtt__nnooddee (std::pair const& node); │ │ │ │ │ void ddhhtt__ggeett__iitteemm (sha1_hash const& target); │ │ │ │ │ void ddhhtt__ggeett__iitteemm (std::array key │ │ │ │ │ , std::string salt = std::string()); │ │ │ │ │ sha1_hash ddhhtt__ppuutt__iitteemm (entry data); │ │ │ │ │ @@ -212,35 +276,35 @@ │ │ │ │ │ void ddhhtt__ssaammppllee__iinnffoohhaasshheess (udp::endpoint const& ep, sha1_hash const& │ │ │ │ │ target); │ │ │ │ │ void ddhhtt__ddiirreecctt__rreeqquueesstt (udp::endpoint const& ep, entry const& e, │ │ │ │ │ client_data_t userdata = {}); │ │ │ │ │ void aadddd__eexxtteennssiioonn (std::function( │ │ │ │ │ torrent_handle const&, client_data_t)> ext); │ │ │ │ │ void aadddd__eexxtteennssiioonn (std::shared_ptr ext); │ │ │ │ │ - ip_filter ggeett__iipp__ffiilltteerr () const; │ │ │ │ │ void sseett__iipp__ffiilltteerr (ip_filter f); │ │ │ │ │ + ip_filter ggeett__iipp__ffiilltteerr () const; │ │ │ │ │ void sseett__ppoorrtt__ffiilltteerr (port_filter const& f); │ │ │ │ │ - unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ │ - unsigned short lliisstteenn__ppoorrtt () const; │ │ │ │ │ bool iiss__lliisstteenniinngg () const; │ │ │ │ │ + unsigned short lliisstteenn__ppoorrtt () const; │ │ │ │ │ + unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ │ ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const; │ │ │ │ │ void sseett__ppeeeerr__ccllaassss__ffiilltteerr (ip_filter const& f); │ │ │ │ │ peer_class_type_filter ggeett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr () const; │ │ │ │ │ void sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr (peer_class_type_filter const& f); │ │ │ │ │ peer_class_t ccrreeaattee__ppeeeerr__ccllaassss (char const* name); │ │ │ │ │ void ddeelleettee__ppeeeerr__ccllaassss (peer_class_t cid); │ │ │ │ │ - void sseett__ppeeeerr__ccllaassss (peer_class_t cid, peer_class_info const& pci); │ │ │ │ │ peer_class_info ggeett__ppeeeerr__ccllaassss (peer_class_t cid) const; │ │ │ │ │ + void sseett__ppeeeerr__ccllaassss (peer_class_t cid, peer_class_info const& pci); │ │ │ │ │ void rreemmoovvee__ttoorrrreenntt (const torrent_handle&, remove_flags_t = {}); │ │ │ │ │ - settings_pack ggeett__sseettttiinnggss () const; │ │ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack&&); │ │ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack const&); │ │ │ │ │ + settings_pack ggeett__sseettttiinnggss () const; │ │ │ │ │ + void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun); │ │ │ │ │ void ppoopp__aalleerrttss (std::vector* alerts); │ │ │ │ │ alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait); │ │ │ │ │ - void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun); │ │ │ │ │ std::vector aadddd__ppoorrtt__mmaappppiinngg (portmap_protocol t, int │ │ │ │ │ external_port, int local_port); │ │ │ │ │ void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle); │ │ │ │ │ void rreeooppeenn__nneettwwoorrkk__ssoocckkeettss (reopen_network_flags_t options = │ │ │ │ │ reopen_map_ports); │ │ │ │ │ std::shared_ptr nnaattiivvee__hhaannddllee () const; │ │ │ │ │ │ │ │ │ │ @@ -269,15 +333,15 @@ │ │ │ │ │ all()) const; │ │ │ │ │ returns the current _s_e_s_s_i_o_n state. This can be passed to _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s_(_) │ │ │ │ │ to save the state to disk and restored using _r_e_a_d___s_e_s_s_i_o_n___p_a_r_a_m_s_(_) when │ │ │ │ │ constructing a new _s_e_s_s_i_o_n. The kind of state that's included is all settings, │ │ │ │ │ the DHT routing table, possibly plugin-specific state. the flags parameter can │ │ │ │ │ be used to only save certain parts of the _s_e_s_s_i_o_n state │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** rreeffrreesshh__ttoorrrreenntt__ssttaattuuss(()) ggeett__ttoorrrreenntt__ssttaattuuss(()) ********** │ │ │ │ │ +********** ggeett__ttoorrrreenntt__ssttaattuuss(()) rreeffrreesshh__ttoorrrreenntt__ssttaattuuss(()) ********** │ │ │ │ │ std::vector ggeett__ttoorrrreenntt__ssttaattuuss ( │ │ │ │ │ std::function const& pred │ │ │ │ │ , status_flags_t flags = {}) const; │ │ │ │ │ void rreeffrreesshh__ttoorrrreenntt__ssttaattuuss (std::vector* ret │ │ │ │ │ , status_flags_t flags = {}) const; │ │ │ │ │ Note │ │ │ │ │ these calls are potentially expensive and won't scale well with lots of │ │ │ │ │ @@ -327,37 +391,37 @@ │ │ │ │ │ For more information, see the _s_e_s_s_i_o_n_ _s_t_a_t_i_s_t_i_c_s section. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ppoosstt__ddhhtt__ssttaattss(()) ********** │ │ │ │ │ void ppoosstt__ddhhtt__ssttaattss (); │ │ │ │ │ This will cause a _d_h_t___s_t_a_t_s___a_l_e_r_t to be posted. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sseett__ddhhtt__ssttaattee(()) ********** │ │ │ │ │ -void sseett__ddhhtt__ssttaattee (dht::dht_state&& st); │ │ │ │ │ void sseett__ddhhtt__ssttaattee (dht::dht_state const& st); │ │ │ │ │ +void sseett__ddhhtt__ssttaattee (dht::dht_state&& st); │ │ │ │ │ set the DHT state for the _s_e_s_s_i_o_n. This will be taken into account the next │ │ │ │ │ time the DHT is started, as if it had been passed in via the _s_e_s_s_i_o_n___p_a_r_a_m_s on │ │ │ │ │ startup. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ggeett__ttoorrrreennttss(()) ffiinndd__ttoorrrreenntt(()) ********** │ │ │ │ │ -torrent_handle ffiinndd__ttoorrrreenntt (sha1_hash const& info_hash) const; │ │ │ │ │ +********** ffiinndd__ttoorrrreenntt(()) ggeett__ttoorrrreennttss(()) ********** │ │ │ │ │ std::vector ggeett__ttoorrrreennttss () const; │ │ │ │ │ +torrent_handle ffiinndd__ttoorrrreenntt (sha1_hash const& info_hash) const; │ │ │ │ │ find_torrent() looks for a torrent with the given info-hash. In case there is │ │ │ │ │ such a torrent in the _s_e_s_s_i_o_n, a _t_o_r_r_e_n_t___h_a_n_d_l_e to that torrent is returned. In │ │ │ │ │ case the torrent cannot be found, an invalid _t_o_r_r_e_n_t___h_a_n_d_l_e is returned. │ │ │ │ │ See torrent_handle::is_valid() to know if the torrent was found or not. │ │ │ │ │ get_torrents() returns a vector of torrent_handles to all the torrents │ │ │ │ │ currently in the _s_e_s_s_i_o_n. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** aadddd__ttoorrrreenntt(()) aassyynncc__aadddd__ttoorrrreenntt(()) ********** │ │ │ │ │ -void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ │ -torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& ec); │ │ │ │ │ +********** aassyynncc__aadddd__ttoorrrreenntt(()) aadddd__ttoorrrreenntt(()) ********** │ │ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ │ void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params); │ │ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params); │ │ │ │ │ +torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& ec); │ │ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec); │ │ │ │ │ +void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ │ You add torrents through the _a_d_d___t_o_r_r_e_n_t_(_) function where you give an object │ │ │ │ │ with all the parameters. The _a_d_d___t_o_r_r_e_n_t_(_) overloads will block until the │ │ │ │ │ torrent has been added (or failed to be added) and returns an error code and a │ │ │ │ │ _t_o_r_r_e_n_t___h_a_n_d_l_e. In order to add torrents more efficiently, consider using │ │ │ │ │ _a_s_y_n_c___a_d_d___t_o_r_r_e_n_t_(_) which returns immediately, without waiting for the torrent │ │ │ │ │ to add. Notification of the torrent being added is sent as _a_d_d___t_o_r_r_e_n_t___a_l_e_r_t. │ │ │ │ │ The save_path field in _a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s must be set to a valid path where the │ │ │ │ │ @@ -378,18 +442,18 @@ │ │ │ │ │ torrent_flags::paused and torrent_flags::auto_managed. In order to add a magnet │ │ │ │ │ link that will just download the metadata, but no payload, set the │ │ │ │ │ torrent_flags::upload_mode flag. │ │ │ │ │ Special consideration has to be taken when adding hybrid torrents (i.e. │ │ │ │ │ torrents that are BitTorrent v2 torrents that are backwards compatible with │ │ │ │ │ v1). For more details, see _B_i_t_T_o_r_r_e_n_t_ _v_2_ _t_o_r_r_e_n_t_s. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** iiss__ppaauusseedd(()) rreessuummee(()) ppaauussee(()) ********** │ │ │ │ │ +********** ppaauussee(()) rreessuummee(()) iiss__ppaauusseedd(()) ********** │ │ │ │ │ bool iiss__ppaauusseedd () const; │ │ │ │ │ -void ppaauussee (); │ │ │ │ │ void rreessuummee (); │ │ │ │ │ +void ppaauussee (); │ │ │ │ │ Pausing the _s_e_s_s_i_o_n has the same effect as pausing every torrent in it, except │ │ │ │ │ that torrents will not be resumed by the auto-manage mechanism. Resuming will │ │ │ │ │ restore the torrents to their previous paused state. i.e. the _s_e_s_s_i_o_n pause │ │ │ │ │ state is separate from the torrent pause state. A torrent is inactive if it is │ │ │ │ │ paused or if the _s_e_s_s_i_o_n is paused. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** iiss__ddhhtt__rruunnnniinngg(()) ********** │ │ │ │ │ @@ -465,15 +529,15 @@ │ │ │ │ │ and make the function entirely self-contained. The only reason data blob's │ │ │ │ │ value is computed via a function instead of just passing in the new value is to │ │ │ │ │ avoid race conditions. If you want to uuppddaattee the value in the DHT, you must │ │ │ │ │ first retrieve it, then modify it, then write it back. The way the DHT works, │ │ │ │ │ it is natural to always do a lookup before storing and calling the callback in │ │ │ │ │ between is convenient. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ddhhtt__aannnnoouunnccee(()) ddhhtt__ggeett__ppeeeerrss(()) ********** │ │ │ │ │ +********** ddhhtt__ggeett__ppeeeerrss(()) ddhhtt__aannnnoouunnccee(()) ********** │ │ │ │ │ void ddhhtt__aannnnoouunnccee (sha1_hash const& info_hash, int port = 0, dht:: │ │ │ │ │ announce_flags_t flags = {}); │ │ │ │ │ void ddhhtt__ggeett__ppeeeerrss (sha1_hash const& info_hash); │ │ │ │ │ dht_get_peers() will issue a DHT get_peer request to the DHT for the specified │ │ │ │ │ info-hash. The response (the peers) will be posted back in a │ │ │ │ │ _d_h_t___g_e_t___p_e_e_r_s___r_e_p_l_y___a_l_e_r_t. │ │ │ │ │ dht_announce() will issue a DHT announce request to the DHT to the specified │ │ │ │ │ @@ -534,16 +598,16 @@ │ │ │ │ │ A _p_l_u_g_i_n that, with a small overhead, can ban peers that sends bad data │ │ │ │ │ with very high accuracy. Should eliminate most problems on poisoned │ │ │ │ │ torrents. │ │ │ │ │ #include │ │ │ │ │ ses.add_extension(<::create_smart_ban_plugin); │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sseett__iipp__ffiilltteerr(()) ggeett__iipp__ffiilltteerr(()) ********** │ │ │ │ │ -ip_filter ggeett__iipp__ffiilltteerr () const; │ │ │ │ │ void sseett__iipp__ffiilltteerr (ip_filter f); │ │ │ │ │ +ip_filter ggeett__iipp__ffiilltteerr () const; │ │ │ │ │ Sets a filter that will be used to reject and accept incoming as well as │ │ │ │ │ outgoing connections based on their originating ip address. The default filter │ │ │ │ │ will allow connections to any ip address. To build a set of rules for which │ │ │ │ │ addresses are accepted and not, see _i_p___f_i_l_t_e_r. │ │ │ │ │ Each time a peer is blocked because of the IP filter, a _p_e_e_r___b_l_o_c_k_e_d___a_l_e_r_t is │ │ │ │ │ generated. get_ip_filter() Returns the _i_p___f_i_l_t_e_r currently in the _s_e_s_s_i_o_n. See │ │ │ │ │ _i_p___f_i_l_t_e_r. │ │ │ │ │ @@ -552,17 +616,17 @@ │ │ │ │ │ void sseett__ppoorrtt__ffiilltteerr (port_filter const& f); │ │ │ │ │ apply _p_o_r_t___f_i_l_t_e_r f to incoming and outgoing peers. a port filter will reject │ │ │ │ │ making outgoing peer connections to certain remote ports. The main intention is │ │ │ │ │ to be able to avoid triggering certain anti-virus software by connecting to │ │ │ │ │ SMTP, FTP ports. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** iiss__lliisstteenniinngg(()) lliisstteenn__ppoorrtt(()) ssssll__lliisstteenn__ppoorrtt(()) ********** │ │ │ │ │ -unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ │ -unsigned short lliisstteenn__ppoorrtt () const; │ │ │ │ │ bool iiss__lliisstteenniinngg () const; │ │ │ │ │ +unsigned short lliisstteenn__ppoorrtt () const; │ │ │ │ │ +unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ │ is_listening() will tell you whether or not the _s_e_s_s_i_o_n has successfully opened │ │ │ │ │ a listening port. If it hasn't, this function will return false, and then you │ │ │ │ │ can set a new _s_e_t_t_i_n_g_s___p_a_c_k_:_:_l_i_s_t_e_n___i_n_t_e_r_f_a_c_e_s to try another interface and │ │ │ │ │ port to bind to. │ │ │ │ │ listen_port() returns the port we ended up listening on. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sseett__ppeeeerr__ccllaassss__ffiilltteerr(()) ggeett__ppeeeerr__ccllaassss__ffiilltteerr(()) ********** │ │ │ │ │ @@ -626,17 +690,17 @@ │ │ │ │ │ Since peer classes are reference counted, this function will not remove the │ │ │ │ │ peer class if it's still assigned to torrents or peers. It will however remove │ │ │ │ │ it once the last peer and torrent drops their references to it. │ │ │ │ │ There is no need to call this function for custom peer classes. All peer │ │ │ │ │ classes will be properly destructed when the _s_e_s_s_i_o_n object destructs. │ │ │ │ │ For more information on peer classes, see _p_e_e_r_ _c_l_a_s_s_e_s. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** sseett__ppeeeerr__ccllaassss(()) ggeett__ppeeeerr__ccllaassss(()) ********** │ │ │ │ │ -void sseett__ppeeeerr__ccllaassss (peer_class_t cid, peer_class_info const& pci); │ │ │ │ │ +********** ggeett__ppeeeerr__ccllaassss(()) sseett__ppeeeerr__ccllaassss(()) ********** │ │ │ │ │ peer_class_info ggeett__ppeeeerr__ccllaassss (peer_class_t cid) const; │ │ │ │ │ +void sseett__ppeeeerr__ccllaassss (peer_class_t cid, peer_class_info const& pci); │ │ │ │ │ These functions queries information from a peer class and updates the │ │ │ │ │ configuration of a peer class, respectively. │ │ │ │ │ cid must refer to an existing peer class. If it does not, the return value of │ │ │ │ │ get_peer_class() is undefined. │ │ │ │ │ set_peer_class() sets all the information in the _p_e_e_r___c_l_a_s_s___i_n_f_o object in the │ │ │ │ │ specified peer class. There is no option to only update a single property. │ │ │ │ │ A peer or torrent belonging to more than one class, the highest priority among │ │ │ │ │ @@ -667,25 +731,25 @@ │ │ │ │ │ Note that when a queued or downloading torrent is removed, its position in the │ │ │ │ │ download queue is vacated and every subsequent torrent in the queue has their │ │ │ │ │ queue positions updated. This can potentially cause a large state_update to be │ │ │ │ │ posted. When removing all torrents, it is advised to remove them from the back │ │ │ │ │ of the queue, to minimize the shifting. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ggeett__sseettttiinnggss(()) aappppllyy__sseettttiinnggss(()) ********** │ │ │ │ │ -settings_pack ggeett__sseettttiinnggss () const; │ │ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack&&); │ │ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack const&); │ │ │ │ │ +settings_pack ggeett__sseettttiinnggss () const; │ │ │ │ │ Applies the settings specified by the _s_e_t_t_i_n_g_s___p_a_c_k s. This is an asynchronous │ │ │ │ │ operation that will return immediately and actually apply the settings to the │ │ │ │ │ main thread of libtorrent some time later. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** wwaaiitt__ffoorr__aalleerrtt(()) sseett__aalleerrtt__nnoottiiffyy(()) ppoopp__aalleerrttss(()) ********** │ │ │ │ │ +********** wwaaiitt__ffoorr__aalleerrtt(()) ppoopp__aalleerrttss(()) sseett__aalleerrtt__nnoottiiffyy(()) ********** │ │ │ │ │ +void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun); │ │ │ │ │ void ppoopp__aalleerrttss (std::vector* alerts); │ │ │ │ │ alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait); │ │ │ │ │ -void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun); │ │ │ │ │ Alerts is the main mechanism for libtorrent to report errors and events. │ │ │ │ │ pop_alerts fills in the vector passed to it with pointers to new alerts. The │ │ │ │ │ _s_e_s_s_i_o_n still owns these alerts and they will stay valid until the next time │ │ │ │ │ pop_alerts is called. You may not delete the _a_l_e_r_t objects. │ │ │ │ │ It is safe to call pop_alerts from multiple different threads, as long as the │ │ │ │ │ alerts themselves are not accessed once another thread calls pop_alerts. Doing │ │ │ │ │ this requires manual synchronization between the popping threads. │ │ │ │ │ @@ -781,89 +845,25 @@ │ │ │ │ │ protocols used by _a_d_d___p_o_r_t___m_a_p_p_i_n_g_(_) │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ reopen_map_ports │ │ │ │ │ This option indicates if the ports are mapped using natpmp and upnp. If │ │ │ │ │ mapping was already made, they are deleted and added again. This only │ │ │ │ │ works if natpmp and/or upnp are configured to be enable. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ sseessssiioonn__ppaarraammss ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n___p_a_r_a_m_s_._h_p_p" │ │ │ │ │ -The _s_e_s_s_i_o_n___p_a_r_a_m_s is a parameters pack for configuring the _s_e_s_s_i_o_n before it's │ │ │ │ │ -started. │ │ │ │ │ -struct session_params │ │ │ │ │ -{ │ │ │ │ │ - sseessssiioonn__ppaarraammss (settings_pack&& sp); │ │ │ │ │ - sseessssiioonn__ppaarraammss (); │ │ │ │ │ - sseessssiioonn__ppaarraammss (settings_pack const& sp); │ │ │ │ │ - sseessssiioonn__ppaarraammss (settings_pack&& sp │ │ │ │ │ - , std::vector> exts); │ │ │ │ │ - sseessssiioonn__ppaarraammss (settings_pack const& sp │ │ │ │ │ - , std::vector> exts); │ │ │ │ │ - │ │ │ │ │ - settings_pack settings; │ │ │ │ │ - std::vector> extensions; │ │ │ │ │ - dht::dht_state dht_state; │ │ │ │ │ - dht::dht_storage_constructor_type dht_storage_constructor; │ │ │ │ │ - disk_io_constructor_type disk_io_constructor; │ │ │ │ │ - std::map ext_state; │ │ │ │ │ - libtorrent::ip_filter ip_filter; │ │ │ │ │ -}; │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** sseessssiioonn__ppaarraammss(()) ********** │ │ │ │ │ -sseessssiioonn__ppaarraammss (settings_pack&& sp); │ │ │ │ │ -sseessssiioonn__ppaarraammss (); │ │ │ │ │ -sseessssiioonn__ppaarraammss (settings_pack const& sp); │ │ │ │ │ -This constructor can be used to start with the default plugins (ut_metadata, │ │ │ │ │ -ut_pex and smart_ban). Pass a _s_e_t_t_i_n_g_s___p_a_c_k to set the initial settings when │ │ │ │ │ -the _s_e_s_s_i_o_n starts. │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** sseessssiioonn__ppaarraammss(()) ********** │ │ │ │ │ -sseessssiioonn__ppaarraammss (settings_pack&& sp │ │ │ │ │ - , std::vector> exts); │ │ │ │ │ -sseessssiioonn__ppaarraammss (settings_pack const& sp │ │ │ │ │ - , std::vector> exts); │ │ │ │ │ -This constructor helps to configure the set of initial plugins to be added to │ │ │ │ │ -the _s_e_s_s_i_o_n before it's started. │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ - settings │ │ │ │ │ - The settings to configure the _s_e_s_s_i_o_n with │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ - extensions │ │ │ │ │ - the plugins to add to the _s_e_s_s_i_o_n as it is constructed │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ - dht_state │ │ │ │ │ - DHT node ID and node addresses to bootstrap the DHT with. │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ - dht_storage_constructor │ │ │ │ │ - function object to construct the storage object for DHT items. │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ - disk_io_constructor │ │ │ │ │ - function object to create the disk I/O subsystem. Defaults to │ │ │ │ │ - default_disk_io_constructor. │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ - ext_state │ │ │ │ │ - this container can be used by extensions/plugins to store settings. It's │ │ │ │ │ - primarily here to make it convenient to save and restore state across │ │ │ │ │ - sessions, using _r_e_a_d___s_e_s_s_i_o_n___p_a_r_a_m_s_(_) and _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s_(_). │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ - ip_filter │ │ │ │ │ - the IP filter to use for the _s_e_s_s_i_o_n. This restricts which peers are │ │ │ │ │ - allowed to connect. As if passed to _s_e_t___i_p___f_i_l_t_e_r_(_). │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ wwrriittee__sseessssiioonn__ppaarraammss__bbuuff(()) rreeaadd__sseessssiioonn__ppaarraammss(()) wwrriittee__sseessssiioonn__ppaarraammss(()) │ │ │ │ │ +************ wwrriittee__sseessssiioonn__ppaarraammss__bbuuff(()) wwrriittee__sseessssiioonn__ppaarraammss(()) rreeaadd__sseessssiioonn__ppaarraammss(()) │ │ │ │ │ ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n___p_a_r_a_m_s_._h_p_p" │ │ │ │ │ -session_params rreeaadd__sseessssiioonn__ppaarraammss (span buf │ │ │ │ │ - , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ -entry wwrriittee__sseessssiioonn__ppaarraammss (session_params const& sp │ │ │ │ │ - , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ std::vector wwrriittee__sseessssiioonn__ppaarraammss__bbuuff (session_params const& sp │ │ │ │ │ , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ session_params rreeaadd__sseessssiioonn__ppaarraammss (bdecode_node const& e │ │ │ │ │ , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ +session_params rreeaadd__sseessssiioonn__ppaarraammss (span buf │ │ │ │ │ + , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ +entry wwrriittee__sseessssiioonn__ppaarraammss (session_params const& sp │ │ │ │ │ + , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ These functions serialize and de-serialize a session_params object to and from │ │ │ │ │ bencoded form. The _s_e_s_s_i_o_n___p_a_r_a_m_s object is used to initialize a new _s_e_s_s_i_o_n │ │ │ │ │ using the state from a previous one (or by programmatically configure the │ │ │ │ │ _s_e_s_s_i_o_n up-front). The flags parameter can be used to only save and load │ │ │ │ │ certain aspects of the session's state. The _buf suffix indicates the function │ │ │ │ │ operates on buffer rather than the bencoded structure. The torrents in a │ │ │ │ │ _s_e_s_s_i_o_n are not part of the _s_e_s_s_i_o_n___p_a_r_a_m_s state, they have to be restored │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Settings.html │ │ │ │ @@ -33,30 +33,30 @@ │ │ │ │

    Table of contents

    │ │ │ │ │ │ │ │
    │ │ │ │

    You have some control over session configuration through the session::apply_settings() │ │ │ │ member function. To change one or more configuration options, create a settings_pack │ │ │ │ object and fill it with the settings to be set and pass it in to session::apply_settings().

    │ │ │ │

    The settings_pack object is a collection of settings updates that are applied │ │ │ │ @@ -4598,17 +4598,17 @@ │ │ │ │

    │ │ │ │
    │ │ │ │  struct settings_pack final : settings_interface
    │ │ │ │  {
    │ │ │ │     friend  void apply_pack_impl (settings_pack const*
    │ │ │ │        , aux::session_settings_single_thread&
    │ │ │ │        , std::vector<void(aux::session_impl::*)()>*);
    │ │ │ │ +   void set_str (int name, std::string val) override;
    │ │ │ │     void set_bool (int name, bool val) override;
    │ │ │ │     void set_int (int name, int val) override;
    │ │ │ │ -   void set_str (int name, std::string val) override;
    │ │ │ │     void set_int (int name, flags::bitfield_flag<Type, Tag> const val);
    │ │ │ │     bool has_val (int name) const override;
    │ │ │ │     void clear ();
    │ │ │ │     void clear (int name);
    │ │ │ │     bool get_bool (int name) const override;
    │ │ │ │     int get_int (int name) const override;
    │ │ │ │     std::string const& get_str (int name) const override;
    │ │ │ │ @@ -4690,17 +4690,17 @@
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │

    set_str() set_bool() set_int()

    │ │ │ │
    │ │ │ │ +void set_str (int name, std::string val) override;
    │ │ │ │  void set_bool (int name, bool val) override;
    │ │ │ │  void set_int (int name, int val) override;
    │ │ │ │ -void set_str (int name, std::string val) override;
    │ │ │ │  void set_int (int name, flags::bitfield_flag<Type, Tag> const val);
    │ │ │ │  
    │ │ │ │

    set a configuration option in the settings_pack. name is one of │ │ │ │ the enum values from string_types, int_types or bool_types. They must │ │ │ │ match the respective type of the set_* function.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │ @@ -4721,19 +4721,19 @@ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    clear()

    │ │ │ │
    │ │ │ │  void clear (int name);
    │ │ │ │  
    │ │ │ │

    clear a specific setting from the pack

    │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    get_str() get_bool() get_int()

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    get_int() get_str() get_bool()

    │ │ │ │
    │ │ │ │  bool get_bool (int name) const override;
    │ │ │ │  int get_int (int name) const override;
    │ │ │ │  std::string const& get_str (int name) const override;
    │ │ │ │  
    │ │ │ │

    queries the current configuration option from the settings_pack. │ │ │ │ name is one of the enumeration values from string_types, int_types │ │ │ │ @@ -5096,23 +5096,42 @@ │ │ │ │ http_pw │ │ │ │ 5 │ │ │ │ The server is assumed to be an HTTP proxy that requires user │ │ │ │ authorization. The username and password will be sent to the proxy. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │
    │ │ │ │ -
    │ │ │ │ -

    min_memory_usage() high_performance_seed()

    │ │ │ │ +
    │ │ │ │ +

    setting_by_name() name_for_setting()

    │ │ │ │ +

    Declared in "libtorrent/settings_pack.hpp"

    │ │ │ │ +
    │ │ │ │ +int setting_by_name (string_view name);
    │ │ │ │ +char const* name_for_setting (int s);
    │ │ │ │ +
    │ │ │ │ +

    converts a setting integer (from the enums string_types, int_types or │ │ │ │ +bool_types) to a string, and vice versa.

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    default_settings()

    │ │ │ │ +

    Declared in "libtorrent/settings_pack.hpp"

    │ │ │ │ +
    │ │ │ │ +settings_pack default_settings ();
    │ │ │ │ +
    │ │ │ │ +

    returns a settings_pack with every setting set to its default value

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    high_performance_seed() min_memory_usage()

    │ │ │ │

    Declared in "libtorrent/session.hpp"

    │ │ │ │
    │ │ │ │ -settings_pack high_performance_seed ();
    │ │ │ │  settings_pack min_memory_usage ();
    │ │ │ │ +settings_pack high_performance_seed ();
    │ │ │ │  
    │ │ │ │

    The default values of the session settings are set for a regular │ │ │ │ bittorrent client running on a desktop system. There are functions that │ │ │ │ can set the session settings to pre set settings for other environments. │ │ │ │ These can be used for the basis, and should be tweaked to fit your needs │ │ │ │ better.

    │ │ │ │

    min_memory_usage returns settings that will use the minimal amount of │ │ │ │ @@ -5126,33 +5145,14 @@ │ │ │ │ pieces, instead of reading it all into memory before hashing.

    │ │ │ │

    This configuration is intended to be the starting point for embedded │ │ │ │ devices. It will significantly reduce memory usage.

    │ │ │ │

    high_performance_seed returns settings optimized for a seed box, │ │ │ │ serving many peers and that doesn't do any downloading. It has a 128 MB │ │ │ │ disk cache and has a limit of 400 files in its file pool. It support fast │ │ │ │ upload rates by allowing large send buffers.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    name_for_setting() setting_by_name()

    │ │ │ │ -

    Declared in "libtorrent/settings_pack.hpp"

    │ │ │ │ -
    │ │ │ │ -int setting_by_name (string_view name);
    │ │ │ │ -char const* name_for_setting (int s);
    │ │ │ │ -
    │ │ │ │ -

    converts a setting integer (from the enums string_types, int_types or │ │ │ │ -bool_types) to a string, and vice versa.

    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    default_settings()

    │ │ │ │ -

    Declared in "libtorrent/settings_pack.hpp"

    │ │ │ │ -
    │ │ │ │ -settings_pack default_settings ();
    │ │ │ │ -
    │ │ │ │ -

    returns a settings_pack with every setting set to its default value

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    generate_fingerprint()

    │ │ │ │

    Declared in "libtorrent/fingerprint.hpp"

    │ │ │ │
    │ │ │ │  std::string generate_fingerprint (std::string name
    │ │ │ │     , int major, int minor = 0, int revision = 0, int tag = 0);
    │ │ │ │ ├── html2text {}
    │ │ │ │ │ @@ -4,28 +4,28 @@
    │ │ │ │ │  _h_o_m_e
    │ │ │ │ │  Table of contents
    │ │ │ │ │      * _s_e_t_t_i_n_g_s___p_a_c_k
    │ │ │ │ │            o _s_e_t___s_t_r_(_)_ _s_e_t___b_o_o_l_(_)_ _s_e_t___i_n_t_(_)
    │ │ │ │ │            o _h_a_s___v_a_l_(_)
    │ │ │ │ │            o _c_l_e_a_r_(_)
    │ │ │ │ │            o _c_l_e_a_r_(_)
    │ │ │ │ │ -          o _g_e_t___s_t_r_(_)_ _g_e_t___b_o_o_l_(_)_ _g_e_t___i_n_t_(_)
    │ │ │ │ │ +          o _g_e_t___i_n_t_(_)_ _g_e_t___s_t_r_(_)_ _g_e_t___b_o_o_l_(_)
    │ │ │ │ │            o _e_n_u_m_ _t_y_p_e___b_a_s_e_s
    │ │ │ │ │            o _e_n_u_m_ _m_m_a_p___w_r_i_t_e___m_o_d_e___t
    │ │ │ │ │            o _e_n_u_m_ _s_u_g_g_e_s_t___m_o_d_e___t
    │ │ │ │ │            o _e_n_u_m_ _c_h_o_k_i_n_g___a_l_g_o_r_i_t_h_m___t
    │ │ │ │ │            o _e_n_u_m_ _s_e_e_d___c_h_o_k_i_n_g___a_l_g_o_r_i_t_h_m___t
    │ │ │ │ │            o _e_n_u_m_ _i_o___b_u_f_f_e_r___m_o_d_e___t
    │ │ │ │ │            o _e_n_u_m_ _b_a_n_d_w_i_d_t_h___m_i_x_e_d___a_l_g_o___t
    │ │ │ │ │            o _e_n_u_m_ _e_n_c___p_o_l_i_c_y
    │ │ │ │ │            o _e_n_u_m_ _e_n_c___l_e_v_e_l
    │ │ │ │ │            o _e_n_u_m_ _p_r_o_x_y___t_y_p_e___t
    │ │ │ │ │ -    * _m_i_n___m_e_m_o_r_y___u_s_a_g_e_(_)_ _h_i_g_h___p_e_r_f_o_r_m_a_n_c_e___s_e_e_d_(_)
    │ │ │ │ │ -    * _n_a_m_e___f_o_r___s_e_t_t_i_n_g_(_)_ _s_e_t_t_i_n_g___b_y___n_a_m_e_(_)
    │ │ │ │ │ +    * _s_e_t_t_i_n_g___b_y___n_a_m_e_(_)_ _n_a_m_e___f_o_r___s_e_t_t_i_n_g_(_)
    │ │ │ │ │      * _d_e_f_a_u_l_t___s_e_t_t_i_n_g_s_(_)
    │ │ │ │ │ +    * _h_i_g_h___p_e_r_f_o_r_m_a_n_c_e___s_e_e_d_(_)_ _m_i_n___m_e_m_o_r_y___u_s_a_g_e_(_)
    │ │ │ │ │      * _g_e_n_e_r_a_t_e___f_i_n_g_e_r_p_r_i_n_t_(_)
    │ │ │ │ │  You have some control over _s_e_s_s_i_o_n configuration through the session::
    │ │ │ │ │  apply_settings() member function. To change one or more configuration options,
    │ │ │ │ │  create a _s_e_t_t_i_n_g_s___p_a_c_k object and fill it with the settings to be set and pass
    │ │ │ │ │  it in to session::apply_settings().
    │ │ │ │ │  The _s_e_t_t_i_n_g_s___p_a_c_k object is a collection of settings updates that are applied
    │ │ │ │ │  to the _s_e_s_s_i_o_n when passed to session::apply_settings(). It's empty when
    │ │ │ │ │ @@ -1435,17 +1435,17 @@
    │ │ │ │ │  connect to the external NAT-PMP port (configured using announce_port) instead
    │ │ │ │ │  of the actual local listening port.
    │ │ │ │ │  struct settings_pack final : settings_interface
    │ │ │ │ │  {
    │ │ │ │ │     friend  void aappppllyy__ppaacckk__iimmppll (settings_pack const*
    │ │ │ │ │        , aux::session_settings_single_thread&
    │ │ │ │ │        , std::vector*);
    │ │ │ │ │ +   void sseett__ssttrr (int name, std::string val) override;
    │ │ │ │ │     void sseett__bbooooll (int name, bool val) override;
    │ │ │ │ │     void sseett__iinntt (int name, int val) override;
    │ │ │ │ │ -   void sseett__ssttrr (int name, std::string val) override;
    │ │ │ │ │     void sseett__iinntt (int name, flags::bitfield_flag const val);
    │ │ │ │ │     bool hhaass__vvaall (int name) const override;
    │ │ │ │ │     void cclleeaarr ();
    │ │ │ │ │     void cclleeaarr (int name);
    │ │ │ │ │     bool ggeett__bbooooll (int name) const override;
    │ │ │ │ │     int ggeett__iinntt (int name) const override;
    │ │ │ │ │     std::string const& ggeett__ssttrr (int name) const override;
    │ │ │ │ │ @@ -1523,17 +1523,17 @@
    │ │ │ │ │        socks5_pw,
    │ │ │ │ │        http,
    │ │ │ │ │        http_pw,
    │ │ │ │ │     };
    │ │ │ │ │  };
    │ │ │ │ │  [_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │  ********** sseett__ssttrr(()) sseett__bbooooll(()) sseett__iinntt(()) **********
    │ │ │ │ │ +void sseett__ssttrr (int name, std::string val) override;
    │ │ │ │ │  void sseett__bbooooll (int name, bool val) override;
    │ │ │ │ │  void sseett__iinntt (int name, int val) override;
    │ │ │ │ │ -void sseett__ssttrr (int name, std::string val) override;
    │ │ │ │ │  void sseett__iinntt (int name, flags::bitfield_flag const val);
    │ │ │ │ │  set a configuration option in the _s_e_t_t_i_n_g_s___p_a_c_k. name is one of the enum values
    │ │ │ │ │  from string_types, int_types or bool_types. They must match the respective type
    │ │ │ │ │  of the set_* function.
    │ │ │ │ │  [_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │  ********** hhaass__vvaall(()) **********
    │ │ │ │ │  bool hhaass__vvaall (int name) const override;
    │ │ │ │ │ @@ -1545,15 +1545,15 @@
    │ │ │ │ │  void cclleeaarr ();
    │ │ │ │ │  clear the settings pack from all settings
    │ │ │ │ │  [_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │  ********** cclleeaarr(()) **********
    │ │ │ │ │  void cclleeaarr (int name);
    │ │ │ │ │  clear a specific setting from the pack
    │ │ │ │ │  [_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │ -********** ggeett__ssttrr(()) ggeett__bbooooll(()) ggeett__iinntt(()) **********
    │ │ │ │ │ +********** ggeett__iinntt(()) ggeett__ssttrr(()) ggeett__bbooooll(()) **********
    │ │ │ │ │  bool ggeett__bbooooll (int name) const override;
    │ │ │ │ │  int ggeett__iinntt (int name) const override;
    │ │ │ │ │  std::string const& ggeett__ssttrr (int name) const override;
    │ │ │ │ │  queries the current configuration option from the _s_e_t_t_i_n_g_s___p_a_c_k. name is one of
    │ │ │ │ │  the enumeration values from string_types, int_types or bool_types. The enum
    │ │ │ │ │  value must match the type of the get_* function. If the specified setting field
    │ │ │ │ │  has not been set, the default value is returned.
    │ │ │ │ │ @@ -1683,18 +1683,30 @@
    │ │ │ │ │  |         |     |trackers, a plain proxy will suffice. The proxy is assumed to|
    │ │ │ │ │  |         |     |not require authorization. The username and password will not|
    │ │ │ │ │  |_ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _|_b_e_ _u_s_e_d_._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
    │ │ │ │ │  |         |     |The server is assumed to be an HTTP proxy that requires user |
    │ │ │ │ │  |http_pw  |5    |authorization. The username and password will be sent to the |
    │ │ │ │ │  |_ _ _ _ _ _ _ _ _ _|_ _ _ _ _ _|_p_r_o_x_y_._ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ |
    │ │ │ │ │  [_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │ -************ mmiinn__mmeemmoorryy__uussaaggee(()) hhiigghh__ppeerrffoorrmmaannccee__sseeeedd(()) ************
    │ │ │ │ │ +************ sseettttiinngg__bbyy__nnaammee(()) nnaammee__ffoorr__sseettttiinngg(()) ************
    │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_t_t_i_n_g_s___p_a_c_k_._h_p_p"
    │ │ │ │ │ +int sseettttiinngg__bbyy__nnaammee (string_view name);
    │ │ │ │ │ +char const* nnaammee__ffoorr__sseettttiinngg (int s);
    │ │ │ │ │ +converts a setting integer (from the enums string_types, int_types or
    │ │ │ │ │ +bool_types) to a string, and vice versa.
    │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │ +************ ddeeffaauulltt__sseettttiinnggss(()) ************
    │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_t_t_i_n_g_s___p_a_c_k_._h_p_p"
    │ │ │ │ │ +settings_pack ddeeffaauulltt__sseettttiinnggss ();
    │ │ │ │ │ +returns a _s_e_t_t_i_n_g_s___p_a_c_k with every setting set to its default value
    │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │ +************ hhiigghh__ppeerrffoorrmmaannccee__sseeeedd(()) mmiinn__mmeemmoorryy__uussaaggee(()) ************
    │ │ │ │ │  Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n_._h_p_p"
    │ │ │ │ │ -settings_pack hhiigghh__ppeerrffoorrmmaannccee__sseeeedd ();
    │ │ │ │ │  settings_pack mmiinn__mmeemmoorryy__uussaaggee ();
    │ │ │ │ │ +settings_pack hhiigghh__ppeerrffoorrmmaannccee__sseeeedd ();
    │ │ │ │ │  The default values of the _s_e_s_s_i_o_n settings are set for a regular bittorrent
    │ │ │ │ │  client running on a desktop system. There are functions that can set the
    │ │ │ │ │  _s_e_s_s_i_o_n settings to pre set settings for other environments. These can be used
    │ │ │ │ │  for the basis, and should be tweaked to fit your needs better.
    │ │ │ │ │  min_memory_usage returns settings that will use the minimal amount of RAM, at
    │ │ │ │ │  the potential expense of upload and download performance. It adjusts the socket
    │ │ │ │ │  buffer sizes, disables the disk cache, lowers the send buffer watermarks so
    │ │ │ │ │ @@ -1707,26 +1719,14 @@
    │ │ │ │ │  This configuration is intended to be the starting point for embedded devices.
    │ │ │ │ │  It will significantly reduce memory usage.
    │ │ │ │ │  high_performance_seed returns settings optimized for a seed box, serving many
    │ │ │ │ │  peers and that doesn't do any downloading. It has a 128 MB disk cache and has a
    │ │ │ │ │  limit of 400 files in its file pool. It support fast upload rates by allowing
    │ │ │ │ │  large send buffers.
    │ │ │ │ │  [_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │ -************ nnaammee__ffoorr__sseettttiinngg(()) sseettttiinngg__bbyy__nnaammee(()) ************
    │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_t_t_i_n_g_s___p_a_c_k_._h_p_p"
    │ │ │ │ │ -int sseettttiinngg__bbyy__nnaammee (string_view name);
    │ │ │ │ │ -char const* nnaammee__ffoorr__sseettttiinngg (int s);
    │ │ │ │ │ -converts a setting integer (from the enums string_types, int_types or
    │ │ │ │ │ -bool_types) to a string, and vice versa.
    │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │ -************ ddeeffaauulltt__sseettttiinnggss(()) ************
    │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_t_t_i_n_g_s___p_a_c_k_._h_p_p"
    │ │ │ │ │ -settings_pack ddeeffaauulltt__sseettttiinnggss ();
    │ │ │ │ │ -returns a _s_e_t_t_i_n_g_s___p_a_c_k with every setting set to its default value
    │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │  ************ ggeenneerraattee__ffiinnggeerrpprriinntt(()) ************
    │ │ │ │ │  Declared in "_l_i_b_t_o_r_r_e_n_t_/_f_i_n_g_e_r_p_r_i_n_t_._h_p_p"
    │ │ │ │ │  std::string ggeenneerraattee__ffiinnggeerrpprriinntt (std::string name
    │ │ │ │ │     , int major, int minor = 0, int revision = 0, int tag = 0);
    │ │ │ │ │  This is a utility function to produce a client ID fingerprint formatted to the
    │ │ │ │ │  most common convention. The fingerprint can be set via the peer_fingerprint
    │ │ │ │ │  setting, in _s_e_t_t_i_n_g_s___p_a_c_k.
    │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Stats.html
    │ │ │ │┄ Ordering differences only
    │ │ │ │ @@ -49,16 +49,16 @@
    │ │ │ │  struct counters
    │ │ │ │  {
    │ │ │ │     counters () ;
    │ │ │ │     counters& operator= (counters const&) & ;
    │ │ │ │     counters (counters const&) ;
    │ │ │ │     std::int64_t operator[] (int i) const ;
    │ │ │ │     std::int64_t inc_stats_counter (int c, std::int64_t value = 1) ;
    │ │ │ │ -   void set_value (int c, std::int64_t value) ;
    │ │ │ │     void blend_stats_counter (int c, std::int64_t value, int ratio) ;
    │ │ │ │ +   void set_value (int c, std::int64_t value) ;
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │

    operator[]() inc_stats_counter()

    │ │ │ │
    │ │ │ │  std::int64_t operator[] (int i) const ;
    │ │ │ │ ├── html2text {}
    │ │ │ │ │ @@ -15,16 +15,16 @@
    │ │ │ │ │  struct counters
    │ │ │ │ │  {
    │ │ │ │ │     ccoouunntteerrss () ;
    │ │ │ │ │     counters& ooppeerraattoorr== (counters const&) & ;
    │ │ │ │ │     ccoouunntteerrss (counters const&) ;
    │ │ │ │ │     std::int64_t ooppeerraattoorr[[]] (int i) const ;
    │ │ │ │ │     std::int64_t iinncc__ssttaattss__ccoouunntteerr (int c, std::int64_t value = 1) ;
    │ │ │ │ │ -   void sseett__vvaalluuee (int c, std::int64_t value) ;
    │ │ │ │ │     void bblleenndd__ssttaattss__ccoouunntteerr (int c, std::int64_t value, int ratio) ;
    │ │ │ │ │ +   void sseett__vvaalluuee (int c, std::int64_t value) ;
    │ │ │ │ │  };
    │ │ │ │ │  [_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ │ │  ********** ooppeerraattoorr[[]](()) iinncc__ssttaattss__ccoouunntteerr(()) **********
    │ │ │ │ │  std::int64_t ooppeerraattoorr[[]] (int i) const ;
    │ │ │ │ │  std::int64_t iinncc__ssttaattss__ccoouunntteerr (int c, std::int64_t value = 1) ;
    │ │ │ │ │  returns the new value
    │ │ │ │ │  [_r_e_p_o_r_t_ _i_s_s_u_e]
    │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Storage.html
    │ │ │ │ @@ -50,35 +50,35 @@
    │ │ │ │  
  • last_piece()
  • │ │ │ │
  • piece_range()
  • │ │ │ │
  • piece_length() set_piece_length()
  • │ │ │ │
  • piece_size()
  • │ │ │ │
  • piece_size2()
  • │ │ │ │
  • blocks_in_piece2()
  • │ │ │ │
  • blocks_per_piece()
  • │ │ │ │ -
  • name() set_name()
  • │ │ │ │ +
  • set_name() name()
  • │ │ │ │
  • swap()
  • │ │ │ │
  • canonicalize()
  • │ │ │ │ -
  • file_offset() pad_file_at() file_path() hash() root_ptr() file_name() file_size() mtime() root() symlink()
  • │ │ │ │ -
  • file_num_pieces() file_piece_range() file_num_blocks()
  • │ │ │ │ +
  • file_offset() root_ptr() symlink() file_size() file_name() file_path() root() pad_file_at() hash() mtime()
  • │ │ │ │ +
  • file_piece_range() file_num_blocks() file_num_pieces()
  • │ │ │ │
  • file_first_piece_node() file_first_block_node()
  • │ │ │ │
  • file_path_hash()
  • │ │ │ │
  • all_path_hashes()
  • │ │ │ │
  • file_flags()
  • │ │ │ │
  • file_absolute_path()
  • │ │ │ │
  • file_index_at_piece() file_index_at_offset()
  • │ │ │ │
  • file_index_for_root()
  • │ │ │ │
  • piece_index_at_file()
  • │ │ │ │
  • sanitize_symlinks()
  • │ │ │ │
  • v2()
  • │ │ │ │ │ │ │ │ │ │ │ │ -
  • default_disk_io_constructor()
  • │ │ │ │ -
  • disabled_disk_io_constructor()
  • │ │ │ │ -
  • posix_disk_io_constructor()
  • │ │ │ │ -
  • mmap_disk_io_constructor()
  • │ │ │ │ +
  • mmap_disk_io_constructor()
  • │ │ │ │ +
  • default_disk_io_constructor()
  • │ │ │ │ +
  • disabled_disk_io_constructor()
  • │ │ │ │ +
  • posix_disk_io_constructor()
  • │ │ │ │
  • enum storage_mode_t
  • │ │ │ │
  • enum status_t
  • │ │ │ │
  • enum move_flags_t
  • │ │ │ │ │ │ │ │
    │ │ │ │ [report issue]
    │ │ │ │

    storage_params

    │ │ │ │ @@ -139,76 +139,76 @@ │ │ │ │ size. Everything necessary to interpret a regular bittorrent storage │ │ │ │ file structure.

    │ │ │ │
    │ │ │ │  class file_storage
    │ │ │ │  {
    │ │ │ │     bool is_valid () const;
    │ │ │ │     void reserve (int num_files);
    │ │ │ │ -   void add_file_borrow (string_view filename
    │ │ │ │ -      , std::string const& path, std::int64_t file_size
    │ │ │ │ -      , file_flags_t file_flags = {}, char const* filehash = nullptr
    │ │ │ │ -      , std::int64_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │ +   void add_file (std::string const& path, std::int64_t file_size
    │ │ │ │ +      , file_flags_t file_flags = {}
    │ │ │ │ +      , std::time_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │        , char const* root_hash = nullptr);
    │ │ │ │     void add_file (error_code& ec, std::string const& path, std::int64_t file_size
    │ │ │ │        , file_flags_t file_flags = {}
    │ │ │ │        , std::time_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │        , char const* root_hash = nullptr);
    │ │ │ │     void add_file_borrow (error_code& ec, string_view filename
    │ │ │ │        , std::string const& path, std::int64_t file_size
    │ │ │ │        , file_flags_t file_flags = {}, char const* filehash = nullptr
    │ │ │ │        , std::int64_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │        , char const* root_hash = nullptr);
    │ │ │ │ -   void add_file (std::string const& path, std::int64_t file_size
    │ │ │ │ -      , file_flags_t file_flags = {}
    │ │ │ │ -      , std::time_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │ +   void add_file_borrow (string_view filename
    │ │ │ │ +      , std::string const& path, std::int64_t file_size
    │ │ │ │ +      , file_flags_t file_flags = {}, char const* filehash = nullptr
    │ │ │ │ +      , std::int64_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │        , char const* root_hash = nullptr);
    │ │ │ │     void rename_file (file_index_t index, std::string const& new_filename);
    │ │ │ │     std::vector<file_slice> map_block (piece_index_t piece, std::int64_t offset
    │ │ │ │        , std::int64_t size) const;
    │ │ │ │     peer_request map_file (file_index_t file, std::int64_t offset, int size) const;
    │ │ │ │     int num_files () const noexcept;
    │ │ │ │     file_index_t end_file () const noexcept;
    │ │ │ │     index_range<file_index_t> file_range () const noexcept;
    │ │ │ │     std::int64_t total_size () const;
    │ │ │ │ -   int num_pieces () const;
    │ │ │ │     void set_num_pieces (int n);
    │ │ │ │ +   int num_pieces () const;
    │ │ │ │     piece_index_t end_piece () const;
    │ │ │ │     piece_index_t last_piece () const;
    │ │ │ │     index_range<piece_index_t> piece_range () const noexcept;
    │ │ │ │     int piece_length () const;
    │ │ │ │     void set_piece_length (int l);
    │ │ │ │     int piece_size (piece_index_t index) const;
    │ │ │ │     int piece_size2 (piece_index_t index) const;
    │ │ │ │     int blocks_in_piece2 (piece_index_t index) const;
    │ │ │ │     int blocks_per_piece () const;
    │ │ │ │ -   std::string const& name () const;
    │ │ │ │     void set_name (std::string const& n);
    │ │ │ │ +   std::string const& name () const;
    │ │ │ │     void swap (file_storage& ti) noexcept;
    │ │ │ │     void canonicalize ();
    │ │ │ │ -   std::int64_t file_offset (file_index_t index) const;
    │ │ │ │ -   char const* root_ptr (file_index_t const index) const;
    │ │ │ │ -   sha1_hash hash (file_index_t index) const;
    │ │ │ │ +   std::string file_path (file_index_t index, std::string const& save_path = "") const;
    │ │ │ │     bool pad_file_at (file_index_t index) const;
    │ │ │ │ +   sha1_hash hash (file_index_t index) const;
    │ │ │ │ +   std::int64_t file_offset (file_index_t index) const;
    │ │ │ │ +   std::time_t mtime (file_index_t index) const;
    │ │ │ │     std::string symlink (file_index_t index) const;
    │ │ │ │ +   string_view file_name (file_index_t index) const;
    │ │ │ │     sha256_hash root (file_index_t index) const;
    │ │ │ │ +   char const* root_ptr (file_index_t const index) const;
    │ │ │ │     std::int64_t file_size (file_index_t index) const;
    │ │ │ │ -   std::string file_path (file_index_t index, std::string const& save_path = "") const;
    │ │ │ │ -   string_view file_name (file_index_t index) const;
    │ │ │ │ -   std::time_t mtime (file_index_t index) const;
    │ │ │ │     index_range<piece_index_t::diff_type> file_piece_range (file_index_t) const;
    │ │ │ │     int file_num_blocks (file_index_t index) const;
    │ │ │ │     int file_num_pieces (file_index_t index) const;
    │ │ │ │     int file_first_piece_node (file_index_t index) const;
    │ │ │ │     int file_first_block_node (file_index_t index) const;
    │ │ │ │     std::uint32_t file_path_hash (file_index_t index, std::string const& save_path) const;
    │ │ │ │     void all_path_hashes (std::unordered_set<std::uint32_t>& table) const;
    │ │ │ │     file_flags_t file_flags (file_index_t index) const;
    │ │ │ │     bool file_absolute_path (file_index_t index) const;
    │ │ │ │ -   file_index_t file_index_at_piece (piece_index_t piece) const;
    │ │ │ │     file_index_t file_index_at_offset (std::int64_t offset) const;
    │ │ │ │ +   file_index_t file_index_at_piece (piece_index_t piece) const;
    │ │ │ │     file_index_t file_index_for_root (sha256_hash const& root_hash) const;
    │ │ │ │     piece_index_t piece_index_at_file (file_index_t f) const;
    │ │ │ │     void sanitize_symlinks ();
    │ │ │ │     bool v2 () const;
    │ │ │ │  
    │ │ │ │     static constexpr file_flags_t flag_pad_file  = 0_bit;
    │ │ │ │     static constexpr file_flags_t flag_hidden  = 1_bit;
    │ │ │ │ @@ -235,31 +235,31 @@
    │ │ │ │  be used to avoid reallocating the internal file list when the number
    │ │ │ │  of files to be added is known up-front.

    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    add_file_borrow() add_file()

    │ │ │ │
    │ │ │ │ -void add_file_borrow (string_view filename
    │ │ │ │ -      , std::string const& path, std::int64_t file_size
    │ │ │ │ -      , file_flags_t file_flags = {}, char const* filehash = nullptr
    │ │ │ │ -      , std::int64_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │ +void add_file (std::string const& path, std::int64_t file_size
    │ │ │ │ +      , file_flags_t file_flags = {}
    │ │ │ │ +      , std::time_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │        , char const* root_hash = nullptr);
    │ │ │ │  void add_file (error_code& ec, std::string const& path, std::int64_t file_size
    │ │ │ │        , file_flags_t file_flags = {}
    │ │ │ │        , std::time_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │        , char const* root_hash = nullptr);
    │ │ │ │  void add_file_borrow (error_code& ec, string_view filename
    │ │ │ │        , std::string const& path, std::int64_t file_size
    │ │ │ │        , file_flags_t file_flags = {}, char const* filehash = nullptr
    │ │ │ │        , std::int64_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │        , char const* root_hash = nullptr);
    │ │ │ │ -void add_file (std::string const& path, std::int64_t file_size
    │ │ │ │ -      , file_flags_t file_flags = {}
    │ │ │ │ -      , std::time_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │ +void add_file_borrow (string_view filename
    │ │ │ │ +      , std::string const& path, std::int64_t file_size
    │ │ │ │ +      , file_flags_t file_flags = {}, char const* filehash = nullptr
    │ │ │ │ +      , std::int64_t mtime = 0, string_view symlink_path = string_view()
    │ │ │ │        , char const* root_hash = nullptr);
    │ │ │ │  
    │ │ │ │

    Adds a file to the file storage. The add_file_borrow version │ │ │ │ expects that filename is the file name (without a path) of │ │ │ │ the file that's being added. │ │ │ │ This memory is borrowed, i.e. it is the caller's │ │ │ │ responsibility to make sure it stays valid throughout the lifetime │ │ │ │ @@ -310,29 +310,29 @@ │ │ │ │

    map_block()

    │ │ │ │
    │ │ │ │  std::vector<file_slice> map_block (piece_index_t piece, std::int64_t offset
    │ │ │ │        , std::int64_t size) const;
    │ │ │ │  
    │ │ │ │

    returns a list of file_slice objects representing the portions of │ │ │ │ files the specified piece index, byte offset and size range overlaps. │ │ │ │ -this is the inverse mapping of map_file().

    │ │ │ │ +this is the inverse mapping of map_file().

    │ │ │ │

    Preconditions of this function is that the input range is within the │ │ │ │ torrents address space. piece may not be negative and

    │ │ │ │
    │ │ │ │ piece * piece_size + offset + size
    │ │ │ │

    may not exceed the total size of the torrent.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    map_file()

    │ │ │ │
    │ │ │ │  peer_request map_file (file_index_t file, std::int64_t offset, int size) const;
    │ │ │ │  
    │ │ │ │

    returns a peer_request representing the piece index, byte offset │ │ │ │ and size the specified file range overlaps. This is the inverse │ │ │ │ -mapping over map_block(). Note that the peer_request return type │ │ │ │ +mapping over map_block(). Note that the peer_request return type │ │ │ │ is meant to hold bittorrent block requests, which may not be larger │ │ │ │ than 16 kiB. Mapping a range larger than that may return an overflown │ │ │ │ integer.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    num_files()

    │ │ │ │
    │ │ │ │ @@ -363,16 +363,16 @@
    │ │ │ │  
    │ │ │ │

    returns the total number of bytes all the files in this torrent spans

    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    num_pieces() set_num_pieces()

    │ │ │ │
    │ │ │ │ -int num_pieces () const;
    │ │ │ │  void set_num_pieces (int n);
    │ │ │ │ +int num_pieces () const;
    │ │ │ │  
    │ │ │ │

    set and get the number of pieces in the torrent

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    end_piece()

    │ │ │ │
    │ │ │ │  piece_index_t end_piece () const;
    │ │ │ │ @@ -408,15 +408,15 @@
    │ │ │ │  and at least 16 kiB.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    piece_size()

    │ │ │ │
    │ │ │ │  int piece_size (piece_index_t index) const;
    │ │ │ │  
    │ │ │ │ -

    returns the piece size of index. This will be the same as piece_length(), except │ │ │ │ +

    returns the piece size of index. This will be the same as piece_length(), except │ │ │ │ for the last piece, which may be shorter.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    piece_size2()

    │ │ │ │
    │ │ │ │  int piece_size2 (piece_index_t index) const;
    │ │ │ │  
    │ │ │ │ @@ -435,21 +435,21 @@ │ │ │ │
    │ │ │ │

    blocks_per_piece()

    │ │ │ │
    │ │ │ │  int blocks_per_piece () const;
    │ │ │ │  
    │ │ │ │

    returns the number of blocks there are in the typical piece. There │ │ │ │ may be fewer in the last piece)

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    name() set_name()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    set_name() name()

    │ │ │ │
    │ │ │ │ -std::string const& name () const;
    │ │ │ │  void set_name (std::string const& n);
    │ │ │ │ +std::string const& name () const;
    │ │ │ │  
    │ │ │ │

    set and get the name of this torrent. For multi-file torrents, this is also │ │ │ │ the name of the root directory all the files are stored in.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    swap()

    │ │ │ │
    │ │ │ │ @@ -461,36 +461,36 @@
    │ │ │ │  

    canonicalize()

    │ │ │ │
    │ │ │ │  void canonicalize ();
    │ │ │ │  
    │ │ │ │

    arrange files and padding to match the canonical form required │ │ │ │ by BEP 52

    │ │ │ │ │ │ │ │ - │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ + │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ - │ │ │ │ + │ │ │ │ -
    │ │ │ │ -

    file_num_pieces() file_piece_range() file_num_blocks()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    file_piece_range() file_num_blocks() file_num_pieces()

    │ │ │ │
    │ │ │ │  index_range<piece_index_t::diff_type> file_piece_range (file_index_t) const;
    │ │ │ │  int file_num_blocks (file_index_t index) const;
    │ │ │ │  int file_num_pieces (file_index_t index) const;
    │ │ │ │  
    │ │ │ │

    Returns the number of pieces or blocks the file at index spans, │ │ │ │ under the assumption that the file is aligned to the start of a piece. │ │ │ │ @@ -574,16 +574,16 @@ │ │ │ │ have an absolute path, i.e. is not anchored in the save path of the │ │ │ │ torrent.

    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    file_index_at_piece() file_index_at_offset()

    │ │ │ │
    │ │ │ │ -file_index_t file_index_at_piece (piece_index_t piece) const;
    │ │ │ │  file_index_t file_index_at_offset (std::int64_t offset) const;
    │ │ │ │ +file_index_t file_index_at_piece (piece_index_t piece) const;
    │ │ │ │  
    │ │ │ │

    returns the index of the file at the given offset in the torrent

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    file_index_for_root()

    │ │ │ │
    │ │ │ │  file_index_t file_index_for_root (sha256_hash const& root_hash) const;
    │ │ │ │ @@ -629,16 +629,25 @@
    │ │ │ │  
    this file has the executable attribute set.
    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    flag_symlink
    │ │ │ │
    this file is a symbolic link. It should have a link │ │ │ │ target string associated with it.
    │ │ │ │
    │ │ │ │ -[report issue]
    │ │ │ │ +[report issue]
    │ │ │ │
    │ │ │ │ +
    │ │ │ │ +

    mmap_disk_io_constructor()

    │ │ │ │ +

    Declared in "libtorrent/mmap_disk_io.hpp"

    │ │ │ │ +
    │ │ │ │ +std::unique_ptr<disk_interface> mmap_disk_io_constructor (
    │ │ │ │ +   io_context& ios, settings_interface const&, counters& cnt);
    │ │ │ │ +
    │ │ │ │ +

    constructs a memory mapped file disk I/O object.

    │ │ │ │ +[report issue]
    │ │ │ │
    │ │ │ │

    default_disk_io_constructor()

    │ │ │ │

    Declared in "libtorrent/session.hpp"

    │ │ │ │
    │ │ │ │  std::unique_ptr<disk_interface> default_disk_io_constructor (
    │ │ │ │     io_context& ios, settings_interface const&, counters& cnt);
    │ │ │ │  
    │ │ │ │ @@ -663,23 +672,14 @@ │ │ │ │
    │ │ │ │  std::unique_ptr<disk_interface> posix_disk_io_constructor (
    │ │ │ │     io_context& ios, settings_interface const&, counters& cnt);
    │ │ │ │  
    │ │ │ │

    this is a simple posix disk I/O back-end, used for systems that don't │ │ │ │ have a 64 bit virtual address space or don't support memory mapped files. │ │ │ │ It's implemented using portable C file functions and is single-threaded.

    │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    mmap_disk_io_constructor()

    │ │ │ │ -

    Declared in "libtorrent/mmap_disk_io.hpp"

    │ │ │ │ -
    │ │ │ │ -std::unique_ptr<disk_interface> mmap_disk_io_constructor (
    │ │ │ │ -   io_context& ios, settings_interface const&, counters& cnt);
    │ │ │ │ -
    │ │ │ │ -

    constructs a memory mapped file disk I/O object.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    enum storage_mode_t

    │ │ │ │

    Declared in "libtorrent/storage_defs.hpp"

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -21,34 +21,34 @@ │ │ │ │ │ o _l_a_s_t___p_i_e_c_e_(_) │ │ │ │ │ o _p_i_e_c_e___r_a_n_g_e_(_) │ │ │ │ │ o _p_i_e_c_e___l_e_n_g_t_h_(_)_ _s_e_t___p_i_e_c_e___l_e_n_g_t_h_(_) │ │ │ │ │ o _p_i_e_c_e___s_i_z_e_(_) │ │ │ │ │ o _p_i_e_c_e___s_i_z_e_2_(_) │ │ │ │ │ o _b_l_o_c_k_s___i_n___p_i_e_c_e_2_(_) │ │ │ │ │ o _b_l_o_c_k_s___p_e_r___p_i_e_c_e_(_) │ │ │ │ │ - o _n_a_m_e_(_)_ _s_e_t___n_a_m_e_(_) │ │ │ │ │ + o _s_e_t___n_a_m_e_(_)_ _n_a_m_e_(_) │ │ │ │ │ o _s_w_a_p_(_) │ │ │ │ │ o _c_a_n_o_n_i_c_a_l_i_z_e_(_) │ │ │ │ │ - o _f_i_l_e___o_f_f_s_e_t_(_)_ _p_a_d___f_i_l_e___a_t_(_)_ _f_i_l_e___p_a_t_h_(_)_ _h_a_s_h_(_)_ _r_o_o_t___p_t_r_(_)_ _f_i_l_e___n_a_m_e │ │ │ │ │ - _(_)_ _f_i_l_e___s_i_z_e_(_)_ _m_t_i_m_e_(_)_ _r_o_o_t_(_)_ _s_y_m_l_i_n_k_(_) │ │ │ │ │ - o _f_i_l_e___n_u_m___p_i_e_c_e_s_(_)_ _f_i_l_e___p_i_e_c_e___r_a_n_g_e_(_)_ _f_i_l_e___n_u_m___b_l_o_c_k_s_(_) │ │ │ │ │ + o _f_i_l_e___o_f_f_s_e_t_(_)_ _r_o_o_t___p_t_r_(_)_ _s_y_m_l_i_n_k_(_)_ _f_i_l_e___s_i_z_e_(_)_ _f_i_l_e___n_a_m_e_(_) │ │ │ │ │ + _f_i_l_e___p_a_t_h_(_)_ _r_o_o_t_(_)_ _p_a_d___f_i_l_e___a_t_(_)_ _h_a_s_h_(_)_ _m_t_i_m_e_(_) │ │ │ │ │ + o _f_i_l_e___p_i_e_c_e___r_a_n_g_e_(_)_ _f_i_l_e___n_u_m___b_l_o_c_k_s_(_)_ _f_i_l_e___n_u_m___p_i_e_c_e_s_(_) │ │ │ │ │ o _f_i_l_e___f_i_r_s_t___p_i_e_c_e___n_o_d_e_(_)_ _f_i_l_e___f_i_r_s_t___b_l_o_c_k___n_o_d_e_(_) │ │ │ │ │ o _f_i_l_e___p_a_t_h___h_a_s_h_(_) │ │ │ │ │ o _a_l_l___p_a_t_h___h_a_s_h_e_s_(_) │ │ │ │ │ o _f_i_l_e___f_l_a_g_s_(_) │ │ │ │ │ o _f_i_l_e___a_b_s_o_l_u_t_e___p_a_t_h_(_) │ │ │ │ │ o _f_i_l_e___i_n_d_e_x___a_t___p_i_e_c_e_(_)_ _f_i_l_e___i_n_d_e_x___a_t___o_f_f_s_e_t_(_) │ │ │ │ │ o _f_i_l_e___i_n_d_e_x___f_o_r___r_o_o_t_(_) │ │ │ │ │ o _p_i_e_c_e___i_n_d_e_x___a_t___f_i_l_e_(_) │ │ │ │ │ o _s_a_n_i_t_i_z_e___s_y_m_l_i_n_k_s_(_) │ │ │ │ │ o _v_2_(_) │ │ │ │ │ + * _m_m_a_p___d_i_s_k___i_o___c_o_n_s_t_r_u_c_t_o_r_(_) │ │ │ │ │ * _d_e_f_a_u_l_t___d_i_s_k___i_o___c_o_n_s_t_r_u_c_t_o_r_(_) │ │ │ │ │ * _d_i_s_a_b_l_e_d___d_i_s_k___i_o___c_o_n_s_t_r_u_c_t_o_r_(_) │ │ │ │ │ * _p_o_s_i_x___d_i_s_k___i_o___c_o_n_s_t_r_u_c_t_o_r_(_) │ │ │ │ │ - * _m_m_a_p___d_i_s_k___i_o___c_o_n_s_t_r_u_c_t_o_r_(_) │ │ │ │ │ * _e_n_u_m_ _s_t_o_r_a_g_e___m_o_d_e___t │ │ │ │ │ * _e_n_u_m_ _s_t_a_t_u_s___t │ │ │ │ │ * _e_n_u_m_ _m_o_v_e___f_l_a_g_s___t │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ssttoorraaggee__ppaarraammss ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_t_o_r_a_g_e___d_e_f_s_._h_p_p" │ │ │ │ │ a parameter pack used to construct the storage for a torrent, used in │ │ │ │ │ @@ -96,80 +96,80 @@ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_f_i_l_e___s_t_o_r_a_g_e_._h_p_p" │ │ │ │ │ The file_storage class represents a file list and the piece size. Everything │ │ │ │ │ necessary to interpret a regular bittorrent storage file structure. │ │ │ │ │ class file_storage │ │ │ │ │ { │ │ │ │ │ bool iiss__vvaalliidd () const; │ │ │ │ │ void rreesseerrvvee (int num_files); │ │ │ │ │ - void aadddd__ffiillee__bboorrrrooww (string_view filename │ │ │ │ │ - , std::string const& path, std::int64_t file_size │ │ │ │ │ - , file_flags_t file_flags = {}, char const* filehash = nullptr │ │ │ │ │ - , std::int64_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ + void aadddd__ffiillee (std::string const& path, std::int64_t file_size │ │ │ │ │ + , file_flags_t file_flags = {} │ │ │ │ │ + , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ void aadddd__ffiillee (error_code& ec, std::string const& path, std::int64_t │ │ │ │ │ file_size │ │ │ │ │ , file_flags_t file_flags = {} │ │ │ │ │ , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ void aadddd__ffiillee__bboorrrrooww (error_code& ec, string_view filename │ │ │ │ │ , std::string const& path, std::int64_t file_size │ │ │ │ │ , file_flags_t file_flags = {}, char const* filehash = nullptr │ │ │ │ │ , std::int64_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ - void aadddd__ffiillee (std::string const& path, std::int64_t file_size │ │ │ │ │ - , file_flags_t file_flags = {} │ │ │ │ │ - , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ + void aadddd__ffiillee__bboorrrrooww (string_view filename │ │ │ │ │ + , std::string const& path, std::int64_t file_size │ │ │ │ │ + , file_flags_t file_flags = {}, char const* filehash = nullptr │ │ │ │ │ + , std::int64_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ void rreennaammee__ffiillee (file_index_t index, std::string const& new_filename); │ │ │ │ │ std::vector mmaapp__bblloocckk (piece_index_t piece, std::int64_t offset │ │ │ │ │ , std::int64_t size) const; │ │ │ │ │ peer_request mmaapp__ffiillee (file_index_t file, std::int64_t offset, int size) │ │ │ │ │ const; │ │ │ │ │ int nnuumm__ffiilleess () const noexcept; │ │ │ │ │ file_index_t eenndd__ffiillee () const noexcept; │ │ │ │ │ index_range ffiillee__rraannggee () const noexcept; │ │ │ │ │ std::int64_t ttoottaall__ssiizzee () const; │ │ │ │ │ - int nnuumm__ppiieecceess () const; │ │ │ │ │ void sseett__nnuumm__ppiieecceess (int n); │ │ │ │ │ + int nnuumm__ppiieecceess () const; │ │ │ │ │ piece_index_t eenndd__ppiieeccee () const; │ │ │ │ │ piece_index_t llaasstt__ppiieeccee () const; │ │ │ │ │ index_range ppiieeccee__rraannggee () const noexcept; │ │ │ │ │ int ppiieeccee__lleennggtthh () const; │ │ │ │ │ void sseett__ppiieeccee__lleennggtthh (int l); │ │ │ │ │ int ppiieeccee__ssiizzee (piece_index_t index) const; │ │ │ │ │ int ppiieeccee__ssiizzee22 (piece_index_t index) const; │ │ │ │ │ int bblloocckkss__iinn__ppiieeccee22 (piece_index_t index) const; │ │ │ │ │ int bblloocckkss__ppeerr__ppiieeccee () const; │ │ │ │ │ - std::string const& nnaammee () const; │ │ │ │ │ void sseett__nnaammee (std::string const& n); │ │ │ │ │ + std::string const& nnaammee () const; │ │ │ │ │ void sswwaapp (file_storage& ti) noexcept; │ │ │ │ │ void ccaannoonniiccaalliizzee (); │ │ │ │ │ - std::int64_t ffiillee__ooffffsseett (file_index_t index) const; │ │ │ │ │ - char const* rroooott__ppttrr (file_index_t const index) const; │ │ │ │ │ - sha1_hash hhaasshh (file_index_t index) const; │ │ │ │ │ + std::string ffiillee__ppaatthh (file_index_t index, std::string const& save_path = │ │ │ │ │ +"") const; │ │ │ │ │ bool ppaadd__ffiillee__aatt (file_index_t index) const; │ │ │ │ │ + sha1_hash hhaasshh (file_index_t index) const; │ │ │ │ │ + std::int64_t ffiillee__ooffffsseett (file_index_t index) const; │ │ │ │ │ + std::time_t mmttiimmee (file_index_t index) const; │ │ │ │ │ std::string ssyymmlliinnkk (file_index_t index) const; │ │ │ │ │ + string_view ffiillee__nnaammee (file_index_t index) const; │ │ │ │ │ sha256_hash rroooott (file_index_t index) const; │ │ │ │ │ + char const* rroooott__ppttrr (file_index_t const index) const; │ │ │ │ │ std::int64_t ffiillee__ssiizzee (file_index_t index) const; │ │ │ │ │ - std::string ffiillee__ppaatthh (file_index_t index, std::string const& save_path = │ │ │ │ │ -"") const; │ │ │ │ │ - string_view ffiillee__nnaammee (file_index_t index) const; │ │ │ │ │ - std::time_t mmttiimmee (file_index_t index) const; │ │ │ │ │ index_range ffiillee__ppiieeccee__rraannggee (file_index_t) const; │ │ │ │ │ int ffiillee__nnuumm__bblloocckkss (file_index_t index) const; │ │ │ │ │ int ffiillee__nnuumm__ppiieecceess (file_index_t index) const; │ │ │ │ │ int ffiillee__ffiirrsstt__ppiieeccee__nnooddee (file_index_t index) const; │ │ │ │ │ int ffiillee__ffiirrsstt__bblloocckk__nnooddee (file_index_t index) const; │ │ │ │ │ std::uint32_t ffiillee__ppaatthh__hhaasshh (file_index_t index, std::string const& │ │ │ │ │ save_path) const; │ │ │ │ │ void aallll__ppaatthh__hhaasshheess (std::unordered_set& table) const; │ │ │ │ │ file_flags_t ffiillee__ffllaaggss (file_index_t index) const; │ │ │ │ │ bool ffiillee__aabbssoolluuttee__ppaatthh (file_index_t index) const; │ │ │ │ │ - file_index_t ffiillee__iinnddeexx__aatt__ppiieeccee (piece_index_t piece) const; │ │ │ │ │ file_index_t ffiillee__iinnddeexx__aatt__ooffffsseett (std::int64_t offset) const; │ │ │ │ │ + file_index_t ffiillee__iinnddeexx__aatt__ppiieeccee (piece_index_t piece) const; │ │ │ │ │ file_index_t ffiillee__iinnddeexx__ffoorr__rroooott (sha256_hash const& root_hash) const; │ │ │ │ │ piece_index_t ppiieeccee__iinnddeexx__aatt__ffiillee (file_index_t f) const; │ │ │ │ │ void ssaanniittiizzee__ssyymmlliinnkkss (); │ │ │ │ │ bool vv22 () const; │ │ │ │ │ │ │ │ │ │ static constexpr file_flags_t ffllaagg__ppaadd__ffiillee = 0_bit; │ │ │ │ │ static constexpr file_flags_t ffllaagg__hhiiddddeenn = 1_bit; │ │ │ │ │ @@ -186,31 +186,31 @@ │ │ │ │ │ ********** rreesseerrvvee(()) ********** │ │ │ │ │ void rreesseerrvvee (int num_files); │ │ │ │ │ allocates space for num_files in the internal file list. This can be used to │ │ │ │ │ avoid reallocating the internal file list when the number of files to be added │ │ │ │ │ is known up-front. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** aadddd__ffiillee__bboorrrrooww(()) aadddd__ffiillee(()) ********** │ │ │ │ │ -void aadddd__ffiillee__bboorrrrooww (string_view filename │ │ │ │ │ - , std::string const& path, std::int64_t file_size │ │ │ │ │ - , file_flags_t file_flags = {}, char const* filehash = nullptr │ │ │ │ │ - , std::int64_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ +void aadddd__ffiillee (std::string const& path, std::int64_t file_size │ │ │ │ │ + , file_flags_t file_flags = {} │ │ │ │ │ + , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ void aadddd__ffiillee (error_code& ec, std::string const& path, std::int64_t file_size │ │ │ │ │ , file_flags_t file_flags = {} │ │ │ │ │ , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ void aadddd__ffiillee__bboorrrrooww (error_code& ec, string_view filename │ │ │ │ │ , std::string const& path, std::int64_t file_size │ │ │ │ │ , file_flags_t file_flags = {}, char const* filehash = nullptr │ │ │ │ │ , std::int64_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ -void aadddd__ffiillee (std::string const& path, std::int64_t file_size │ │ │ │ │ - , file_flags_t file_flags = {} │ │ │ │ │ - , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ +void aadddd__ffiillee__bboorrrrooww (string_view filename │ │ │ │ │ + , std::string const& path, std::int64_t file_size │ │ │ │ │ + , file_flags_t file_flags = {}, char const* filehash = nullptr │ │ │ │ │ + , std::int64_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ Adds a file to the file storage. The add_file_borrow version expects that │ │ │ │ │ filename is the file name (without a path) of the file that's being added. This │ │ │ │ │ memory is bboorrrroowweedd, i.e. it is the caller's responsibility to make sure it │ │ │ │ │ stays valid throughout the lifetime of this _f_i_l_e___s_t_o_r_a_g_e object or any copy of │ │ │ │ │ it. The same thing applies to filehash, which is an optional pointer to a 20 │ │ │ │ │ byte binary SHA-1 hash of the file. │ │ │ │ │ @@ -281,16 +281,16 @@ │ │ │ │ │ _f_i_l_e___s_t_o_r_a_g_e. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ttoottaall__ssiizzee(()) ********** │ │ │ │ │ std::int64_t ttoottaall__ssiizzee () const; │ │ │ │ │ returns the total number of bytes all the files in this torrent spans │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** nnuumm__ppiieecceess(()) sseett__nnuumm__ppiieecceess(()) ********** │ │ │ │ │ -int nnuumm__ppiieecceess () const; │ │ │ │ │ void sseett__nnuumm__ppiieecceess (int n); │ │ │ │ │ +int nnuumm__ppiieecceess () const; │ │ │ │ │ set and get the number of pieces in the torrent │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** eenndd__ppiieeccee(()) ********** │ │ │ │ │ piece_index_t eenndd__ppiieeccee () const; │ │ │ │ │ returns the index of the one-past-end piece in the file storage │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** llaasstt__ppiieeccee(()) ********** │ │ │ │ │ @@ -328,41 +328,41 @@ │ │ │ │ │ returns the number of blocks in the specified piece, for v2 torrents. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** bblloocckkss__ppeerr__ppiieeccee(()) ********** │ │ │ │ │ int bblloocckkss__ppeerr__ppiieeccee () const; │ │ │ │ │ returns the number of blocks there are in the typical piece. There may be fewer │ │ │ │ │ in the last piece) │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** nnaammee(()) sseett__nnaammee(()) ********** │ │ │ │ │ -std::string const& nnaammee () const; │ │ │ │ │ +********** sseett__nnaammee(()) nnaammee(()) ********** │ │ │ │ │ void sseett__nnaammee (std::string const& n); │ │ │ │ │ +std::string const& nnaammee () const; │ │ │ │ │ set and get the name of this torrent. For multi-file torrents, this is also the │ │ │ │ │ name of the root directory all the files are stored in. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sswwaapp(()) ********** │ │ │ │ │ void sswwaapp (file_storage& ti) noexcept; │ │ │ │ │ swap all content of tthhiiss with ttii. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ccaannoonniiccaalliizzee(()) ********** │ │ │ │ │ void ccaannoonniiccaalliizzee (); │ │ │ │ │ arrange files and padding to match the canonical form required by BEP 52 │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ffiillee__ooffffsseett(()) ppaadd__ffiillee__aatt(()) ffiillee__ppaatthh(()) hhaasshh(()) rroooott__ppttrr(()) ffiillee__nnaammee(()) │ │ │ │ │ -ffiillee__ssiizzee(()) mmttiimmee(()) rroooott(()) ssyymmlliinnkk(()) ********** │ │ │ │ │ -std::int64_t ffiillee__ooffffsseett (file_index_t index) const; │ │ │ │ │ -char const* rroooott__ppttrr (file_index_t const index) const; │ │ │ │ │ -sha1_hash hhaasshh (file_index_t index) const; │ │ │ │ │ +********** ffiillee__ooffffsseett(()) rroooott__ppttrr(()) ssyymmlliinnkk(()) ffiillee__ssiizzee(()) ffiillee__nnaammee(()) ffiillee__ppaatthh(()) │ │ │ │ │ +rroooott(()) ppaadd__ffiillee__aatt(()) hhaasshh(()) mmttiimmee(()) ********** │ │ │ │ │ +std::string ffiillee__ppaatthh (file_index_t index, std::string const& save_path = "") │ │ │ │ │ +const; │ │ │ │ │ bool ppaadd__ffiillee__aatt (file_index_t index) const; │ │ │ │ │ +sha1_hash hhaasshh (file_index_t index) const; │ │ │ │ │ +std::int64_t ffiillee__ooffffsseett (file_index_t index) const; │ │ │ │ │ +std::time_t mmttiimmee (file_index_t index) const; │ │ │ │ │ std::string ssyymmlliinnkk (file_index_t index) const; │ │ │ │ │ +string_view ffiillee__nnaammee (file_index_t index) const; │ │ │ │ │ sha256_hash rroooott (file_index_t index) const; │ │ │ │ │ +char const* rroooott__ppttrr (file_index_t const index) const; │ │ │ │ │ std::int64_t ffiillee__ssiizzee (file_index_t index) const; │ │ │ │ │ -std::string ffiillee__ppaatthh (file_index_t index, std::string const& save_path = "") │ │ │ │ │ -const; │ │ │ │ │ -string_view ffiillee__nnaammee (file_index_t index) const; │ │ │ │ │ -std::time_t mmttiimmee (file_index_t index) const; │ │ │ │ │ These functions are used to query attributes of files at a given index. │ │ │ │ │ The hash() is a SHA-1 hash of the file, or 0 if none was provided in the │ │ │ │ │ torrent file. This can potentially be used to join a bittorrent network with │ │ │ │ │ other file sharing networks. │ │ │ │ │ root() returns the SHA-256 merkle tree root of the specified file, in case this │ │ │ │ │ is a v2 torrent. Otherwise returns zeros. root_ptr() returns a pointer to the │ │ │ │ │ SHA-256 merkle tree root hash for the specified file. The pointer points into │ │ │ │ │ @@ -375,15 +375,15 @@ │ │ │ │ │ file_size() returns the size of a file. │ │ │ │ │ pad_file_at() returns true if the file at the given index is a pad-file. │ │ │ │ │ file_name() returns jjuusstt the name of the file, whereas file_path() returns the │ │ │ │ │ path (inside the torrent file) with the filename appended. │ │ │ │ │ file_offset() returns the byte offset within the torrent file where this file │ │ │ │ │ starts. It can be used to map the file to a piece index (given the piece size). │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ffiillee__nnuumm__ppiieecceess(()) ffiillee__ppiieeccee__rraannggee(()) ffiillee__nnuumm__bblloocckkss(()) ********** │ │ │ │ │ +********** ffiillee__ppiieeccee__rraannggee(()) ffiillee__nnuumm__bblloocckkss(()) ffiillee__nnuumm__ppiieecceess(()) ********** │ │ │ │ │ index_range ffiillee__ppiieeccee__rraannggee (file_index_t) const; │ │ │ │ │ int ffiillee__nnuumm__bblloocckkss (file_index_t index) const; │ │ │ │ │ int ffiillee__nnuumm__ppiieecceess (file_index_t index) const; │ │ │ │ │ Returns the number of pieces or blocks the file atindexspans, under the │ │ │ │ │ assumption that the file is aligned to the start of a piece. This is only │ │ │ │ │ meaningful for v2 torrents, where files are guaranteed such alignment. These │ │ │ │ │ numbers are used to size and navigate the merkle hash tree for each file. │ │ │ │ │ @@ -412,16 +412,16 @@ │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ffiillee__aabbssoolluuttee__ppaatthh(()) ********** │ │ │ │ │ bool ffiillee__aabbssoolluuttee__ppaatthh (file_index_t index) const; │ │ │ │ │ returns true if the file at the specified index has been renamed to have an │ │ │ │ │ absolute path, i.e. is not anchored in the save path of the torrent. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ffiillee__iinnddeexx__aatt__ppiieeccee(()) ffiillee__iinnddeexx__aatt__ooffffsseett(()) ********** │ │ │ │ │ -file_index_t ffiillee__iinnddeexx__aatt__ppiieeccee (piece_index_t piece) const; │ │ │ │ │ file_index_t ffiillee__iinnddeexx__aatt__ooffffsseett (std::int64_t offset) const; │ │ │ │ │ +file_index_t ffiillee__iinnddeexx__aatt__ppiieeccee (piece_index_t piece) const; │ │ │ │ │ returns the index of the file at the given offset in the torrent │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ffiillee__iinnddeexx__ffoorr__rroooott(()) ********** │ │ │ │ │ file_index_t ffiillee__iinnddeexx__ffoorr__rroooott (sha256_hash const& root_hash) const; │ │ │ │ │ finds the file with the given root hash and returns its index if there is no │ │ │ │ │ file with the root hash, file_index_t{-1} is returned │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ @@ -450,14 +450,20 @@ │ │ │ │ │ flag_executable │ │ │ │ │ this file has the executable attribute set. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ flag_symlink │ │ │ │ │ this file is a symbolic link. It should have a link target string │ │ │ │ │ associated with it. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +************ mmmmaapp__ddiisskk__iioo__ccoonnssttrruuccttoorr(()) ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_m_m_a_p___d_i_s_k___i_o_._h_p_p" │ │ │ │ │ +std::unique_ptr mmmmaapp__ddiisskk__iioo__ccoonnssttrruuccttoorr ( │ │ │ │ │ + io_context& ios, settings_interface const&, counters& cnt); │ │ │ │ │ +constructs a memory mapped file disk I/O object. │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ddeeffaauulltt__ddiisskk__iioo__ccoonnssttrruuccttoorr(()) ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n_._h_p_p" │ │ │ │ │ std::unique_ptr ddeeffaauulltt__ddiisskk__iioo__ccoonnssttrruuccttoorr ( │ │ │ │ │ io_context& ios, settings_interface const&, counters& cnt); │ │ │ │ │ the constructor function for the default storage. On systems that support │ │ │ │ │ memory mapped files (and a 64 bit address space) the memory mapped storage will │ │ │ │ │ be constructed, otherwise the portable posix storage. │ │ │ │ │ @@ -473,20 +479,14 @@ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_p_o_s_i_x___d_i_s_k___i_o_._h_p_p" │ │ │ │ │ std::unique_ptr ppoossiixx__ddiisskk__iioo__ccoonnssttrruuccttoorr ( │ │ │ │ │ io_context& ios, settings_interface const&, counters& cnt); │ │ │ │ │ this is a simple posix disk I/O back-end, used for systems that don't have a 64 │ │ │ │ │ bit virtual address space or don't support memory mapped files. It's │ │ │ │ │ implemented using portable C file functions and is single-threaded. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ mmmmaapp__ddiisskk__iioo__ccoonnssttrruuccttoorr(()) ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_m_m_a_p___d_i_s_k___i_o_._h_p_p" │ │ │ │ │ -std::unique_ptr mmmmaapp__ddiisskk__iioo__ccoonnssttrruuccttoorr ( │ │ │ │ │ - io_context& ios, settings_interface const&, counters& cnt); │ │ │ │ │ -constructs a memory mapped file disk I/O object. │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ eennuumm ssttoorraaggee__mmooddee__tt ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_t_o_r_a_g_e___d_e_f_s_._h_p_p" │ │ │ │ │ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ │ │ │ │ │ |_nn_aa_mm_ee_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_vv_aa_ll_uu_ee_|_dd_ee_ss_cc_rr_ii_pp_tt_ii_oo_nn_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | │ │ │ │ │ | | |All pieces will be written to their final | │ │ │ │ │ | | |position, all files will be allocated in full | │ │ │ │ │ |storage_mode_allocate|0 |when the torrent is first started. This mode | │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Handle.html │ │ │ │ @@ -39,52 +39,52 @@ │ │ │ │ │ │ │ │
  • partial_piece_info
  • │ │ │ │
  • torrent_handle │ │ │ │
  • │ │ │ │
  • hash_value()
  • │ │ │ │ @@ -94,16 +94,16 @@ │ │ │ │

    block_info

    │ │ │ │

    Declared in "libtorrent/torrent_handle.hpp"

    │ │ │ │

    holds the state of a block in a piece. Who we requested │ │ │ │ it from and how far along we are at downloading it.

    │ │ │ │
    │ │ │ │  struct block_info
    │ │ │ │  {
    │ │ │ │ -   tcp::endpoint peer () const;
    │ │ │ │     void set_peer (tcp::endpoint const& ep);
    │ │ │ │ +   tcp::endpoint peer () const;
    │ │ │ │  
    │ │ │ │     enum block_state_t
    │ │ │ │     {
    │ │ │ │        none,
    │ │ │ │        requested,
    │ │ │ │        writing,
    │ │ │ │        finished,
    │ │ │ │ @@ -115,16 +115,16 @@
    │ │ │ │     unsigned num_peers:14;
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │

    peer() set_peer()

    │ │ │ │
    │ │ │ │ -tcp::endpoint peer () const;
    │ │ │ │  void set_peer (tcp::endpoint const& ep);
    │ │ │ │ +tcp::endpoint peer () const;
    │ │ │ │  
    │ │ │ │

    The peer is the ip address of the peer this block was downloaded from.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    enum block_state_t

    │ │ │ │

    Declared in "libtorrent/torrent_handle.hpp"

    │ │ │ │
    │ │ │ │ @@ -254,118 +254,118 @@ │ │ │ │ Which means you cannot perform any operation on it, unless you first │ │ │ │ assign it a valid handle. If you try to perform any operation on an │ │ │ │ uninitialized handle, it will throw invalid_handle.

    │ │ │ │
    │ │ │ │

    Warning

    │ │ │ │

    All operations on a torrent_handle may throw system_error │ │ │ │ exception, in case the handle is no longer referring to a torrent. │ │ │ │ -There is one exception is_valid() will never throw. Since the torrents │ │ │ │ +There is one exception is_valid() 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.

    │ │ │ │
    │ │ │ │
    │ │ │ │  struct torrent_handle
    │ │ │ │  {
    │ │ │ │     friend std::size_t hash_value (torrent_handle const& th);
    │ │ │ │     torrent_handle () noexcept = default;
    │ │ │ │ -   void add_piece (piece_index_t piece, std::vector<char> data, add_piece_flags_t flags = {}) const;
    │ │ │ │     void add_piece (piece_index_t piece, char const* data, add_piece_flags_t flags = {}) const;
    │ │ │ │ +   void add_piece (piece_index_t piece, std::vector<char> data, add_piece_flags_t flags = {}) const;
    │ │ │ │     void read_piece (piece_index_t piece) const;
    │ │ │ │     bool have_piece (piece_index_t piece) const;
    │ │ │ │ -   void post_peer_info () const;
    │ │ │ │     void get_peer_info (std::vector<peer_info>& v) const;
    │ │ │ │ -   void post_status (status_flags_t flags = status_flags_t::all()) const;
    │ │ │ │ +   void post_peer_info () const;
    │ │ │ │     torrent_status status (status_flags_t flags = status_flags_t::all()) const;
    │ │ │ │ -   void get_download_queue (std::vector<partial_piece_info>& queue) const;
    │ │ │ │ +   void post_status (status_flags_t flags = status_flags_t::all()) const;
    │ │ │ │     std::vector<partial_piece_info> get_download_queue () const;
    │ │ │ │ +   void get_download_queue (std::vector<partial_piece_info>& queue) const;
    │ │ │ │     void post_download_queue () const;
    │ │ │ │ -   void reset_piece_deadline (piece_index_t index) const;
    │ │ │ │ -   void clear_piece_deadlines () const;
    │ │ │ │     void set_piece_deadline (piece_index_t index, int deadline, deadline_flags_t flags = {}) const;
    │ │ │ │ -   void post_file_progress (file_progress_flags_t flags) const;
    │ │ │ │ +   void clear_piece_deadlines () const;
    │ │ │ │ +   void reset_piece_deadline (piece_index_t index) const;
    │ │ │ │     void file_progress (std::vector<std::int64_t>& progress, file_progress_flags_t flags = {}) const;
    │ │ │ │     std::vector<std::int64_t> file_progress (file_progress_flags_t flags = {}) const;
    │ │ │ │ +   void post_file_progress (file_progress_flags_t flags) const;
    │ │ │ │     std::vector<open_file_state> file_status () const;
    │ │ │ │     void clear_error () const;
    │ │ │ │ +   void replace_trackers (std::vector<announce_entry> const&) const;
    │ │ │ │ +   void post_trackers () const;
    │ │ │ │     void add_tracker (announce_entry const&) const;
    │ │ │ │     std::vector<announce_entry> trackers () const;
    │ │ │ │ -   void post_trackers () const;
    │ │ │ │ -   void replace_trackers (std::vector<announce_entry> const&) const;
    │ │ │ │     std::set<std::string> url_seeds () const;
    │ │ │ │ -   void add_url_seed (std::string const& url) const;
    │ │ │ │     void remove_url_seed (std::string const& url) const;
    │ │ │ │ -   void remove_http_seed (std::string const& url) const;
    │ │ │ │ -   std::set<std::string> http_seeds () const;
    │ │ │ │ +   void add_url_seed (std::string const& url) const;
    │ │ │ │     void add_http_seed (std::string const& url) const;
    │ │ │ │ +   std::set<std::string> http_seeds () const;
    │ │ │ │ +   void remove_http_seed (std::string const& url) const;
    │ │ │ │     void add_extension (
    │ │ │ │        std::function<std::shared_ptr<torrent_plugin>(torrent_handle const&, client_data_t)> const& ext
    │ │ │ │        , client_data_t userdata = client_data_t{});
    │ │ │ │     bool set_metadata (span<char const> metadata) const;
    │ │ │ │     bool is_valid () const;
    │ │ │ │     void resume () const;
    │ │ │ │     void pause (pause_flags_t flags = {}) const;
    │ │ │ │ -   void unset_flags (torrent_flags_t flags) const;
    │ │ │ │ -   void set_flags (torrent_flags_t flags, torrent_flags_t mask) const;
    │ │ │ │     torrent_flags_t flags () const;
    │ │ │ │ +   void unset_flags (torrent_flags_t flags) const;
    │ │ │ │     void set_flags (torrent_flags_t flags) const;
    │ │ │ │ +   void set_flags (torrent_flags_t flags, torrent_flags_t mask) const;
    │ │ │ │     void flush_cache () const;
    │ │ │ │     void force_recheck () const;
    │ │ │ │     void save_resume_data (resume_data_flags_t flags = {}) const;
    │ │ │ │ -   bool need_save_resume_data (resume_data_flags_t flags) const;
    │ │ │ │     bool need_save_resume_data () const;
    │ │ │ │ -   void queue_position_bottom () const;
    │ │ │ │ +   bool need_save_resume_data (resume_data_flags_t flags) const;
    │ │ │ │     void queue_position_up () const;
    │ │ │ │ -   void queue_position_top () const;
    │ │ │ │     void queue_position_down () const;
    │ │ │ │     queue_position_t queue_position () const;
    │ │ │ │ +   void queue_position_top () const;
    │ │ │ │ +   void queue_position_bottom () const;
    │ │ │ │     void queue_position_set (queue_position_t p) const;
    │ │ │ │ +   void set_ssl_certificate_buffer (std::string const& certificate
    │ │ │ │ +      , std::string const& private_key
    │ │ │ │ +      , std::string const& dh_params);
    │ │ │ │     void set_ssl_certificate (std::string const& certificate
    │ │ │ │        , std::string const& private_key
    │ │ │ │        , std::string const& dh_params
    │ │ │ │        , std::string const& passphrase = "");
    │ │ │ │ -   void set_ssl_certificate_buffer (std::string const& certificate
    │ │ │ │ -      , std::string const& private_key
    │ │ │ │ -      , std::string const& dh_params);
    │ │ │ │ -   std::shared_ptr<torrent_info> torrent_file_with_hashes () const;
    │ │ │ │     std::shared_ptr<const torrent_info> torrent_file () const;
    │ │ │ │ +   std::shared_ptr<torrent_info> torrent_file_with_hashes () const;
    │ │ │ │     std::vector<std::vector<sha256_hash>> piece_layers () const;
    │ │ │ │ -   void piece_availability (std::vector<int>& avail) const;
    │ │ │ │     void post_piece_availability () const;
    │ │ │ │ -   void prioritize_pieces (std::vector<std::pair<piece_index_t, download_priority_t>> const& pieces) const;
    │ │ │ │ -   std::vector<download_priority_t> get_piece_priorities () const;
    │ │ │ │ +   void piece_availability (std::vector<int>& avail) const;
    │ │ │ │ +   void piece_priority (piece_index_t index, download_priority_t priority) const;
    │ │ │ │     void prioritize_pieces (std::vector<download_priority_t> const& pieces) const;
    │ │ │ │     download_priority_t piece_priority (piece_index_t index) const;
    │ │ │ │ -   void piece_priority (piece_index_t index, download_priority_t priority) const;
    │ │ │ │ -   void prioritize_files (std::vector<download_priority_t> const& files) const;
    │ │ │ │ +   void prioritize_pieces (std::vector<std::pair<piece_index_t, download_priority_t>> const& pieces) const;
    │ │ │ │ +   std::vector<download_priority_t> get_piece_priorities () const;
    │ │ │ │     download_priority_t file_priority (file_index_t index) const;
    │ │ │ │     void file_priority (file_index_t index, download_priority_t priority) const;
    │ │ │ │     std::vector<download_priority_t> get_file_priorities () const;
    │ │ │ │ -   void force_dht_announce () const;
    │ │ │ │ +   void prioritize_files (std::vector<download_priority_t> const& files) const;
    │ │ │ │     void force_lsd_announce () const;
    │ │ │ │ +   void force_dht_announce () const;
    │ │ │ │     void force_reannounce (int seconds = 0, int idx = -1, reannounce_flags_t = {}) const;
    │ │ │ │     void scrape_tracker (int idx = -1) const;
    │ │ │ │ -   int download_limit () const;
    │ │ │ │ -   int upload_limit () const;
    │ │ │ │     void set_download_limit (int limit) const;
    │ │ │ │     void set_upload_limit (int limit) const;
    │ │ │ │ +   int upload_limit () const;
    │ │ │ │ +   int download_limit () const;
    │ │ │ │     void connect_peer (tcp::endpoint const& adr, peer_source_flags_t source = {}
    │ │ │ │        , pex_flags_t flags = pex_encryption | pex_utp | pex_holepunch) const;
    │ │ │ │     void clear_peers ();
    │ │ │ │     void set_max_uploads (int max_uploads) const;
    │ │ │ │     int max_uploads () const;
    │ │ │ │ -   int max_connections () const;
    │ │ │ │     void set_max_connections (int max_connections) const;
    │ │ │ │ +   int max_connections () const;
    │ │ │ │     void move_storage (std::string const& save_path
    │ │ │ │        , move_flags_t flags = move_flags_t::always_replace_files
    │ │ │ │        ) const;
    │ │ │ │     void rename_file (file_index_t index, std::string const& new_name) const;
    │ │ │ │ -   info_hash_t info_hashes () const;
    │ │ │ │     sha1_hash info_hash () const;
    │ │ │ │ -   bool operator== (const torrent_handle& h) const;
    │ │ │ │ +   info_hash_t info_hashes () const;
    │ │ │ │     bool operator< (const torrent_handle& h) const;
    │ │ │ │ +   bool operator== (const torrent_handle& h) const;
    │ │ │ │     bool operator!= (const torrent_handle& h) const;
    │ │ │ │     std::uint32_t id () const;
    │ │ │ │     std::shared_ptr<torrent> native_handle () const;
    │ │ │ │     client_data_t userdata () const;
    │ │ │ │     bool in_session () const;
    │ │ │ │  
    │ │ │ │     static constexpr add_piece_flags_t overwrite_existing  = 0_bit;
    │ │ │ │ @@ -393,21 +393,21 @@
    │ │ │ │  
    │ │ │ │ [report issue]
    │ │ │ │

    torrent_handle()

    │ │ │ │
    │ │ │ │  torrent_handle () noexcept = default;
    │ │ │ │  
    │ │ │ │

    constructs a torrent handle that does not refer to a torrent. │ │ │ │ -i.e. is_valid() will return false.

    │ │ │ │ +i.e. is_valid() will return false.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    add_piece()

    │ │ │ │
    │ │ │ │ -void add_piece (piece_index_t piece, std::vector<char> data, add_piece_flags_t flags = {}) const;
    │ │ │ │  void add_piece (piece_index_t piece, char const* data, add_piece_flags_t flags = {}) const;
    │ │ │ │ +void add_piece (piece_index_t piece, std::vector<char> data, add_piece_flags_t flags = {}) const;
    │ │ │ │  
    │ │ │ │

    This function will write data to the storage as piece piece, │ │ │ │ as if it had been downloaded from a peer.

    │ │ │ │

    By default, data that's already been downloaded is not overwritten by │ │ │ │ this buffer. If you trust this data to be correct (and pass the piece │ │ │ │ hash check) you may pass the overwrite_existing flag. This will │ │ │ │ instruct libtorrent to overwrite any data that may already have been │ │ │ │ @@ -444,39 +444,39 @@ │ │ │ │

    │ │ │ │

    have_piece()

    │ │ │ │
    │ │ │ │  bool have_piece (piece_index_t piece) const;
    │ │ │ │  
    │ │ │ │

    Returns true if this piece has been completely downloaded and written │ │ │ │ to disk, and false otherwise.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    post_peer_info() get_peer_info()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    get_peer_info() post_peer_info()

    │ │ │ │
    │ │ │ │ -void post_peer_info () const;
    │ │ │ │  void get_peer_info (std::vector<peer_info>& v) const;
    │ │ │ │ +void post_peer_info () const;
    │ │ │ │  
    │ │ │ │

    Query information about connected peers for this torrent. If the │ │ │ │ torrent_handle is invalid, it will throw a system_error exception.

    │ │ │ │

    post_peer_info() is asynchronous and will trigger the posting of │ │ │ │ a peer_info_alert. The alert contain a list of peer_info objects, one │ │ │ │ for each connected peer.

    │ │ │ │

    get_peer_info() is synchronous and 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. Each entry in │ │ │ │ the vector contains information about that particular peer. See │ │ │ │ peer_info.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    status() post_status()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    post_status() status()

    │ │ │ │
    │ │ │ │ -void post_status (status_flags_t flags = status_flags_t::all()) const;
    │ │ │ │  torrent_status status (status_flags_t flags = status_flags_t::all()) const;
    │ │ │ │ +void post_status (status_flags_t flags = status_flags_t::all()) const;
    │ │ │ │  
    │ │ │ │

    status() will return a structure with information about the status │ │ │ │ of this torrent. If the torrent_handle is invalid, it will throw │ │ │ │ system_error exception. See torrent_status. The flags │ │ │ │ argument filters what information is returned in the torrent_status. │ │ │ │ Some information in there is relatively expensive to calculate, and if │ │ │ │ you're not interested in it (and see performance issues), you can │ │ │ │ @@ -491,33 +491,33 @@ │ │ │ │

    By default everything is included. The flags you can use to decide │ │ │ │ what to include are defined in this class.

    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    get_download_queue() post_download_queue()

    │ │ │ │
    │ │ │ │ -void get_download_queue (std::vector<partial_piece_info>& queue) const;
    │ │ │ │  std::vector<partial_piece_info> get_download_queue () const;
    │ │ │ │ +void get_download_queue (std::vector<partial_piece_info>& queue) const;
    │ │ │ │  void post_download_queue () const;
    │ │ │ │  
    │ │ │ │

    post_download_queue() triggers a download_queue_alert to be │ │ │ │ posted. │ │ │ │ get_download_queue() is a synchronous call and returns a vector │ │ │ │ with information about pieces that are partially downloaded or not │ │ │ │ downloaded but partially requested. See partial_piece_info for the │ │ │ │ fields in the returned vector.

    │ │ │ │ - │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    clear_piece_deadlines() reset_piece_deadline() set_piece_deadline()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    reset_piece_deadline() set_piece_deadline() clear_piece_deadlines()

    │ │ │ │
    │ │ │ │ -void reset_piece_deadline (piece_index_t index) const;
    │ │ │ │ -void clear_piece_deadlines () const;
    │ │ │ │  void set_piece_deadline (piece_index_t index, int deadline, deadline_flags_t flags = {}) const;
    │ │ │ │ +void clear_piece_deadlines () const;
    │ │ │ │ +void reset_piece_deadline (piece_index_t index) const;
    │ │ │ │  
    │ │ │ │

    This function sets or resets the deadline associated with a specific │ │ │ │ piece index (index). 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 │ │ │ │ @@ -528,22 +528,22 @@ │ │ │ │

    deadline is the number of milliseconds until this piece should be │ │ │ │ completed.

    │ │ │ │

    reset_piece_deadline removes the deadline from the piece. If it │ │ │ │ hasn't already been downloaded, it will no longer be considered a │ │ │ │ priority.

    │ │ │ │

    clear_piece_deadlines() removes deadlines on all pieces in │ │ │ │ the torrent. As if reset_piece_deadline() was called on all pieces.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    post_file_progress() file_progress()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    file_progress() post_file_progress()

    │ │ │ │
    │ │ │ │ -void post_file_progress (file_progress_flags_t flags) const;
    │ │ │ │  void file_progress (std::vector<std::int64_t>& progress, file_progress_flags_t flags = {}) const;
    │ │ │ │  std::vector<std::int64_t> file_progress (file_progress_flags_t flags = {}) const;
    │ │ │ │ +void post_file_progress (file_progress_flags_t flags) const;
    │ │ │ │  
    │ │ │ │

    This function fills in the supplied vector, or returns a vector, with │ │ │ │ the number of bytes downloaded of each file in this torrent. The │ │ │ │ progress values are ordered the same as the files in the │ │ │ │ torrent_info.

    │ │ │ │

    This operation is not very cheap. Its complexity is O(n + mj). │ │ │ │ Where n is the number of files, m is the number of currently │ │ │ │ @@ -572,25 +572,25 @@ │ │ │ │

    │ │ │ │

    clear_error()

    │ │ │ │
    │ │ │ │  void clear_error () const;
    │ │ │ │  
    │ │ │ │

    If the torrent is in an error state (i.e. torrent_status::error is │ │ │ │ non-empty), this will clear the error and start the torrent again.

    │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    trackers() post_trackers() add_tracker() replace_trackers()

    │ │ │ │ + │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    add_tracker() post_trackers() replace_trackers() trackers()

    │ │ │ │
    │ │ │ │ +void replace_trackers (std::vector<announce_entry> const&) const;
    │ │ │ │ +void post_trackers () const;
    │ │ │ │  void add_tracker (announce_entry const&) const;
    │ │ │ │  std::vector<announce_entry> trackers () const;
    │ │ │ │ -void post_trackers () const;
    │ │ │ │ -void replace_trackers (std::vector<announce_entry> const&) const;
    │ │ │ │  
    │ │ │ │

    trackers() returns the list of trackers for this torrent. The │ │ │ │ announce entry contains both a string url which specify the │ │ │ │ announce url for the tracker as well as an int tier, which is │ │ │ │ specifies the order in which this tracker is tried. If you want │ │ │ │ libtorrent to use another list of trackers for this torrent, you can │ │ │ │ use replace_trackers() which takes a list of the same form as the │ │ │ │ @@ -602,42 +602,42 @@ │ │ │ │

    add_tracker() will look if the specified tracker is already in the │ │ │ │ set. If it is, it doesn't do anything. If it's not in the current set │ │ │ │ of trackers, it will insert it in the tier specified in the │ │ │ │ announce_entry.

    │ │ │ │

    The updated set of trackers will be saved in the resume data, and when │ │ │ │ a torrent is started with resume data, the trackers from the resume │ │ │ │ data will replace the original ones.

    │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    url_seeds() add_url_seed() remove_url_seed()

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    remove_url_seed() add_url_seed() url_seeds()

    │ │ │ │
    │ │ │ │  std::set<std::string> url_seeds () const;
    │ │ │ │ -void add_url_seed (std::string const& url) const;
    │ │ │ │  void remove_url_seed (std::string const& url) const;
    │ │ │ │ +void add_url_seed (std::string const& url) const;
    │ │ │ │  
    │ │ │ │

    add_url_seed() adds another url to the torrent's list of url │ │ │ │ seeds. If the given url already exists in that list, the call has no │ │ │ │ effect. The torrent will connect to the server and try to download │ │ │ │ pieces from it, unless it's paused, queued, checking or seeding. │ │ │ │ remove_url_seed() removes the given url if it exists already. │ │ │ │ url_seeds() return a set of the url seeds currently in this │ │ │ │ torrent. Note that URLs that fails may be removed automatically from │ │ │ │ the list.

    │ │ │ │

    See http seeding for more information.

    │ │ │ │ - │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    remove_http_seed() http_seeds() add_http_seed()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    http_seeds() remove_http_seed() add_http_seed()

    │ │ │ │
    │ │ │ │ -void remove_http_seed (std::string const& url) const;
    │ │ │ │ -std::set<std::string> http_seeds () const;
    │ │ │ │  void add_http_seed (std::string const& url) const;
    │ │ │ │ +std::set<std::string> http_seeds () const;
    │ │ │ │ +void remove_http_seed (std::string const& url) const;
    │ │ │ │  
    │ │ │ │

    These functions are identical as the *_url_seed() variants, but │ │ │ │ they operate on BEP 17 web seeds instead of BEP 19.

    │ │ │ │

    See http seeding for more information.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    add_extension()

    │ │ │ │ @@ -673,24 +673,24 @@ │ │ │ │

    Returns true if this handle refers to a valid torrent and false if it │ │ │ │ hasn't been initialized or if the torrent it refers to has been │ │ │ │ removed from the session AND destructed.

    │ │ │ │

    To tell if the torrent_handle is in the session, use │ │ │ │ torrent_handle::in_session(). This will return true before │ │ │ │ session_handle::remove_torrent() is called, and false │ │ │ │ afterward.

    │ │ │ │ -

    Clients should only use is_valid() to determine if the result of │ │ │ │ +

    Clients should only use is_valid() to determine if the result of │ │ │ │ session::find_torrent() was successful.

    │ │ │ │ -

    Unlike other member functions which return a value, is_valid() │ │ │ │ +

    Unlike other member functions which return a value, is_valid() │ │ │ │ completes immediately, without blocking on a result from the │ │ │ │ network thread. Also unlike other functions, it never throws │ │ │ │ the system_error exception.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    resume() pause()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    pause() resume()

    │ │ │ │
    │ │ │ │  void resume () const;
    │ │ │ │  void pause (pause_flags_t flags = {}) const;
    │ │ │ │  
    │ │ │ │

    pause(), and resume() will disconnect all peers and reconnect │ │ │ │ all peers respectively. When a torrent is paused, it will however │ │ │ │ remember all share ratios to all peers and remember all potential (not │ │ │ │ @@ -704,24 +704,24 @@ │ │ │ │

    │ │ │ │

    Note

    │ │ │ │

    Torrents that are auto-managed may be automatically resumed again. It │ │ │ │ does not make sense to pause an auto-managed torrent without making it │ │ │ │ not auto-managed first. Torrents are auto-managed by default when added │ │ │ │ to the session. For more information, see queuing.

    │ │ │ │
    │ │ │ │ - │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    set_flags() flags() unset_flags()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    flags() set_flags() unset_flags()

    │ │ │ │
    │ │ │ │ -void unset_flags (torrent_flags_t flags) const;
    │ │ │ │ -void set_flags (torrent_flags_t flags, torrent_flags_t mask) const;
    │ │ │ │  torrent_flags_t flags () const;
    │ │ │ │ +void unset_flags (torrent_flags_t flags) const;
    │ │ │ │  void set_flags (torrent_flags_t flags) const;
    │ │ │ │ +void set_flags (torrent_flags_t flags, torrent_flags_t mask) const;
    │ │ │ │  
    │ │ │ │

    sets and gets the torrent state flags. See torrent_flags_t. │ │ │ │ The set_flags overload that take a mask will affect all │ │ │ │ flags part of the mask, and set their values to what the │ │ │ │ flags argument is set to. This allows clearing and │ │ │ │ setting flags in a single function call. │ │ │ │ The set_flags overload that just takes flags, sets all │ │ │ │ @@ -858,16 +858,16 @@ │ │ │ │ report that they don't need to save resume data again, and skipped by │ │ │ │ the initial loop, and thwart the counter otherwise.

    │ │ │ │
    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    need_save_resume_data()

    │ │ │ │
    │ │ │ │ -bool need_save_resume_data (resume_data_flags_t flags) const;
    │ │ │ │  bool need_save_resume_data () const;
    │ │ │ │ +bool need_save_resume_data (resume_data_flags_t flags) const;
    │ │ │ │  
    │ │ │ │

    This function returns true if anything that is stored in the resume │ │ │ │ data has changed since the last time resume data was saved. │ │ │ │ The overload that takes flags let you ask if specific categories │ │ │ │ of properties have changed. These flags have the same behavior as in │ │ │ │ the save_resume_data() call.

    │ │ │ │

    This is a blocking call. It will wait for a response from │ │ │ │ @@ -877,27 +877,27 @@ │ │ │ │

    │ │ │ │

    Note

    │ │ │ │

    A torrent's resume data is considered saved as soon as the │ │ │ │ save_resume_data_alert is posted. It is important to make sure this │ │ │ │ alert is received and handled in order for this function to be │ │ │ │ meaningful.

    │ │ │ │
    │ │ │ │ - │ │ │ │ - │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    queue_position_up() queue_position_down() queue_position_bottom() queue_position() queue_position_top()

    │ │ │ │ + │ │ │ │ + │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    queue_position_bottom() queue_position_top() queue_position_down() queue_position_up() queue_position()

    │ │ │ │
    │ │ │ │ -void queue_position_bottom () const;
    │ │ │ │  void queue_position_up () const;
    │ │ │ │ -void queue_position_top () const;
    │ │ │ │  void queue_position_down () const;
    │ │ │ │  queue_position_t queue_position () const;
    │ │ │ │ +void queue_position_top () const;
    │ │ │ │ +void queue_position_bottom () const;
    │ │ │ │  
    │ │ │ │

    Every torrent that is added is assigned a queue position exactly one │ │ │ │ greater than the greatest queue position of all existing torrents. │ │ │ │ Torrents that are being seeded have -1 as their queue position, since │ │ │ │ they're no longer in line to be downloaded.

    │ │ │ │

    When a torrent is removed or turns into a seed, all torrents with │ │ │ │ greater queue positions have their positions decreased to fill in the │ │ │ │ @@ -916,26 +916,26 @@ │ │ │ │

    queue_position_set()

    │ │ │ │
    │ │ │ │  void queue_position_set (queue_position_t p) const;
    │ │ │ │  
    │ │ │ │

    updates the position in the queue for this torrent. The relative order │ │ │ │ of all other torrents remain intact but their numerical queue position │ │ │ │ shifts to make space for this torrent's new position

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    set_ssl_certificate_buffer() set_ssl_certificate()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    set_ssl_certificate() set_ssl_certificate_buffer()

    │ │ │ │
    │ │ │ │ +void set_ssl_certificate_buffer (std::string const& certificate
    │ │ │ │ +      , std::string const& private_key
    │ │ │ │ +      , std::string const& dh_params);
    │ │ │ │  void set_ssl_certificate (std::string const& certificate
    │ │ │ │        , std::string const& private_key
    │ │ │ │        , std::string const& dh_params
    │ │ │ │        , std::string const& passphrase = "");
    │ │ │ │ -void set_ssl_certificate_buffer (std::string const& certificate
    │ │ │ │ -      , std::string const& private_key
    │ │ │ │ -      , std::string const& dh_params);
    │ │ │ │  
    │ │ │ │

    For SSL torrents, use this to specify a path to a .pem file to use as │ │ │ │ this client's certificate. The certificate must be signed by the │ │ │ │ certificate in the .torrent file to be valid.

    │ │ │ │

    The set_ssl_certificate_buffer() overload takes the actual certificate, │ │ │ │ private key and DH params as strings, rather than paths to files.

    │ │ │ │

    cert is a path to the (signed) certificate in .pem format │ │ │ │ @@ -951,21 +951,21 @@ │ │ │ │

    Note that when a torrent first starts up, and it needs a certificate, │ │ │ │ it will suspend connecting to any peers until it has one. It's │ │ │ │ typically desirable to resume the torrent after setting the SSL │ │ │ │ certificate.

    │ │ │ │

    If you receive a torrent_need_cert_alert, you need to call this to │ │ │ │ provide a valid cert. If you don't have a cert you won't be allowed to │ │ │ │ connect to any peers.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    torrent_file_with_hashes() torrent_file()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    torrent_file() torrent_file_with_hashes()

    │ │ │ │
    │ │ │ │ -std::shared_ptr<torrent_info> torrent_file_with_hashes () const;
    │ │ │ │  std::shared_ptr<const torrent_info> torrent_file () const;
    │ │ │ │ +std::shared_ptr<torrent_info> torrent_file_with_hashes () const;
    │ │ │ │  
    │ │ │ │

    torrent_file() returns a pointer to the torrent_info object │ │ │ │ associated with this torrent. The torrent_info object may be a copy │ │ │ │ of the internal object. If the torrent doesn't have metadata, the │ │ │ │ pointer will not be initialized (i.e. a nullptr). The torrent may be │ │ │ │ in a state without metadata only if it was started without a .torrent │ │ │ │ file, e.g. by being added by magnet link.

    │ │ │ │ @@ -1002,37 +1002,37 @@ │ │ │ │ vector. This is a blocking call that will synchronize with the │ │ │ │ libtorrent network thread.

    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    piece_availability() post_piece_availability()

    │ │ │ │
    │ │ │ │ -void piece_availability (std::vector<int>& avail) const;
    │ │ │ │  void post_piece_availability () const;
    │ │ │ │ +void piece_availability (std::vector<int>& avail) const;
    │ │ │ │  
    │ │ │ │

    The piece availability is the number of peers that we are connected │ │ │ │ that has advertised having a particular piece. This is the information │ │ │ │ that libtorrent uses in order to prefer picking rare pieces.

    │ │ │ │

    post_piece_availability() will trigger a piece_availability_alert │ │ │ │ to be posted.

    │ │ │ │

    piece_availability() fills the specified std::vector<int> │ │ │ │ with the availability for each piece in this torrent. libtorrent does │ │ │ │ not keep track of availability for seeds, so if the torrent is │ │ │ │ seeding the availability for all pieces is reported as 0.

    │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    prioritize_pieces() get_piece_priorities() piece_priority()

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    piece_priority() prioritize_pieces() get_piece_priorities()

    │ │ │ │
    │ │ │ │ -void prioritize_pieces (std::vector<std::pair<piece_index_t, download_priority_t>> const& pieces) const;
    │ │ │ │ -std::vector<download_priority_t> get_piece_priorities () const;
    │ │ │ │ +void piece_priority (piece_index_t index, download_priority_t priority) const;
    │ │ │ │  void prioritize_pieces (std::vector<download_priority_t> const& pieces) const;
    │ │ │ │  download_priority_t piece_priority (piece_index_t index) const;
    │ │ │ │ -void piece_priority (piece_index_t index, download_priority_t priority) const;
    │ │ │ │ +void prioritize_pieces (std::vector<std::pair<piece_index_t, download_priority_t>> const& pieces) const;
    │ │ │ │ +std::vector<download_priority_t> get_piece_priorities () const;
    │ │ │ │  
    │ │ │ │

    These functions are used to set and get the priority of individual │ │ │ │ pieces. By default all pieces have priority 4. 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 │ │ │ │ priority levels. 0 means not to download the piece at all. Otherwise, │ │ │ │ lower priority values means less likely to be picked. Piece priority │ │ │ │ @@ -1054,24 +1054,24 @@ │ │ │ │ Invalid entries, where the piece index or priority is out of range, are │ │ │ │ not allowed.

    │ │ │ │

    get_piece_priorities returns a vector with one element for each piece │ │ │ │ in the torrent. Each element is the current priority of that piece.

    │ │ │ │

    It's possible to cancel the effect of file priorities by setting the │ │ │ │ priorities for the affected pieces. Care has to be taken when mixing │ │ │ │ usage of file- and piece priorities.

    │ │ │ │ + │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    prioritize_files() file_priority() get_file_priorities()

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    get_file_priorities() prioritize_files() file_priority()

    │ │ │ │
    │ │ │ │ -void prioritize_files (std::vector<download_priority_t> const& files) const;
    │ │ │ │  download_priority_t file_priority (file_index_t index) const;
    │ │ │ │  void file_priority (file_index_t index, download_priority_t priority) const;
    │ │ │ │  std::vector<download_priority_t> get_file_priorities () const;
    │ │ │ │ +void prioritize_files (std::vector<download_priority_t> const& files) const;
    │ │ │ │  
    │ │ │ │

    index must be in the range [0, number_of_files).

    │ │ │ │

    file_priority() queries or sets the priority of file index.

    │ │ │ │

    prioritize_files() takes a vector that has at as many elements as │ │ │ │ there are files in the torrent. Each entry is the priority of that │ │ │ │ file. The function sets the priorities of all the pieces in the │ │ │ │ torrent based on the vector.

    │ │ │ │ @@ -1094,22 +1094,22 @@ │ │ │ │ file_prio_alert.

    │ │ │ │

    When combining file- and piece priorities, the resume file will record │ │ │ │ both. When loading the resume data, the file priorities will be applied │ │ │ │ first, then the piece priorities.

    │ │ │ │

    Moving data from a file into the part file is currently not │ │ │ │ supported. If a file has its priority set to 0 after it has already │ │ │ │ been created, it will not be moved into the partfile.

    │ │ │ │ - │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    force_dht_announce() force_lsd_announce() force_reannounce()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    force_lsd_announce() force_reannounce() force_dht_announce()

    │ │ │ │
    │ │ │ │ -void force_dht_announce () const;
    │ │ │ │  void force_lsd_announce () const;
    │ │ │ │ +void force_dht_announce () const;
    │ │ │ │  void force_reannounce (int seconds = 0, int idx = -1, reannounce_flags_t = {}) const;
    │ │ │ │  
    │ │ │ │

    force_reannounce() will force this torrent to do another tracker │ │ │ │ request, to receive new peers. The seconds argument specifies how │ │ │ │ many seconds from now to issue the tracker announces.

    │ │ │ │

    If the tracker's min_interval has not passed since the last │ │ │ │ announce, the forced announce will be scheduled to happen immediately │ │ │ │ @@ -1134,25 +1134,25 @@ │ │ │ │ idx is >= 0, the tracker with the specified index will scraped.

    │ │ │ │

    A scrape request queries the tracker for statistics such as total │ │ │ │ number of incomplete peers, complete peers, number of downloads etc.

    │ │ │ │

    This request will specifically update the num_complete and │ │ │ │ num_incomplete fields in the torrent_status struct once it │ │ │ │ completes. When it completes, it will generate a scrape_reply_alert. │ │ │ │ If it fails, it will generate a scrape_failed_alert.

    │ │ │ │ - │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    download_limit() set_download_limit() set_upload_limit() upload_limit()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    upload_limit() set_upload_limit() download_limit() set_download_limit()

    │ │ │ │
    │ │ │ │ -int download_limit () const;
    │ │ │ │ -int upload_limit () const;
    │ │ │ │  void set_download_limit (int limit) const;
    │ │ │ │  void set_upload_limit (int limit) const;
    │ │ │ │ +int upload_limit () const;
    │ │ │ │ +int download_limit () const;
    │ │ │ │  
    │ │ │ │

    set_upload_limit will limit the upload bandwidth used by this │ │ │ │ particular torrent to the limit you set. It is given as the number of │ │ │ │ bytes per second the torrent is allowed to upload. │ │ │ │ set_download_limit works the same way but for download bandwidth │ │ │ │ instead of upload bandwidth. Note that setting a higher limit on a │ │ │ │ torrent then the global limit │ │ │ │ @@ -1198,21 +1198,21 @@ │ │ │ │ │ │ │ │

    set_max_uploads() sets the maximum number of peers that's unchoked │ │ │ │ at the same time on this torrent. If you set this to -1, there will be │ │ │ │ no limit. This defaults to infinite. The primary setting controlling │ │ │ │ this is the global unchoke slots limit, set by unchoke_slots_limit in │ │ │ │ settings_pack.

    │ │ │ │

    max_uploads() returns the current settings.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    set_max_connections() max_connections()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    max_connections() set_max_connections()

    │ │ │ │
    │ │ │ │ -int max_connections () const;
    │ │ │ │  void set_max_connections (int max_connections) const;
    │ │ │ │ +int max_connections () const;
    │ │ │ │  
    │ │ │ │

    set_max_connections() sets the maximum number of connection this │ │ │ │ torrent will open. If all connections are used up, incoming │ │ │ │ connections may be refused or poor connections may be closed. This │ │ │ │ must be at least 2. The default is unlimited number of connections. If │ │ │ │ -1 is given to the function, it means unlimited. There is also a │ │ │ │ global limit of the number of connections, set by │ │ │ │ @@ -1280,31 +1280,31 @@ │ │ │ │ operation is complete when either a file_renamed_alert or │ │ │ │ file_rename_failed_alert is posted.

    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    info_hashes() info_hash()

    │ │ │ │
    │ │ │ │ -info_hash_t info_hashes () const;
    │ │ │ │  sha1_hash info_hash () const;
    │ │ │ │ +info_hash_t info_hashes () const;
    │ │ │ │  
    │ │ │ │

    returns the info-hash(es) of the torrent. If this handle is to a │ │ │ │ torrent that hasn't loaded yet (for instance by being added) by a │ │ │ │ URL, the returned value is undefined. │ │ │ │ The info_hash() returns the SHA-1 info-hash for v1 torrents and a │ │ │ │ truncated hash for v2 torrents. For the full v2 info-hash, use │ │ │ │ info_hashes() instead.

    │ │ │ │ - │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │
    │ │ │ │ -

    operator!=() operator==() operator<()

    │ │ │ │ +

    operator==() operator!=() operator<()

    │ │ │ │
    │ │ │ │ -bool operator== (const torrent_handle& h) const;
    │ │ │ │  bool operator< (const torrent_handle& h) const;
    │ │ │ │ +bool operator== (const torrent_handle& h) const;
    │ │ │ │  bool operator!= (const torrent_handle& h) const;
    │ │ │ │  
    │ │ │ │

    comparison operators. The order of the torrents is unspecified │ │ │ │ but stable.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    id()

    │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -8,68 +8,68 @@ │ │ │ │ │ o _e_n_u_m_ _b_l_o_c_k___s_t_a_t_e___t │ │ │ │ │ * _p_a_r_t_i_a_l___p_i_e_c_e___i_n_f_o │ │ │ │ │ * _t_o_r_r_e_n_t___h_a_n_d_l_e │ │ │ │ │ o _t_o_r_r_e_n_t___h_a_n_d_l_e_(_) │ │ │ │ │ o _a_d_d___p_i_e_c_e_(_) │ │ │ │ │ o _r_e_a_d___p_i_e_c_e_(_) │ │ │ │ │ o _h_a_v_e___p_i_e_c_e_(_) │ │ │ │ │ - o _p_o_s_t___p_e_e_r___i_n_f_o_(_)_ _g_e_t___p_e_e_r___i_n_f_o_(_) │ │ │ │ │ - o _s_t_a_t_u_s_(_)_ _p_o_s_t___s_t_a_t_u_s_(_) │ │ │ │ │ + o _g_e_t___p_e_e_r___i_n_f_o_(_)_ _p_o_s_t___p_e_e_r___i_n_f_o_(_) │ │ │ │ │ + o _p_o_s_t___s_t_a_t_u_s_(_)_ _s_t_a_t_u_s_(_) │ │ │ │ │ o _g_e_t___d_o_w_n_l_o_a_d___q_u_e_u_e_(_)_ _p_o_s_t___d_o_w_n_l_o_a_d___q_u_e_u_e_(_) │ │ │ │ │ - o _c_l_e_a_r___p_i_e_c_e___d_e_a_d_l_i_n_e_s_(_)_ _r_e_s_e_t___p_i_e_c_e___d_e_a_d_l_i_n_e_(_)_ _s_e_t___p_i_e_c_e___d_e_a_d_l_i_n_e_(_) │ │ │ │ │ - o _p_o_s_t___f_i_l_e___p_r_o_g_r_e_s_s_(_)_ _f_i_l_e___p_r_o_g_r_e_s_s_(_) │ │ │ │ │ + o _r_e_s_e_t___p_i_e_c_e___d_e_a_d_l_i_n_e_(_)_ _s_e_t___p_i_e_c_e___d_e_a_d_l_i_n_e_(_)_ _c_l_e_a_r___p_i_e_c_e___d_e_a_d_l_i_n_e_s_(_) │ │ │ │ │ + o _f_i_l_e___p_r_o_g_r_e_s_s_(_)_ _p_o_s_t___f_i_l_e___p_r_o_g_r_e_s_s_(_) │ │ │ │ │ o _f_i_l_e___s_t_a_t_u_s_(_) │ │ │ │ │ o _c_l_e_a_r___e_r_r_o_r_(_) │ │ │ │ │ - o _t_r_a_c_k_e_r_s_(_)_ _p_o_s_t___t_r_a_c_k_e_r_s_(_)_ _a_d_d___t_r_a_c_k_e_r_(_)_ _r_e_p_l_a_c_e___t_r_a_c_k_e_r_s_(_) │ │ │ │ │ - o _u_r_l___s_e_e_d_s_(_)_ _a_d_d___u_r_l___s_e_e_d_(_)_ _r_e_m_o_v_e___u_r_l___s_e_e_d_(_) │ │ │ │ │ - o _r_e_m_o_v_e___h_t_t_p___s_e_e_d_(_)_ _h_t_t_p___s_e_e_d_s_(_)_ _a_d_d___h_t_t_p___s_e_e_d_(_) │ │ │ │ │ + o _a_d_d___t_r_a_c_k_e_r_(_)_ _p_o_s_t___t_r_a_c_k_e_r_s_(_)_ _r_e_p_l_a_c_e___t_r_a_c_k_e_r_s_(_)_ _t_r_a_c_k_e_r_s_(_) │ │ │ │ │ + o _r_e_m_o_v_e___u_r_l___s_e_e_d_(_)_ _a_d_d___u_r_l___s_e_e_d_(_)_ _u_r_l___s_e_e_d_s_(_) │ │ │ │ │ + o _h_t_t_p___s_e_e_d_s_(_)_ _r_e_m_o_v_e___h_t_t_p___s_e_e_d_(_)_ _a_d_d___h_t_t_p___s_e_e_d_(_) │ │ │ │ │ o _a_d_d___e_x_t_e_n_s_i_o_n_(_) │ │ │ │ │ o _s_e_t___m_e_t_a_d_a_t_a_(_) │ │ │ │ │ o _i_s___v_a_l_i_d_(_) │ │ │ │ │ - o _r_e_s_u_m_e_(_)_ _p_a_u_s_e_(_) │ │ │ │ │ - o _s_e_t___f_l_a_g_s_(_)_ _f_l_a_g_s_(_)_ _u_n_s_e_t___f_l_a_g_s_(_) │ │ │ │ │ + o _p_a_u_s_e_(_)_ _r_e_s_u_m_e_(_) │ │ │ │ │ + o _f_l_a_g_s_(_)_ _s_e_t___f_l_a_g_s_(_)_ _u_n_s_e_t___f_l_a_g_s_(_) │ │ │ │ │ o _f_l_u_s_h___c_a_c_h_e_(_) │ │ │ │ │ o _f_o_r_c_e___r_e_c_h_e_c_k_(_) │ │ │ │ │ o _s_a_v_e___r_e_s_u_m_e___d_a_t_a_(_) │ │ │ │ │ o _n_e_e_d___s_a_v_e___r_e_s_u_m_e___d_a_t_a_(_) │ │ │ │ │ - o _q_u_e_u_e___p_o_s_i_t_i_o_n___u_p_(_)_ _q_u_e_u_e___p_o_s_i_t_i_o_n___d_o_w_n_(_)_ _q_u_e_u_e___p_o_s_i_t_i_o_n___b_o_t_t_o_m_(_) │ │ │ │ │ - _q_u_e_u_e___p_o_s_i_t_i_o_n_(_)_ _q_u_e_u_e___p_o_s_i_t_i_o_n___t_o_p_(_) │ │ │ │ │ + o _q_u_e_u_e___p_o_s_i_t_i_o_n___b_o_t_t_o_m_(_)_ _q_u_e_u_e___p_o_s_i_t_i_o_n___t_o_p_(_)_ _q_u_e_u_e___p_o_s_i_t_i_o_n___d_o_w_n_(_) │ │ │ │ │ + _q_u_e_u_e___p_o_s_i_t_i_o_n___u_p_(_)_ _q_u_e_u_e___p_o_s_i_t_i_o_n_(_) │ │ │ │ │ o _q_u_e_u_e___p_o_s_i_t_i_o_n___s_e_t_(_) │ │ │ │ │ - o _s_e_t___s_s_l___c_e_r_t_i_f_i_c_a_t_e___b_u_f_f_e_r_(_)_ _s_e_t___s_s_l___c_e_r_t_i_f_i_c_a_t_e_(_) │ │ │ │ │ - o _t_o_r_r_e_n_t___f_i_l_e___w_i_t_h___h_a_s_h_e_s_(_)_ _t_o_r_r_e_n_t___f_i_l_e_(_) │ │ │ │ │ + o _s_e_t___s_s_l___c_e_r_t_i_f_i_c_a_t_e_(_)_ _s_e_t___s_s_l___c_e_r_t_i_f_i_c_a_t_e___b_u_f_f_e_r_(_) │ │ │ │ │ + o _t_o_r_r_e_n_t___f_i_l_e_(_)_ _t_o_r_r_e_n_t___f_i_l_e___w_i_t_h___h_a_s_h_e_s_(_) │ │ │ │ │ o _p_i_e_c_e___l_a_y_e_r_s_(_) │ │ │ │ │ o _p_i_e_c_e___a_v_a_i_l_a_b_i_l_i_t_y_(_)_ _p_o_s_t___p_i_e_c_e___a_v_a_i_l_a_b_i_l_i_t_y_(_) │ │ │ │ │ - o _p_r_i_o_r_i_t_i_z_e___p_i_e_c_e_s_(_)_ _g_e_t___p_i_e_c_e___p_r_i_o_r_i_t_i_e_s_(_)_ _p_i_e_c_e___p_r_i_o_r_i_t_y_(_) │ │ │ │ │ - o _p_r_i_o_r_i_t_i_z_e___f_i_l_e_s_(_)_ _f_i_l_e___p_r_i_o_r_i_t_y_(_)_ _g_e_t___f_i_l_e___p_r_i_o_r_i_t_i_e_s_(_) │ │ │ │ │ - o _f_o_r_c_e___d_h_t___a_n_n_o_u_n_c_e_(_)_ _f_o_r_c_e___l_s_d___a_n_n_o_u_n_c_e_(_)_ _f_o_r_c_e___r_e_a_n_n_o_u_n_c_e_(_) │ │ │ │ │ + o _p_i_e_c_e___p_r_i_o_r_i_t_y_(_)_ _p_r_i_o_r_i_t_i_z_e___p_i_e_c_e_s_(_)_ _g_e_t___p_i_e_c_e___p_r_i_o_r_i_t_i_e_s_(_) │ │ │ │ │ + o _g_e_t___f_i_l_e___p_r_i_o_r_i_t_i_e_s_(_)_ _p_r_i_o_r_i_t_i_z_e___f_i_l_e_s_(_)_ _f_i_l_e___p_r_i_o_r_i_t_y_(_) │ │ │ │ │ + o _f_o_r_c_e___l_s_d___a_n_n_o_u_n_c_e_(_)_ _f_o_r_c_e___r_e_a_n_n_o_u_n_c_e_(_)_ _f_o_r_c_e___d_h_t___a_n_n_o_u_n_c_e_(_) │ │ │ │ │ o _s_c_r_a_p_e___t_r_a_c_k_e_r_(_) │ │ │ │ │ - o _d_o_w_n_l_o_a_d___l_i_m_i_t_(_)_ _s_e_t___d_o_w_n_l_o_a_d___l_i_m_i_t_(_)_ _s_e_t___u_p_l_o_a_d___l_i_m_i_t_(_) │ │ │ │ │ - _u_p_l_o_a_d___l_i_m_i_t_(_) │ │ │ │ │ + o _u_p_l_o_a_d___l_i_m_i_t_(_)_ _s_e_t___u_p_l_o_a_d___l_i_m_i_t_(_)_ _d_o_w_n_l_o_a_d___l_i_m_i_t_(_) │ │ │ │ │ + _s_e_t___d_o_w_n_l_o_a_d___l_i_m_i_t_(_) │ │ │ │ │ o _c_o_n_n_e_c_t___p_e_e_r_(_) │ │ │ │ │ o _c_l_e_a_r___p_e_e_r_s_(_) │ │ │ │ │ o _s_e_t___m_a_x___u_p_l_o_a_d_s_(_)_ _m_a_x___u_p_l_o_a_d_s_(_) │ │ │ │ │ - o _s_e_t___m_a_x___c_o_n_n_e_c_t_i_o_n_s_(_)_ _m_a_x___c_o_n_n_e_c_t_i_o_n_s_(_) │ │ │ │ │ + o _m_a_x___c_o_n_n_e_c_t_i_o_n_s_(_)_ _s_e_t___m_a_x___c_o_n_n_e_c_t_i_o_n_s_(_) │ │ │ │ │ o _m_o_v_e___s_t_o_r_a_g_e_(_) │ │ │ │ │ o _r_e_n_a_m_e___f_i_l_e_(_) │ │ │ │ │ o _i_n_f_o___h_a_s_h_e_s_(_)_ _i_n_f_o___h_a_s_h_(_) │ │ │ │ │ - o _o_p_e_r_a_t_o_r_!_=_(_)_ _o_p_e_r_a_t_o_r_=_=_(_)_ _o_p_e_r_a_t_o_r_<_(_) │ │ │ │ │ + o _o_p_e_r_a_t_o_r_=_=_(_)_ _o_p_e_r_a_t_o_r_!_=_(_)_ _o_p_e_r_a_t_o_r_<_(_) │ │ │ │ │ o _i_d_(_) │ │ │ │ │ o _n_a_t_i_v_e___h_a_n_d_l_e_(_) │ │ │ │ │ o _u_s_e_r_d_a_t_a_(_) │ │ │ │ │ o _i_n___s_e_s_s_i_o_n_(_) │ │ │ │ │ * _h_a_s_h___v_a_l_u_e_(_) │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ bblloocckk__iinnffoo ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_t_o_r_r_e_n_t___h_a_n_d_l_e_._h_p_p" │ │ │ │ │ holds the state of a block in a piece. Who we requested it from and how far │ │ │ │ │ along we are at downloading it. │ │ │ │ │ struct block_info │ │ │ │ │ { │ │ │ │ │ - _t_c_p_:_:_e_n_d_p_o_i_n_t ppeeeerr () const; │ │ │ │ │ void sseett__ppeeeerr (tcp::endpoint const& ep); │ │ │ │ │ + _t_c_p_:_:_e_n_d_p_o_i_n_t ppeeeerr () const; │ │ │ │ │ │ │ │ │ │ enum block_state_t │ │ │ │ │ { │ │ │ │ │ none, │ │ │ │ │ requested, │ │ │ │ │ writing, │ │ │ │ │ finished, │ │ │ │ │ @@ -78,16 +78,16 @@ │ │ │ │ │ unsigned bytes_progress:15; │ │ │ │ │ unsigned block_size:15; │ │ │ │ │ unsigned state:2; │ │ │ │ │ unsigned num_peers:14; │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ppeeeerr(()) sseett__ppeeeerr(()) ********** │ │ │ │ │ -_t_c_p_:_:_e_n_d_p_o_i_n_t ppeeeerr () const; │ │ │ │ │ void sseett__ppeeeerr (tcp::endpoint const& ep); │ │ │ │ │ +_t_c_p_:_:_e_n_d_p_o_i_n_t ppeeeerr () const; │ │ │ │ │ The peer is the ip address of the peer this block was downloaded from. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** eennuumm bblloocckk__ssttaattee__tt ********** │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_t_o_r_r_e_n_t___h_a_n_d_l_e_._h_p_p" │ │ │ │ │ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ │ │ │ │ │ |_nn_aa_mm_ee_ _ _ _ _ _|_vv_aa_ll_uu_ee_|_dd_ee_ss_cc_rr_ii_pp_tt_ii_oo_nn_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | │ │ │ │ │ |none |0 |This block has not been downloaded or requested form any | │ │ │ │ │ @@ -175,119 +175,119 @@ │ │ │ │ │ the handle is no longer referring to a torrent. There is one exception _i_s___v_a_l_i_d │ │ │ │ │ _(_) 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. │ │ │ │ │ struct torrent_handle │ │ │ │ │ { │ │ │ │ │ friend std::size_t hhaasshh__vvaalluuee (torrent_handle const& th); │ │ │ │ │ ttoorrrreenntt__hhaannddllee () noexcept = default; │ │ │ │ │ - void aadddd__ppiieeccee (piece_index_t piece, std::vector data, │ │ │ │ │ -add_piece_flags_t flags = {}) const; │ │ │ │ │ void aadddd__ppiieeccee (piece_index_t piece, char const* data, add_piece_flags_t │ │ │ │ │ flags = {}) const; │ │ │ │ │ + void aadddd__ppiieeccee (piece_index_t piece, std::vector data, │ │ │ │ │ +add_piece_flags_t flags = {}) const; │ │ │ │ │ void rreeaadd__ppiieeccee (piece_index_t piece) const; │ │ │ │ │ bool hhaavvee__ppiieeccee (piece_index_t piece) const; │ │ │ │ │ - void ppoosstt__ppeeeerr__iinnffoo () const; │ │ │ │ │ void ggeett__ppeeeerr__iinnffoo (std::vector& v) const; │ │ │ │ │ - void ppoosstt__ssttaattuuss (status_flags_t flags = status_flags_t::all()) const; │ │ │ │ │ + void ppoosstt__ppeeeerr__iinnffoo () const; │ │ │ │ │ torrent_status ssttaattuuss (status_flags_t flags = status_flags_t::all()) const; │ │ │ │ │ - void ggeett__ddoowwnnllooaadd__qquueeuuee (std::vector& queue) const; │ │ │ │ │ + void ppoosstt__ssttaattuuss (status_flags_t flags = status_flags_t::all()) const; │ │ │ │ │ std::vector ggeett__ddoowwnnllooaadd__qquueeuuee () const; │ │ │ │ │ + void ggeett__ddoowwnnllooaadd__qquueeuuee (std::vector& queue) const; │ │ │ │ │ void ppoosstt__ddoowwnnllooaadd__qquueeuuee () const; │ │ │ │ │ - void rreesseett__ppiieeccee__ddeeaaddlliinnee (piece_index_t index) const; │ │ │ │ │ - void cclleeaarr__ppiieeccee__ddeeaaddlliinneess () const; │ │ │ │ │ void sseett__ppiieeccee__ddeeaaddlliinnee (piece_index_t index, int deadline, deadline_flags_t │ │ │ │ │ flags = {}) const; │ │ │ │ │ - void ppoosstt__ffiillee__pprrooggrreessss (file_progress_flags_t flags) const; │ │ │ │ │ + void cclleeaarr__ppiieeccee__ddeeaaddlliinneess () const; │ │ │ │ │ + void rreesseett__ppiieeccee__ddeeaaddlliinnee (piece_index_t index) const; │ │ │ │ │ void ffiillee__pprrooggrreessss (std::vector& progress, │ │ │ │ │ file_progress_flags_t flags = {}) const; │ │ │ │ │ std::vector ffiillee__pprrooggrreessss (file_progress_flags_t flags = {}) │ │ │ │ │ const; │ │ │ │ │ + void ppoosstt__ffiillee__pprrooggrreessss (file_progress_flags_t flags) const; │ │ │ │ │ std::vector ffiillee__ssttaattuuss () const; │ │ │ │ │ void cclleeaarr__eerrrroorr () const; │ │ │ │ │ + void rreeppllaaccee__ttrraacckkeerrss (std::vector const&) const; │ │ │ │ │ + void ppoosstt__ttrraacckkeerrss () const; │ │ │ │ │ void aadddd__ttrraacckkeerr (announce_entry const&) const; │ │ │ │ │ std::vector ttrraacckkeerrss () const; │ │ │ │ │ - void ppoosstt__ttrraacckkeerrss () const; │ │ │ │ │ - void rreeppllaaccee__ttrraacckkeerrss (std::vector const&) const; │ │ │ │ │ std::set uurrll__sseeeeddss () const; │ │ │ │ │ - void aadddd__uurrll__sseeeedd (std::string const& url) const; │ │ │ │ │ void rreemmoovvee__uurrll__sseeeedd (std::string const& url) const; │ │ │ │ │ - void rreemmoovvee__hhttttpp__sseeeedd (std::string const& url) const; │ │ │ │ │ - std::set hhttttpp__sseeeeddss () const; │ │ │ │ │ + void aadddd__uurrll__sseeeedd (std::string const& url) const; │ │ │ │ │ void aadddd__hhttttpp__sseeeedd (std::string const& url) const; │ │ │ │ │ + std::set hhttttpp__sseeeeddss () const; │ │ │ │ │ + void rreemmoovvee__hhttttpp__sseeeedd (std::string const& url) const; │ │ │ │ │ void aadddd__eexxtteennssiioonn ( │ │ │ │ │ std::function(torrent_handle const&, │ │ │ │ │ client_data_t)> const& ext │ │ │ │ │ , client_data_t userdata = client_data_t{}); │ │ │ │ │ bool sseett__mmeettaaddaattaa (span metadata) const; │ │ │ │ │ bool iiss__vvaalliidd () const; │ │ │ │ │ void rreessuummee () const; │ │ │ │ │ void ppaauussee (pause_flags_t flags = {}) const; │ │ │ │ │ - void uunnsseett__ffllaaggss (torrent_flags_t flags) const; │ │ │ │ │ - void sseett__ffllaaggss (torrent_flags_t flags, torrent_flags_t mask) const; │ │ │ │ │ torrent_flags_t ffllaaggss () const; │ │ │ │ │ + void uunnsseett__ffllaaggss (torrent_flags_t flags) const; │ │ │ │ │ void sseett__ffllaaggss (torrent_flags_t flags) const; │ │ │ │ │ + void sseett__ffllaaggss (torrent_flags_t flags, torrent_flags_t mask) const; │ │ │ │ │ void fflluusshh__ccaacchhee () const; │ │ │ │ │ void ffoorrccee__rreecchheecckk () const; │ │ │ │ │ void ssaavvee__rreessuummee__ddaattaa (resume_data_flags_t flags = {}) const; │ │ │ │ │ - bool nneeeedd__ssaavvee__rreessuummee__ddaattaa (resume_data_flags_t flags) const; │ │ │ │ │ bool nneeeedd__ssaavvee__rreessuummee__ddaattaa () const; │ │ │ │ │ - void qquueeuuee__ppoossiittiioonn__bboottttoomm () const; │ │ │ │ │ + bool nneeeedd__ssaavvee__rreessuummee__ddaattaa (resume_data_flags_t flags) const; │ │ │ │ │ void qquueeuuee__ppoossiittiioonn__uupp () const; │ │ │ │ │ - void qquueeuuee__ppoossiittiioonn__ttoopp () const; │ │ │ │ │ void qquueeuuee__ppoossiittiioonn__ddoowwnn () const; │ │ │ │ │ queue_position_t qquueeuuee__ppoossiittiioonn () const; │ │ │ │ │ + void qquueeuuee__ppoossiittiioonn__ttoopp () const; │ │ │ │ │ + void qquueeuuee__ppoossiittiioonn__bboottttoomm () const; │ │ │ │ │ void qquueeuuee__ppoossiittiioonn__sseett (queue_position_t p) const; │ │ │ │ │ + void sseett__ssssll__cceerrttiiffiiccaattee__bbuuffffeerr (std::string const& certificate │ │ │ │ │ + , std::string const& private_key │ │ │ │ │ + , std::string const& dh_params); │ │ │ │ │ void sseett__ssssll__cceerrttiiffiiccaattee (std::string const& certificate │ │ │ │ │ , std::string const& private_key │ │ │ │ │ , std::string const& dh_params │ │ │ │ │ , std::string const& passphrase = ""); │ │ │ │ │ - void sseett__ssssll__cceerrttiiffiiccaattee__bbuuffffeerr (std::string const& certificate │ │ │ │ │ - , std::string const& private_key │ │ │ │ │ - , std::string const& dh_params); │ │ │ │ │ - std::shared_ptr ttoorrrreenntt__ffiillee__wwiitthh__hhaasshheess () const; │ │ │ │ │ std::shared_ptr ttoorrrreenntt__ffiillee () const; │ │ │ │ │ + std::shared_ptr ttoorrrreenntt__ffiillee__wwiitthh__hhaasshheess () const; │ │ │ │ │ std::vector> ppiieeccee__llaayyeerrss () const; │ │ │ │ │ - void ppiieeccee__aavvaaiillaabbiilliittyy (std::vector& avail) const; │ │ │ │ │ void ppoosstt__ppiieeccee__aavvaaiillaabbiilliittyy () const; │ │ │ │ │ - void pprriioorriittiizzee__ppiieecceess (std::vector> const& pieces) const; │ │ │ │ │ - std::vector ggeett__ppiieeccee__pprriioorriittiieess () const; │ │ │ │ │ + void ppiieeccee__aavvaaiillaabbiilliittyy (std::vector& avail) const; │ │ │ │ │ + void ppiieeccee__pprriioorriittyy (piece_index_t index, download_priority_t priority) │ │ │ │ │ +const; │ │ │ │ │ void pprriioorriittiizzee__ppiieecceess (std::vector const& pieces) │ │ │ │ │ const; │ │ │ │ │ download_priority_t ppiieeccee__pprriioorriittyy (piece_index_t index) const; │ │ │ │ │ - void ppiieeccee__pprriioorriittyy (piece_index_t index, download_priority_t priority) │ │ │ │ │ -const; │ │ │ │ │ - void pprriioorriittiizzee__ffiilleess (std::vector const& files) const; │ │ │ │ │ + void pprriioorriittiizzee__ppiieecceess (std::vector> const& pieces) const; │ │ │ │ │ + std::vector ggeett__ppiieeccee__pprriioorriittiieess () const; │ │ │ │ │ download_priority_t ffiillee__pprriioorriittyy (file_index_t index) const; │ │ │ │ │ void ffiillee__pprriioorriittyy (file_index_t index, download_priority_t priority) const; │ │ │ │ │ std::vector ggeett__ffiillee__pprriioorriittiieess () const; │ │ │ │ │ - void ffoorrccee__ddhhtt__aannnnoouunnccee () const; │ │ │ │ │ + void pprriioorriittiizzee__ffiilleess (std::vector const& files) const; │ │ │ │ │ void ffoorrccee__llssdd__aannnnoouunnccee () const; │ │ │ │ │ + void ffoorrccee__ddhhtt__aannnnoouunnccee () const; │ │ │ │ │ void ffoorrccee__rreeaannnnoouunnccee (int seconds = 0, int idx = -1, reannounce_flags_t = │ │ │ │ │ {}) const; │ │ │ │ │ void ssccrraappee__ttrraacckkeerr (int idx = -1) const; │ │ │ │ │ - int ddoowwnnllooaadd__lliimmiitt () const; │ │ │ │ │ - int uuppllooaadd__lliimmiitt () const; │ │ │ │ │ void sseett__ddoowwnnllooaadd__lliimmiitt (int limit) const; │ │ │ │ │ void sseett__uuppllooaadd__lliimmiitt (int limit) const; │ │ │ │ │ + int uuppllooaadd__lliimmiitt () const; │ │ │ │ │ + int ddoowwnnllooaadd__lliimmiitt () const; │ │ │ │ │ void ccoonnnneecctt__ppeeeerr (tcp::endpoint const& adr, peer_source_flags_t source = {} │ │ │ │ │ , pex_flags_t flags = pex_encryption | pex_utp | pex_holepunch) const; │ │ │ │ │ void cclleeaarr__ppeeeerrss (); │ │ │ │ │ void sseett__mmaaxx__uuppllooaaddss (int max_uploads) const; │ │ │ │ │ int mmaaxx__uuppllooaaddss () const; │ │ │ │ │ - int mmaaxx__ccoonnnneeccttiioonnss () const; │ │ │ │ │ void sseett__mmaaxx__ccoonnnneeccttiioonnss (int max_connections) const; │ │ │ │ │ + int mmaaxx__ccoonnnneeccttiioonnss () const; │ │ │ │ │ void mmoovvee__ssttoorraaggee (std::string const& save_path │ │ │ │ │ , move_flags_t flags = move_flags_t::always_replace_files │ │ │ │ │ ) const; │ │ │ │ │ void rreennaammee__ffiillee (file_index_t index, std::string const& new_name) const; │ │ │ │ │ - info_hash_t iinnffoo__hhaasshheess () const; │ │ │ │ │ sha1_hash iinnffoo__hhaasshh () const; │ │ │ │ │ - bool ooppeerraattoorr==== (const torrent_handle& h) const; │ │ │ │ │ + info_hash_t iinnffoo__hhaasshheess () const; │ │ │ │ │ bool ooppeerraattoorr<< (const torrent_handle& h) const; │ │ │ │ │ + bool ooppeerraattoorr==== (const torrent_handle& h) const; │ │ │ │ │ bool ooppeerraattoorr!!== (const torrent_handle& h) const; │ │ │ │ │ std::uint32_t iidd () const; │ │ │ │ │ std::shared_ptr nnaattiivvee__hhaannddllee () const; │ │ │ │ │ client_data_t uusseerrddaattaa () const; │ │ │ │ │ bool iinn__sseessssiioonn () const; │ │ │ │ │ │ │ │ │ │ static constexpr add_piece_flags_t oovveerrwwrriittee__eexxiissttiinngg = 0_bit; │ │ │ │ │ @@ -315,18 +315,18 @@ │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ttoorrrreenntt__hhaannddllee(()) ********** │ │ │ │ │ ttoorrrreenntt__hhaannddllee () noexcept = default; │ │ │ │ │ constructs a torrent handle that does not refer to a torrent. i.e. _i_s___v_a_l_i_d_(_) │ │ │ │ │ will return false. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** aadddd__ppiieeccee(()) ********** │ │ │ │ │ -void aadddd__ppiieeccee (piece_index_t piece, std::vector data, add_piece_flags_t │ │ │ │ │ -flags = {}) const; │ │ │ │ │ void aadddd__ppiieeccee (piece_index_t piece, char const* data, add_piece_flags_t flags │ │ │ │ │ = {}) const; │ │ │ │ │ +void aadddd__ppiieeccee (piece_index_t piece, std::vector data, add_piece_flags_t │ │ │ │ │ +flags = {}) const; │ │ │ │ │ This function will write data to the storage as piece piece, as if it had been │ │ │ │ │ downloaded from a peer. │ │ │ │ │ By default, data that's already been downloaded is not overwritten by this │ │ │ │ │ buffer. If you trust this data to be correct (and pass the piece hash check) │ │ │ │ │ you may pass the overwrite_existing flag. This will instruct libtorrent to │ │ │ │ │ overwrite any data that may already have been downloaded with this data. │ │ │ │ │ Since the data is written asynchronously, you may know that is passed or failed │ │ │ │ │ @@ -354,30 +354,30 @@ │ │ │ │ │ to finish in the same order as you initiated them. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** hhaavvee__ppiieeccee(()) ********** │ │ │ │ │ bool hhaavvee__ppiieeccee (piece_index_t piece) const; │ │ │ │ │ Returns true if this piece has been completely downloaded and written to disk, │ │ │ │ │ and false otherwise. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ppoosstt__ppeeeerr__iinnffoo(()) ggeett__ppeeeerr__iinnffoo(()) ********** │ │ │ │ │ -void ppoosstt__ppeeeerr__iinnffoo () const; │ │ │ │ │ +********** ggeett__ppeeeerr__iinnffoo(()) ppoosstt__ppeeeerr__iinnffoo(()) ********** │ │ │ │ │ void ggeett__ppeeeerr__iinnffoo (std::vector& v) const; │ │ │ │ │ +void ppoosstt__ppeeeerr__iinnffoo () const; │ │ │ │ │ Query information about connected peers for this torrent. If the _t_o_r_r_e_n_t___h_a_n_d_l_e │ │ │ │ │ is invalid, it will throw a system_error exception. │ │ │ │ │ post_peer_info() is asynchronous and will trigger the posting of a │ │ │ │ │ _p_e_e_r___i_n_f_o___a_l_e_r_t. The _a_l_e_r_t contain a list of _p_e_e_r___i_n_f_o objects, one for each │ │ │ │ │ connected peer. │ │ │ │ │ get_peer_info() is synchronous and takes a reference to a vector that will be │ │ │ │ │ cleared and filled with one _e_n_t_r_y for each peer connected to this torrent, │ │ │ │ │ given the handle is valid. Each _e_n_t_r_y in the vector contains information about │ │ │ │ │ that particular peer. See _p_e_e_r___i_n_f_o. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ssttaattuuss(()) ppoosstt__ssttaattuuss(()) ********** │ │ │ │ │ -void ppoosstt__ssttaattuuss (status_flags_t flags = status_flags_t::all()) const; │ │ │ │ │ +********** ppoosstt__ssttaattuuss(()) ssttaattuuss(()) ********** │ │ │ │ │ torrent_status ssttaattuuss (status_flags_t flags = status_flags_t::all()) const; │ │ │ │ │ +void ppoosstt__ssttaattuuss (status_flags_t flags = status_flags_t::all()) const; │ │ │ │ │ status() will return a structure with information about the status of this │ │ │ │ │ torrent. If the _t_o_r_r_e_n_t___h_a_n_d_l_e is invalid, it will throw system_error │ │ │ │ │ exception. See _t_o_r_r_e_n_t___s_t_a_t_u_s. The flags argument filters what information is │ │ │ │ │ returned in the _t_o_r_r_e_n_t___s_t_a_t_u_s. Some information in there is relatively │ │ │ │ │ expensive to calculate, and if you're not interested in it (and see performance │ │ │ │ │ issues), you can filter them out. │ │ │ │ │ The status() function will block until the internal libtorrent thread responds │ │ │ │ │ @@ -386,28 +386,28 @@ │ │ │ │ │ object for this torrent. │ │ │ │ │ In order to get regular updates for torrents whose status changes, consider │ │ │ │ │ calling session::post_torrent_updates()`` instead. │ │ │ │ │ By default everything is included. The flags you can use to decide what to │ │ │ │ │ iinncclluuddee are defined in this class. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ggeett__ddoowwnnllooaadd__qquueeuuee(()) ppoosstt__ddoowwnnllooaadd__qquueeuuee(()) ********** │ │ │ │ │ -void ggeett__ddoowwnnllooaadd__qquueeuuee (std::vector& queue) const; │ │ │ │ │ std::vector ggeett__ddoowwnnllooaadd__qquueeuuee () const; │ │ │ │ │ +void ggeett__ddoowwnnllooaadd__qquueeuuee (std::vector& queue) const; │ │ │ │ │ void ppoosstt__ddoowwnnllooaadd__qquueeuuee () const; │ │ │ │ │ post_download_queue() triggers a download_queue_alert to be posted. │ │ │ │ │ get_download_queue() is a synchronous call and returns a vector with │ │ │ │ │ information about pieces that are partially downloaded or not downloaded but │ │ │ │ │ partially requested. See _p_a_r_t_i_a_l___p_i_e_c_e___i_n_f_o for the fields in the returned │ │ │ │ │ vector. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** cclleeaarr__ppiieeccee__ddeeaaddlliinneess(()) rreesseett__ppiieeccee__ddeeaaddlliinnee(()) sseett__ppiieeccee__ddeeaaddlliinnee(()) ********** │ │ │ │ │ -void rreesseett__ppiieeccee__ddeeaaddlliinnee (piece_index_t index) const; │ │ │ │ │ -void cclleeaarr__ppiieeccee__ddeeaaddlliinneess () const; │ │ │ │ │ +********** rreesseett__ppiieeccee__ddeeaaddlliinnee(()) sseett__ppiieeccee__ddeeaaddlliinnee(()) cclleeaarr__ppiieeccee__ddeeaaddlliinneess(()) ********** │ │ │ │ │ void sseett__ppiieeccee__ddeeaaddlliinnee (piece_index_t index, int deadline, deadline_flags_t │ │ │ │ │ flags = {}) const; │ │ │ │ │ +void cclleeaarr__ppiieeccee__ddeeaaddlliinneess () const; │ │ │ │ │ +void rreesseett__ppiieeccee__ddeeaaddlliinnee (piece_index_t index) const; │ │ │ │ │ This function sets or resets the deadline associated with a specific piece │ │ │ │ │ index (index). 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. │ │ │ │ │ If the piece is already downloaded when this call is made, nothing happens, │ │ │ │ │ @@ -415,20 +415,20 @@ │ │ │ │ │ same effect as calling _r_e_a_d___p_i_e_c_e_(_) for index. │ │ │ │ │ deadline is the number of milliseconds until this piece should be completed. │ │ │ │ │ reset_piece_deadline removes the deadline from the piece. If it hasn't already │ │ │ │ │ been downloaded, it will no longer be considered a priority. │ │ │ │ │ clear_piece_deadlines() removes deadlines on all pieces in the torrent. As if │ │ │ │ │ _r_e_s_e_t___p_i_e_c_e___d_e_a_d_l_i_n_e_(_) was called on all pieces. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ppoosstt__ffiillee__pprrooggrreessss(()) ffiillee__pprrooggrreessss(()) ********** │ │ │ │ │ -void ppoosstt__ffiillee__pprrooggrreessss (file_progress_flags_t flags) const; │ │ │ │ │ +********** ffiillee__pprrooggrreessss(()) ppoosstt__ffiillee__pprrooggrreessss(()) ********** │ │ │ │ │ void ffiillee__pprrooggrreessss (std::vector& progress, file_progress_flags_t │ │ │ │ │ flags = {}) const; │ │ │ │ │ std::vector ffiillee__pprrooggrreessss (file_progress_flags_t flags = {}) │ │ │ │ │ const; │ │ │ │ │ +void ppoosstt__ffiillee__pprrooggrreessss (file_progress_flags_t flags) const; │ │ │ │ │ This function fills in the supplied vector, or returns a vector, with the │ │ │ │ │ number of bytes downloaded of each file in this torrent. The progress values │ │ │ │ │ are ordered the same as the files in the _t_o_r_r_e_n_t___i_n_f_o. │ │ │ │ │ This operation is not very cheap. Its complexity is OO((nn ++ mmjj)). Where nn is the │ │ │ │ │ number of files, mm is the number of currently downloading pieces and jj is the │ │ │ │ │ number of blocks in a piece. │ │ │ │ │ The flags parameter can be used to specify the granularity of the file │ │ │ │ │ @@ -449,19 +449,19 @@ │ │ │ │ │ See _o_p_e_n___f_i_l_e___s_t_a_t_e │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** cclleeaarr__eerrrroorr(()) ********** │ │ │ │ │ void cclleeaarr__eerrrroorr () const; │ │ │ │ │ If the torrent is in an error state (i.e. torrent_status::error is non-empty), │ │ │ │ │ this will clear the error and start the torrent again. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ttrraacckkeerrss(()) ppoosstt__ttrraacckkeerrss(()) aadddd__ttrraacckkeerr(()) rreeppllaaccee__ttrraacckkeerrss(()) ********** │ │ │ │ │ +********** aadddd__ttrraacckkeerr(()) ppoosstt__ttrraacckkeerrss(()) rreeppllaaccee__ttrraacckkeerrss(()) ttrraacckkeerrss(()) ********** │ │ │ │ │ +void rreeppllaaccee__ttrraacckkeerrss (std::vector const&) const; │ │ │ │ │ +void ppoosstt__ttrraacckkeerrss () const; │ │ │ │ │ void aadddd__ttrraacckkeerr (announce_entry const&) const; │ │ │ │ │ std::vector ttrraacckkeerrss () const; │ │ │ │ │ -void ppoosstt__ttrraacckkeerrss () const; │ │ │ │ │ -void rreeppllaaccee__ttrraacckkeerrss (std::vector const&) const; │ │ │ │ │ trackers() returns the list of trackers for this torrent. The announce _e_n_t_r_y │ │ │ │ │ contains both a string url which specify the announce url for the tracker as │ │ │ │ │ well as an _i_n_t tier, which is specifies the order in which this tracker is │ │ │ │ │ tried. If you want libtorrent to use another list of trackers for this torrent, │ │ │ │ │ you can use replace_trackers() which takes a list of the same form as the one │ │ │ │ │ returned from trackers() and will replace it. If you want an immediate effect, │ │ │ │ │ you have to call _f_o_r_c_e___r_e_a_n_n_o_u_n_c_e_(_). See _a_n_n_o_u_n_c_e___e_n_t_r_y. │ │ │ │ │ @@ -470,30 +470,30 @@ │ │ │ │ │ add_tracker() will look if the specified tracker is already in the set. If it │ │ │ │ │ is, it doesn't do anything. If it's not in the current set of trackers, it will │ │ │ │ │ insert it in the tier specified in the _a_n_n_o_u_n_c_e___e_n_t_r_y. │ │ │ │ │ The updated set of trackers will be saved in the resume data, and when a │ │ │ │ │ torrent is started with resume data, the trackers from the resume data will │ │ │ │ │ replace the original ones. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** uurrll__sseeeeddss(()) aadddd__uurrll__sseeeedd(()) rreemmoovvee__uurrll__sseeeedd(()) ********** │ │ │ │ │ +********** rreemmoovvee__uurrll__sseeeedd(()) aadddd__uurrll__sseeeedd(()) uurrll__sseeeeddss(()) ********** │ │ │ │ │ std::set uurrll__sseeeeddss () const; │ │ │ │ │ -void aadddd__uurrll__sseeeedd (std::string const& url) const; │ │ │ │ │ void rreemmoovvee__uurrll__sseeeedd (std::string const& url) const; │ │ │ │ │ +void aadddd__uurrll__sseeeedd (std::string const& url) const; │ │ │ │ │ add_url_seed() adds another url to the torrent's list of url seeds. If the │ │ │ │ │ given url already exists in that list, the call has no effect. The torrent will │ │ │ │ │ connect to the server and try to download pieces from it, unless it's paused, │ │ │ │ │ queued, checking or seeding. remove_url_seed() removes the given url if it │ │ │ │ │ exists already. url_seeds() return a set of the url seeds currently in this │ │ │ │ │ torrent. Note that URLs that fails may be removed automatically from the list. │ │ │ │ │ See _h_t_t_p_ _s_e_e_d_i_n_g for more information. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** rreemmoovvee__hhttttpp__sseeeedd(()) hhttttpp__sseeeeddss(()) aadddd__hhttttpp__sseeeedd(()) ********** │ │ │ │ │ -void rreemmoovvee__hhttttpp__sseeeedd (std::string const& url) const; │ │ │ │ │ -std::set hhttttpp__sseeeeddss () const; │ │ │ │ │ +********** hhttttpp__sseeeeddss(()) rreemmoovvee__hhttttpp__sseeeedd(()) aadddd__hhttttpp__sseeeedd(()) ********** │ │ │ │ │ void aadddd__hhttttpp__sseeeedd (std::string const& url) const; │ │ │ │ │ +std::set hhttttpp__sseeeeddss () const; │ │ │ │ │ +void rreemmoovvee__hhttttpp__sseeeedd (std::string const& url) const; │ │ │ │ │ These functions are identical as the *_url_seed() variants, but they operate on │ │ │ │ │ _B_E_P_ _1_7 web seeds instead of _B_E_P_ _1_9. │ │ │ │ │ See _h_t_t_p_ _s_e_e_d_i_n_g for more information. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** aadddd__eexxtteennssiioonn(()) ********** │ │ │ │ │ void aadddd__eexxtteennssiioonn ( │ │ │ │ │ std::function(torrent_handle const&, │ │ │ │ │ @@ -524,15 +524,15 @@ │ │ │ │ │ and false afterward. │ │ │ │ │ Clients should only use _i_s___v_a_l_i_d_(_) to determine if the result of session:: │ │ │ │ │ find_torrent() was successful. │ │ │ │ │ Unlike other member functions which return a value, _i_s___v_a_l_i_d_(_) completes │ │ │ │ │ immediately, without blocking on a result from the network thread. Also unlike │ │ │ │ │ other functions, it never throws the system_error exception. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** rreessuummee(()) ppaauussee(()) ********** │ │ │ │ │ +********** ppaauussee(()) rreessuummee(()) ********** │ │ │ │ │ void rreessuummee () const; │ │ │ │ │ void ppaauussee (pause_flags_t flags = {}) const; │ │ │ │ │ pause(), and resume() will disconnect all peers and reconnect all peers │ │ │ │ │ respectively. When a torrent is paused, it will however remember all share │ │ │ │ │ ratios to all peers and remember all potential (not connected) peers. Torrents │ │ │ │ │ may be paused automatically if there is a file error (e.g. disk full) or │ │ │ │ │ something similar. See _f_i_l_e___e_r_r_o_r___a_l_e_r_t. │ │ │ │ │ @@ -541,19 +541,19 @@ │ │ │ │ │ for the torrent_status::paused flag. │ │ │ │ │ Note │ │ │ │ │ Torrents that are auto-managed may be automatically resumed again. It does not │ │ │ │ │ make sense to pause an auto-managed torrent without making it not auto-managed │ │ │ │ │ first. Torrents are auto-managed by default when added to the _s_e_s_s_i_o_n. For more │ │ │ │ │ information, see _q_u_e_u_i_n_g. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** sseett__ffllaaggss(()) ffllaaggss(()) uunnsseett__ffllaaggss(()) ********** │ │ │ │ │ -void uunnsseett__ffllaaggss (torrent_flags_t flags) const; │ │ │ │ │ -void sseett__ffllaaggss (torrent_flags_t flags, torrent_flags_t mask) const; │ │ │ │ │ +********** ffllaaggss(()) sseett__ffllaaggss(()) uunnsseett__ffllaaggss(()) ********** │ │ │ │ │ torrent_flags_t ffllaaggss () const; │ │ │ │ │ +void uunnsseett__ffllaaggss (torrent_flags_t flags) const; │ │ │ │ │ void sseett__ffllaaggss (torrent_flags_t flags) const; │ │ │ │ │ +void sseett__ffllaaggss (torrent_flags_t flags, torrent_flags_t mask) const; │ │ │ │ │ sets and gets the torrent state flags. See _t_o_r_r_e_n_t___f_l_a_g_s___t. The set_flags │ │ │ │ │ overload that take a mask will affect all flags part of the mask, and set their │ │ │ │ │ values to what the flags argument is set to. This allows clearing and setting │ │ │ │ │ flags in a single function call. The set_flags overload that just takes flags, │ │ │ │ │ sets all the specified flags and leave any other flags unchanged. unset_flags │ │ │ │ │ clears the specified flags, while leaving any other flags unchanged. │ │ │ │ │ Theseed_modeflag is special, it can only be cleared once the torrent has been │ │ │ │ │ @@ -663,35 +663,35 @@ │ │ │ │ │ Note how outstanding_resume_data is a global counter in this example. This is │ │ │ │ │ deliberate, otherwise there is a race condition for torrents that was just │ │ │ │ │ asked to save their resume data, they posted the _a_l_e_r_t, but it has not been │ │ │ │ │ received yet. Those torrents would report that they don't need to save resume │ │ │ │ │ data again, and skipped by the initial loop, and thwart the counter otherwise. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** nneeeedd__ssaavvee__rreessuummee__ddaattaa(()) ********** │ │ │ │ │ -bool nneeeedd__ssaavvee__rreessuummee__ddaattaa (resume_data_flags_t flags) const; │ │ │ │ │ bool nneeeedd__ssaavvee__rreessuummee__ddaattaa () const; │ │ │ │ │ +bool nneeeedd__ssaavvee__rreessuummee__ddaattaa (resume_data_flags_t flags) const; │ │ │ │ │ This function returns true if anything that is stored in the resume data has │ │ │ │ │ changed since the last time resume data was saved. The overload that takes │ │ │ │ │ flags let you ask if specific categories of properties have changed. These │ │ │ │ │ flags have the same behavior as in the _s_a_v_e___r_e_s_u_m_e___d_a_t_a_(_) call. │ │ │ │ │ This is a bblloocckkiinngg call. It will wait for a response from libtorrent's main │ │ │ │ │ thread. A way to avoid blocking is to instead call _s_a_v_e___r_e_s_u_m_e___d_a_t_a_(_) directly, │ │ │ │ │ specifying the conditions under which resume data should be saved. │ │ │ │ │ Note │ │ │ │ │ A torrent's resume data is considered saved as soon as the │ │ │ │ │ _s_a_v_e___r_e_s_u_m_e___d_a_t_a___a_l_e_r_t is posted. It is important to make sure this _a_l_e_r_t is │ │ │ │ │ received and handled in order for this function to be meaningful. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** qquueeuuee__ppoossiittiioonn__uupp(()) qquueeuuee__ppoossiittiioonn__ddoowwnn(()) qquueeuuee__ppoossiittiioonn__bboottttoomm(()) │ │ │ │ │ -qquueeuuee__ppoossiittiioonn(()) qquueeuuee__ppoossiittiioonn__ttoopp(()) ********** │ │ │ │ │ -void qquueeuuee__ppoossiittiioonn__bboottttoomm () const; │ │ │ │ │ +********** qquueeuuee__ppoossiittiioonn__bboottttoomm(()) qquueeuuee__ppoossiittiioonn__ttoopp(()) qquueeuuee__ppoossiittiioonn__ddoowwnn(()) │ │ │ │ │ +qquueeuuee__ppoossiittiioonn__uupp(()) qquueeuuee__ppoossiittiioonn(()) ********** │ │ │ │ │ void qquueeuuee__ppoossiittiioonn__uupp () const; │ │ │ │ │ -void qquueeuuee__ppoossiittiioonn__ttoopp () const; │ │ │ │ │ void qquueeuuee__ppoossiittiioonn__ddoowwnn () const; │ │ │ │ │ queue_position_t qquueeuuee__ppoossiittiioonn () const; │ │ │ │ │ +void qquueeuuee__ppoossiittiioonn__ttoopp () const; │ │ │ │ │ +void qquueeuuee__ppoossiittiioonn__bboottttoomm () const; │ │ │ │ │ Every torrent that is added is assigned a queue position exactly one greater │ │ │ │ │ than the greatest queue position of all existing torrents. Torrents that are │ │ │ │ │ being seeded have -1 as their queue position, since they're no longer in line │ │ │ │ │ to be downloaded. │ │ │ │ │ When a torrent is removed or turns into a seed, all torrents with greater queue │ │ │ │ │ positions have their positions decreased to fill in the space in the sequence. │ │ │ │ │ queue_position() returns the torrent's position in the download queue. The │ │ │ │ │ @@ -705,22 +705,22 @@ │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** qquueeuuee__ppoossiittiioonn__sseett(()) ********** │ │ │ │ │ void qquueeuuee__ppoossiittiioonn__sseett (queue_position_t p) const; │ │ │ │ │ updates the position in the queue for this torrent. The relative order of all │ │ │ │ │ other torrents remain intact but their numerical queue position shifts to make │ │ │ │ │ space for this torrent's new position │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** sseett__ssssll__cceerrttiiffiiccaattee__bbuuffffeerr(()) sseett__ssssll__cceerrttiiffiiccaattee(()) ********** │ │ │ │ │ +********** sseett__ssssll__cceerrttiiffiiccaattee(()) sseett__ssssll__cceerrttiiffiiccaattee__bbuuffffeerr(()) ********** │ │ │ │ │ +void sseett__ssssll__cceerrttiiffiiccaattee__bbuuffffeerr (std::string const& certificate │ │ │ │ │ + , std::string const& private_key │ │ │ │ │ + , std::string const& dh_params); │ │ │ │ │ void sseett__ssssll__cceerrttiiffiiccaattee (std::string const& certificate │ │ │ │ │ , std::string const& private_key │ │ │ │ │ , std::string const& dh_params │ │ │ │ │ , std::string const& passphrase = ""); │ │ │ │ │ -void sseett__ssssll__cceerrttiiffiiccaattee__bbuuffffeerr (std::string const& certificate │ │ │ │ │ - , std::string const& private_key │ │ │ │ │ - , std::string const& dh_params); │ │ │ │ │ For SSL torrents, use this to specify a path to a .pem file to use as this │ │ │ │ │ client's certificate. The certificate must be signed by the certificate in the │ │ │ │ │ .torrent file to be valid. │ │ │ │ │ The _s_e_t___s_s_l___c_e_r_t_i_f_i_c_a_t_e___b_u_f_f_e_r_(_) overload takes the actual certificate, private │ │ │ │ │ key and DH params as strings, rather than paths to files. │ │ │ │ │ cert is a path to the (signed) certificate in .pem format corresponding to this │ │ │ │ │ torrent. │ │ │ │ │ @@ -734,17 +734,17 @@ │ │ │ │ │ Note that when a torrent first starts up, and it needs a certificate, it will │ │ │ │ │ suspend connecting to any peers until it has one. It's typically desirable to │ │ │ │ │ resume the torrent after setting the SSL certificate. │ │ │ │ │ If you receive a _t_o_r_r_e_n_t___n_e_e_d___c_e_r_t___a_l_e_r_t, you need to call this to provide a │ │ │ │ │ valid cert. If you don't have a cert you won't be allowed to connect to any │ │ │ │ │ peers. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ttoorrrreenntt__ffiillee__wwiitthh__hhaasshheess(()) ttoorrrreenntt__ffiillee(()) ********** │ │ │ │ │ -std::shared_ptr ttoorrrreenntt__ffiillee__wwiitthh__hhaasshheess () const; │ │ │ │ │ +********** ttoorrrreenntt__ffiillee(()) ttoorrrreenntt__ffiillee__wwiitthh__hhaasshheess(()) ********** │ │ │ │ │ std::shared_ptr ttoorrrreenntt__ffiillee () const; │ │ │ │ │ +std::shared_ptr ttoorrrreenntt__ffiillee__wwiitthh__hhaasshheess () const; │ │ │ │ │ _t_o_r_r_e_n_t___f_i_l_e_(_) returns a pointer to the _t_o_r_r_e_n_t___i_n_f_o object associated with │ │ │ │ │ this torrent. The _t_o_r_r_e_n_t___i_n_f_o object may be a copy of the internal object. If │ │ │ │ │ the torrent doesn't have metadata, the pointer will not be initialized (i.e. a │ │ │ │ │ nullptr). The torrent may be in a state without metadata only if it was started │ │ │ │ │ without a .torrent file, e.g. by being added by magnet link. │ │ │ │ │ Note that the _t_o_r_r_e_n_t___i_n_f_o object returned here may be a different instance │ │ │ │ │ than the one added to the _s_e_s_s_i_o_n, with different attributes like piece layers, │ │ │ │ │ @@ -771,32 +771,32 @@ │ │ │ │ │ ********** ppiieeccee__llaayyeerrss(()) ********** │ │ │ │ │ std::vector> ppiieeccee__llaayyeerrss () const; │ │ │ │ │ returns the piece layers for all files in the torrent. If this is a v1 torrent │ │ │ │ │ (and doesn't have any piece layers) it returns an empty vector. This is a │ │ │ │ │ blocking call that will synchronize with the libtorrent network thread. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ppiieeccee__aavvaaiillaabbiilliittyy(()) ppoosstt__ppiieeccee__aavvaaiillaabbiilliittyy(()) ********** │ │ │ │ │ -void ppiieeccee__aavvaaiillaabbiilliittyy (std::vector& avail) const; │ │ │ │ │ void ppoosstt__ppiieeccee__aavvaaiillaabbiilliittyy () const; │ │ │ │ │ +void ppiieeccee__aavvaaiillaabbiilliittyy (std::vector& avail) const; │ │ │ │ │ The piece availability is the number of peers that we are connected that has │ │ │ │ │ advertised having a particular piece. This is the information that libtorrent │ │ │ │ │ uses in order to prefer picking rare pieces. │ │ │ │ │ post_piece_availability() will trigger a _p_i_e_c_e___a_v_a_i_l_a_b_i_l_i_t_y___a_l_e_r_t to be posted. │ │ │ │ │ piece_availability() fills the specified std::vector with the availability │ │ │ │ │ for each piece in this torrent. libtorrent does not keep track of availability │ │ │ │ │ for seeds, so if the torrent is seeding the availability for all pieces is │ │ │ │ │ reported as 0. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** pprriioorriittiizzee__ppiieecceess(()) ggeett__ppiieeccee__pprriioorriittiieess(()) ppiieeccee__pprriioorriittyy(()) ********** │ │ │ │ │ +********** ppiieeccee__pprriioorriittyy(()) pprriioorriittiizzee__ppiieecceess(()) ggeett__ppiieeccee__pprriioorriittiieess(()) ********** │ │ │ │ │ +void ppiieeccee__pprriioorriittyy (piece_index_t index, download_priority_t priority) const; │ │ │ │ │ +void pprriioorriittiizzee__ppiieecceess (std::vector const& pieces) const; │ │ │ │ │ +download_priority_t ppiieeccee__pprriioorriittyy (piece_index_t index) const; │ │ │ │ │ void pprriioorriittiizzee__ppiieecceess (std::vector> const& pieces) const; │ │ │ │ │ std::vector ggeett__ppiieeccee__pprriioorriittiieess () const; │ │ │ │ │ -void pprriioorriittiizzee__ppiieecceess (std::vector const& pieces) const; │ │ │ │ │ -download_priority_t ppiieeccee__pprriioorriittyy (piece_index_t index) const; │ │ │ │ │ -void ppiieeccee__pprriioorriittyy (piece_index_t index, download_priority_t priority) const; │ │ │ │ │ These functions are used to set and get the priority of individual pieces. By │ │ │ │ │ default all pieces have priority 4. 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 priority levels. 0 means not to │ │ │ │ │ download the piece at all. Otherwise, lower priority values means less likely │ │ │ │ │ to be picked. Piece priority takes precedence over piece availability. Every │ │ │ │ │ piece with priority 7 will be attempted to be picked before a priority 6 piece │ │ │ │ │ @@ -816,19 +816,19 @@ │ │ │ │ │ where the piece index or priority is out of range, are not allowed. │ │ │ │ │ get_piece_priorities returns a vector with one element for each piece in the │ │ │ │ │ torrent. Each element is the current priority of that piece. │ │ │ │ │ It's possible to cancel the effect of ffiillee priorities by setting the priorities │ │ │ │ │ for the affected pieces. Care has to be taken when mixing usage of file- and │ │ │ │ │ piece priorities. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** pprriioorriittiizzee__ffiilleess(()) ffiillee__pprriioorriittyy(()) ggeett__ffiillee__pprriioorriittiieess(()) ********** │ │ │ │ │ -void pprriioorriittiizzee__ffiilleess (std::vector const& files) const; │ │ │ │ │ +********** ggeett__ffiillee__pprriioorriittiieess(()) pprriioorriittiizzee__ffiilleess(()) ffiillee__pprriioorriittyy(()) ********** │ │ │ │ │ download_priority_t ffiillee__pprriioorriittyy (file_index_t index) const; │ │ │ │ │ void ffiillee__pprriioorriittyy (file_index_t index, download_priority_t priority) const; │ │ │ │ │ std::vector ggeett__ffiillee__pprriioorriittiieess () const; │ │ │ │ │ +void pprriioorriittiizzee__ffiilleess (std::vector const& files) const; │ │ │ │ │ index must be in the range [0, number_of_files). │ │ │ │ │ file_priority() queries or sets the priority of file index. │ │ │ │ │ prioritize_files() takes a vector that has at as many elements as there are │ │ │ │ │ files in the torrent. Each _e_n_t_r_y is the priority of that file. The function │ │ │ │ │ sets the priorities of all the pieces in the torrent based on the vector. │ │ │ │ │ get_file_priorities() returns a vector with the priorities of all files. │ │ │ │ │ The priority values are the same as for _p_i_e_c_e___p_r_i_o_r_i_t_y_(_). See │ │ │ │ │ @@ -847,17 +847,17 @@ │ │ │ │ │ When combining file- and piece priorities, the resume file will record both. │ │ │ │ │ When loading the resume data, the file priorities will be applied first, then │ │ │ │ │ the piece priorities. │ │ │ │ │ Moving data from a file into the part file is currently not supported. If a │ │ │ │ │ file has its priority set to 0 aafftteerr it has already been created, it will not │ │ │ │ │ be moved into the partfile. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ffoorrccee__ddhhtt__aannnnoouunnccee(()) ffoorrccee__llssdd__aannnnoouunnccee(()) ffoorrccee__rreeaannnnoouunnccee(()) ********** │ │ │ │ │ -void ffoorrccee__ddhhtt__aannnnoouunnccee () const; │ │ │ │ │ +********** ffoorrccee__llssdd__aannnnoouunnccee(()) ffoorrccee__rreeaannnnoouunnccee(()) ffoorrccee__ddhhtt__aannnnoouunnccee(()) ********** │ │ │ │ │ void ffoorrccee__llssdd__aannnnoouunnccee () const; │ │ │ │ │ +void ffoorrccee__ddhhtt__aannnnoouunnccee () const; │ │ │ │ │ void ffoorrccee__rreeaannnnoouunnccee (int seconds = 0, int idx = -1, reannounce_flags_t = {}) │ │ │ │ │ const; │ │ │ │ │ force_reannounce() will force this torrent to do another tracker request, to │ │ │ │ │ receive new peers. The seconds argument specifies how many seconds from now to │ │ │ │ │ issue the tracker announces. │ │ │ │ │ If the tracker's min_interval has not passed since the last announce, the │ │ │ │ │ forced announce will be scheduled to happen immediately as the min_interval │ │ │ │ │ @@ -877,20 +877,20 @@ │ │ │ │ │ A scrape request queries the tracker for statistics such as total number of │ │ │ │ │ incomplete peers, complete peers, number of downloads etc. │ │ │ │ │ This request will specifically update the num_complete and num_incomplete │ │ │ │ │ fields in the _t_o_r_r_e_n_t___s_t_a_t_u_s struct once it completes. When it completes, it │ │ │ │ │ will generate a _s_c_r_a_p_e___r_e_p_l_y___a_l_e_r_t. If it fails, it will generate a │ │ │ │ │ _s_c_r_a_p_e___f_a_i_l_e_d___a_l_e_r_t. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ddoowwnnllooaadd__lliimmiitt(()) sseett__ddoowwnnllooaadd__lliimmiitt(()) sseett__uuppllooaadd__lliimmiitt(()) uuppllooaadd__lliimmiitt(()) │ │ │ │ │ +********** uuppllooaadd__lliimmiitt(()) sseett__uuppllooaadd__lliimmiitt(()) ddoowwnnllooaadd__lliimmiitt(()) sseett__ddoowwnnllooaadd__lliimmiitt(()) │ │ │ │ │ ********** │ │ │ │ │ -int ddoowwnnllooaadd__lliimmiitt () const; │ │ │ │ │ -int uuppllooaadd__lliimmiitt () const; │ │ │ │ │ void sseett__ddoowwnnllooaadd__lliimmiitt (int limit) const; │ │ │ │ │ void sseett__uuppllooaadd__lliimmiitt (int limit) const; │ │ │ │ │ +int uuppllooaadd__lliimmiitt () const; │ │ │ │ │ +int ddoowwnnllooaadd__lliimmiitt () const; │ │ │ │ │ set_upload_limit will limit the upload bandwidth used by this particular │ │ │ │ │ torrent to the limit you set. It is given as the number of bytes per second the │ │ │ │ │ torrent is allowed to upload. set_download_limit works the same way but for │ │ │ │ │ download bandwidth instead of upload bandwidth. Note that setting a higher │ │ │ │ │ limit on a torrent then the global limit (settings_pack::upload_rate_limit) │ │ │ │ │ will not override the global rate limit. The torrent can never upload more than │ │ │ │ │ the global rate limit. │ │ │ │ │ @@ -922,17 +922,17 @@ │ │ │ │ │ int mmaaxx__uuppllooaaddss () const; │ │ │ │ │ set_max_uploads() sets the maximum number of peers that's unchoked at the same │ │ │ │ │ time on this torrent. If you set this to -1, there will be no limit. This │ │ │ │ │ defaults to infinite. The primary setting controlling this is the global │ │ │ │ │ unchoke slots limit, set by unchoke_slots_limit in _s_e_t_t_i_n_g_s___p_a_c_k. │ │ │ │ │ max_uploads() returns the current settings. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** sseett__mmaaxx__ccoonnnneeccttiioonnss(()) mmaaxx__ccoonnnneeccttiioonnss(()) ********** │ │ │ │ │ -int mmaaxx__ccoonnnneeccttiioonnss () const; │ │ │ │ │ +********** mmaaxx__ccoonnnneeccttiioonnss(()) sseett__mmaaxx__ccoonnnneeccttiioonnss(()) ********** │ │ │ │ │ void sseett__mmaaxx__ccoonnnneeccttiioonnss (int max_connections) const; │ │ │ │ │ +int mmaaxx__ccoonnnneeccttiioonnss () const; │ │ │ │ │ set_max_connections() sets the maximum number of connection this torrent will │ │ │ │ │ open. If all connections are used up, incoming connections may be refused or │ │ │ │ │ poor connections may be closed. This must be at least 2. The default is │ │ │ │ │ unlimited number of connections. If -1 is given to the function, it means │ │ │ │ │ unlimited. There is also a global limit of the number of connections, set by │ │ │ │ │ connections_limit in _s_e_t_t_i_n_g_s___p_a_c_k. │ │ │ │ │ max_connections() returns the current settings. │ │ │ │ │ @@ -983,25 +983,25 @@ │ │ │ │ │ ********** rreennaammee__ffiillee(()) ********** │ │ │ │ │ void rreennaammee__ffiillee (file_index_t index, std::string const& new_name) const; │ │ │ │ │ Renames the file with the given index asynchronously. The rename operation is │ │ │ │ │ complete when either a _f_i_l_e___r_e_n_a_m_e_d___a_l_e_r_t or _f_i_l_e___r_e_n_a_m_e___f_a_i_l_e_d___a_l_e_r_t is │ │ │ │ │ posted. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** iinnffoo__hhaasshheess(()) iinnffoo__hhaasshh(()) ********** │ │ │ │ │ -info_hash_t iinnffoo__hhaasshheess () const; │ │ │ │ │ sha1_hash iinnffoo__hhaasshh () const; │ │ │ │ │ +info_hash_t iinnffoo__hhaasshheess () const; │ │ │ │ │ returns the info-hash(es) of the torrent. If this handle is to a torrent that │ │ │ │ │ hasn't loaded yet (for instance by being added) by a URL, the returned value is │ │ │ │ │ undefined. The info_hash() returns the SHA-1 info-hash for v1 torrents and a │ │ │ │ │ truncated hash for v2 torrents. For the full v2 info-hash, use info_hashes() │ │ │ │ │ instead. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ooppeerraattoorr!!==(()) ooppeerraattoorr====(()) ooppeerraattoorr<<(()) ********** │ │ │ │ │ -bool ooppeerraattoorr==== (const torrent_handle& h) const; │ │ │ │ │ +********** ooppeerraattoorr====(()) ooppeerraattoorr!!==(()) ooppeerraattoorr<<(()) ********** │ │ │ │ │ bool ooppeerraattoorr<< (const torrent_handle& h) const; │ │ │ │ │ +bool ooppeerraattoorr==== (const torrent_handle& h) const; │ │ │ │ │ bool ooppeerraattoorr!!== (const torrent_handle& h) const; │ │ │ │ │ comparison operators. The order of the torrents is unspecified but stable. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** iidd(()) ********** │ │ │ │ │ std::uint32_t iidd () const; │ │ │ │ │ returns a unique identifier for this torrent. It's not a dense index. It's not │ │ │ │ │ preserved across sessions. │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Info.html │ │ │ │ @@ -38,35 +38,35 @@ │ │ │ │
  • enum type_t
  • │ │ │ │ │ │ │ │ │ │ │ │
  • load_torrent_limits
  • │ │ │ │
  • torrent_info
  • │ │ │ │ │ │ │ │
    │ │ │ │

    load_torrent_limits

    │ │ │ │

    Declared in "libtorrent/torrent_info.hpp"

    │ │ │ │

    this object holds configuration options for limits to use when loading │ │ │ │ @@ -197,69 +197,69 @@ │ │ │ │

    │ │ │ │

    torrent_info

    │ │ │ │

    Declared in "libtorrent/torrent_info.hpp"

    │ │ │ │

    the torrent_info class holds the information found in a .torrent file.

    │ │ │ │
    │ │ │ │  class torrent_info
    │ │ │ │  {
    │ │ │ │ -   torrent_info (span<char const> buffer, error_code& ec, from_span_t);
    │ │ │ │ -   torrent_info (std::string const& filename, error_code& ec);
    │ │ │ │ -   torrent_info (bdecode_node const& torrent_file, load_torrent_limits const& cfg);
    │ │ │ │ +   torrent_info (char const* buffer, int size);
    │ │ │ │     torrent_info (torrent_info const& t);
    │ │ │ │ +   torrent_info (std::string const& filename, error_code& ec);
    │ │ │ │ +   explicit torrent_info (span<char const> buffer, from_span_t);
    │ │ │ │ +   torrent_info (span<char const> buffer, load_torrent_limits const& cfg, from_span_t);
    │ │ │ │ +   explicit torrent_info (std::string const& filename);
    │ │ │ │ +   explicit torrent_info (bdecode_node const& torrent_file);
    │ │ │ │ +   torrent_info (span<char const> buffer, error_code& ec, from_span_t);
    │ │ │ │     torrent_info (bdecode_node const& torrent_file, error_code& ec);
    │ │ │ │     torrent_info (std::string const& filename, load_torrent_limits const& cfg);
    │ │ │ │     explicit torrent_info (info_hash_t const& info_hash);
    │ │ │ │ -   explicit torrent_info (std::string const& filename);
    │ │ │ │ -   explicit torrent_info (bdecode_node const& torrent_file);
    │ │ │ │ -   explicit torrent_info (span<char const> buffer, from_span_t);
    │ │ │ │ -   torrent_info (span<char const> buffer, load_torrent_limits const& cfg, from_span_t);
    │ │ │ │ -   torrent_info (char const* buffer, int size);
    │ │ │ │ +   torrent_info (bdecode_node const& torrent_file, load_torrent_limits const& cfg);
    │ │ │ │     torrent_info (char const* buffer, int size, error_code& ec);
    │ │ │ │     ~torrent_info ();
    │ │ │ │     file_storage const& files () const;
    │ │ │ │     file_storage const& orig_files () const;
    │ │ │ │     void rename_file (file_index_t index, std::string const& new_filename);
    │ │ │ │     void remap_files (file_storage const& f);
    │ │ │ │     std::vector<announce_entry> const& trackers () const;
    │ │ │ │     void add_tracker (std::string const& url, int tier = 0);
    │ │ │ │ -   void clear_trackers ();
    │ │ │ │     void add_tracker (std::string const& url, int tier
    │ │ │ │        , announce_entry::tracker_source source);
    │ │ │ │ +   void clear_trackers ();
    │ │ │ │     std::vector<sha1_hash> similar_torrents () const;
    │ │ │ │     std::vector<std::string> collections () const;
    │ │ │ │ -   std::vector<web_seed_entry> const& web_seeds () const;
    │ │ │ │     void add_http_seed (std::string const& url
    │ │ │ │        , std::string const& extern_auth = std::string()
    │ │ │ │        , web_seed_entry::headers_t const& extra_headers = web_seed_entry::headers_t());
    │ │ │ │ +   std::vector<web_seed_entry> const& web_seeds () const;
    │ │ │ │     void add_url_seed (std::string const& url
    │ │ │ │        , std::string const& ext_auth = std::string()
    │ │ │ │        , web_seed_entry::headers_t const& ext_headers = web_seed_entry::headers_t());
    │ │ │ │     void set_web_seeds (std::vector<web_seed_entry> seeds);
    │ │ │ │     std::int64_t total_size () const;
    │ │ │ │ -   int num_pieces () const;
    │ │ │ │     int piece_length () const;
    │ │ │ │ +   int num_pieces () const;
    │ │ │ │     int blocks_per_piece () const;
    │ │ │ │ -   index_range<piece_index_t> piece_range () const;
    │ │ │ │ -   piece_index_t end_piece () const;
    │ │ │ │     piece_index_t last_piece () const;
    │ │ │ │ -   sha1_hash info_hash () const noexcept;
    │ │ │ │ +   piece_index_t end_piece () const;
    │ │ │ │ +   index_range<piece_index_t> piece_range () const;
    │ │ │ │     info_hash_t const& info_hashes () const;
    │ │ │ │ -   bool v2 () const;
    │ │ │ │ +   sha1_hash info_hash () const noexcept;
    │ │ │ │     bool v1 () const;
    │ │ │ │ +   bool v2 () const;
    │ │ │ │     int num_files () const;
    │ │ │ │     std::vector<file_slice> map_block (piece_index_t const piece
    │ │ │ │        , std::int64_t offset, int size) const;
    │ │ │ │     peer_request map_file (file_index_t const file, std::int64_t offset, int size) const;
    │ │ │ │     string_view ssl_cert () const;
    │ │ │ │     bool is_valid () const;
    │ │ │ │     bool priv () const;
    │ │ │ │     bool is_i2p () const;
    │ │ │ │     int piece_size (piece_index_t index) const;
    │ │ │ │ -   char const* hash_for_piece_ptr (piece_index_t const index) const;
    │ │ │ │     sha1_hash hash_for_piece (piece_index_t index) const;
    │ │ │ │ +   char const* hash_for_piece_ptr (piece_index_t const index) const;
    │ │ │ │     bool is_loaded () const;
    │ │ │ │     const std::string& name () const;
    │ │ │ │     std::time_t creation_date () const;
    │ │ │ │     const std::string& creator () const;
    │ │ │ │     const std::string& comment () const;
    │ │ │ │     std::vector<std::pair<std::string, int>> const& nodes () const;
    │ │ │ │     void add_node (std::pair<std::string, int> const& node);
    │ │ │ │ @@ -269,26 +269,26 @@
    │ │ │ │     span<char const> piece_layer (file_index_t) const;
    │ │ │ │     void free_piece_layers ();
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ [report issue]
    │ │ │ │

    torrent_info()

    │ │ │ │
    │ │ │ │ -torrent_info (span<char const> buffer, error_code& ec, from_span_t);
    │ │ │ │ -torrent_info (std::string const& filename, error_code& ec);
    │ │ │ │ -torrent_info (bdecode_node const& torrent_file, load_torrent_limits const& cfg);
    │ │ │ │ +torrent_info (char const* buffer, int size);
    │ │ │ │  torrent_info (torrent_info const& t);
    │ │ │ │ +torrent_info (std::string const& filename, error_code& ec);
    │ │ │ │ +explicit torrent_info (span<char const> buffer, from_span_t);
    │ │ │ │ +torrent_info (span<char const> buffer, load_torrent_limits const& cfg, from_span_t);
    │ │ │ │ +explicit torrent_info (std::string const& filename);
    │ │ │ │ +explicit torrent_info (bdecode_node const& torrent_file);
    │ │ │ │ +torrent_info (span<char const> buffer, error_code& ec, from_span_t);
    │ │ │ │  torrent_info (bdecode_node const& torrent_file, error_code& ec);
    │ │ │ │  torrent_info (std::string const& filename, load_torrent_limits const& cfg);
    │ │ │ │  explicit torrent_info (info_hash_t const& info_hash);
    │ │ │ │ -explicit torrent_info (std::string const& filename);
    │ │ │ │ -explicit torrent_info (bdecode_node const& torrent_file);
    │ │ │ │ -explicit torrent_info (span<char const> buffer, from_span_t);
    │ │ │ │ -torrent_info (span<char const> buffer, load_torrent_limits const& cfg, from_span_t);
    │ │ │ │ -torrent_info (char const* buffer, int size);
    │ │ │ │ +torrent_info (bdecode_node const& torrent_file, load_torrent_limits const& cfg);
    │ │ │ │  torrent_info (char const* buffer, int size, error_code& ec);
    │ │ │ │  
    │ │ │ │

    The constructor that takes an info-hash will initialize the info-hash │ │ │ │ to the given value, but leave all other fields empty. This is used │ │ │ │ internally when downloading torrents without the metadata. The │ │ │ │ metadata will be created by libtorrent as soon as it has been │ │ │ │ downloaded from the swarm.

    │ │ │ │ @@ -318,18 +318,18 @@ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    ~torrent_info()

    │ │ │ │
    │ │ │ │  ~torrent_info ();
    │ │ │ │  
    │ │ │ │

    frees all storage associated with this torrent_info object

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    files() orig_files()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    orig_files() files()

    │ │ │ │
    │ │ │ │  file_storage const& files () const;
    │ │ │ │  file_storage const& orig_files () const;
    │ │ │ │  
    │ │ │ │

    The file_storage object contains the information on how to map the │ │ │ │ pieces to files. It is separated from the torrent_info object because │ │ │ │ when creating torrents a storage object needs to be created without │ │ │ │ @@ -384,52 +384,52 @@ │ │ │ │ │ │ │ │ [report issue]

    │ │ │ │
    │ │ │ │

    trackers() clear_trackers() add_tracker()

    │ │ │ │
    │ │ │ │  std::vector<announce_entry> const& trackers () const;
    │ │ │ │  void add_tracker (std::string const& url, int tier = 0);
    │ │ │ │ -void clear_trackers ();
    │ │ │ │  void add_tracker (std::string const& url, int tier
    │ │ │ │        , announce_entry::tracker_source source);
    │ │ │ │ +void clear_trackers ();
    │ │ │ │  
    │ │ │ │

    add_tracker() adds a tracker to the announce-list. The tier │ │ │ │ determines the order in which the trackers are to be tried. │ │ │ │ The trackers() function will return a sorted vector of │ │ │ │ announce_entry. Each announce entry contains a string, which is │ │ │ │ the tracker url, and a tier index. The tier index is the high-level │ │ │ │ priority. No matter which trackers that works or not, the ones with │ │ │ │ lower tier will always be tried before the one with higher tier │ │ │ │ number. For more information, see announce_entry.

    │ │ │ │

    trackers() returns all entries from announce-list.

    │ │ │ │

    clear_trackers() removes all trackers from announce-list.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    collections() similar_torrents()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    similar_torrents() collections()

    │ │ │ │
    │ │ │ │  std::vector<sha1_hash> similar_torrents () const;
    │ │ │ │  std::vector<std::string> collections () const;
    │ │ │ │  
    │ │ │ │

    These two functions are related to BEP 38 (mutable torrents). The │ │ │ │ vectors returned from these correspond to the "similar" and │ │ │ │ "collections" keys in the .torrent file. Both info-hashes and │ │ │ │ collections from within the info-dict and from outside of it are │ │ │ │ included.

    │ │ │ │ │ │ │ │ - │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    set_web_seeds() add_url_seed() web_seeds() add_http_seed()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    set_web_seeds() web_seeds() add_url_seed() add_http_seed()

    │ │ │ │
    │ │ │ │ -std::vector<web_seed_entry> const& web_seeds () const;
    │ │ │ │  void add_http_seed (std::string const& url
    │ │ │ │        , std::string const& extern_auth = std::string()
    │ │ │ │        , web_seed_entry::headers_t const& extra_headers = web_seed_entry::headers_t());
    │ │ │ │ +std::vector<web_seed_entry> const& web_seeds () const;
    │ │ │ │  void add_url_seed (std::string const& url
    │ │ │ │        , std::string const& ext_auth = std::string()
    │ │ │ │        , web_seed_entry::headers_t const& ext_headers = web_seed_entry::headers_t());
    │ │ │ │  void set_web_seeds (std::vector<web_seed_entry> seeds);
    │ │ │ │  
    │ │ │ │

    web_seeds() returns all url seeds and http seeds in the torrent. │ │ │ │ Each entry is a web_seed_entry and may refer to either a url seed │ │ │ │ @@ -453,21 +453,21 @@ │ │ │ │ std::int64_t total_size () const; │ │ │ │ │ │ │ │

    total_size() returns the total number of bytes the torrent-file │ │ │ │ represents. Note that this is the number of pieces times the piece │ │ │ │ size (modulo the last piece possibly being smaller). With pad files, │ │ │ │ the total size will be larger than the sum of all (regular) file │ │ │ │ sizes.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    num_pieces() piece_length()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    piece_length() num_pieces()

    │ │ │ │
    │ │ │ │ -int num_pieces () const;
    │ │ │ │  int piece_length () const;
    │ │ │ │ +int num_pieces () const;
    │ │ │ │  
    │ │ │ │

    piece_length() and num_pieces() returns the number of byte │ │ │ │ for each piece and the total number of pieces, respectively. The │ │ │ │ difference between piece_size() and piece_length() is that │ │ │ │ piece_size() takes the piece index as argument and gives you the │ │ │ │ exact size of that piece. It will always be the same as │ │ │ │ piece_length() except in the case of the last piece, which may be │ │ │ │ @@ -476,48 +476,48 @@ │ │ │ │

    │ │ │ │

    blocks_per_piece()

    │ │ │ │
    │ │ │ │  int blocks_per_piece () const;
    │ │ │ │  
    │ │ │ │

    returns the number of blocks there are in the typical piece. There │ │ │ │ may be fewer in the last piece)

    │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    end_piece() piece_range() last_piece()

    │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    last_piece() piece_range() end_piece()

    │ │ │ │
    │ │ │ │ -index_range<piece_index_t> piece_range () const;
    │ │ │ │ -piece_index_t end_piece () const;
    │ │ │ │  piece_index_t last_piece () const;
    │ │ │ │ +piece_index_t end_piece () const;
    │ │ │ │ +index_range<piece_index_t> piece_range () const;
    │ │ │ │  
    │ │ │ │

    last_piece() returns the index to the last piece in the torrent and │ │ │ │ end_piece() returns the index to the one-past-end piece in the │ │ │ │ torrent │ │ │ │ piece_range() returns an implementation-defined type that can be │ │ │ │ used as the container in a range-for loop. Where the values are the │ │ │ │ indices of all pieces in the file_storage.

    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    info_hashes() info_hash()

    │ │ │ │
    │ │ │ │ -sha1_hash info_hash () const noexcept;
    │ │ │ │  info_hash_t const& info_hashes () const;
    │ │ │ │ +sha1_hash info_hash () const noexcept;
    │ │ │ │  
    │ │ │ │

    returns the info-hash of the torrent. For BitTorrent v2 support, use │ │ │ │ info_hashes() to get an object that may hold both a v1 and v2 │ │ │ │ info-hash

    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    v1() v2()

    │ │ │ │
    │ │ │ │ -bool v2 () const;
    │ │ │ │  bool v1 () const;
    │ │ │ │ +bool v2 () const;
    │ │ │ │  
    │ │ │ │

    returns whether this torrent has v1 and/or v2 metadata, respectively. │ │ │ │ Hybrid torrents have both. These are shortcuts for │ │ │ │ info_hashes().has_v1() and info_hashes().has_v2() calls.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    num_files()

    │ │ │ │ @@ -588,23 +588,23 @@ │ │ │ │ to peers over anything other than the i2p network.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    piece_size()

    │ │ │ │
    │ │ │ │  int piece_size (piece_index_t index) const;
    │ │ │ │  
    │ │ │ │ -

    returns the piece size of file with index. This will be the same as piece_length(), │ │ │ │ +

    returns the piece size of file with index. This will be the same as piece_length(), │ │ │ │ except for the last piece, which may be shorter.

    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -
    │ │ │ │ -

    hash_for_piece() hash_for_piece_ptr()

    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    hash_for_piece_ptr() hash_for_piece()

    │ │ │ │
    │ │ │ │ -char const* hash_for_piece_ptr (piece_index_t const index) const;
    │ │ │ │  sha1_hash hash_for_piece (piece_index_t index) const;
    │ │ │ │ +char const* hash_for_piece_ptr (piece_index_t const index) const;
    │ │ │ │  
    │ │ │ │

    hash_for_piece() takes a piece-index and returns the 20-bytes │ │ │ │ sha1-hash for that piece and info_hash() returns the 20-bytes │ │ │ │ sha1-hash for the info-section of the torrent file. │ │ │ │ hash_for_piece_ptr() returns a pointer to the 20 byte sha1 digest │ │ │ │ for the piece. Note that the string is not 0-terminated.

    │ │ │ │ [report issue]
    │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -7,35 +7,35 @@ │ │ │ │ │ o _o_p_e_r_a_t_o_r_=_=_(_) │ │ │ │ │ o _o_p_e_r_a_t_o_r_<_(_) │ │ │ │ │ o _e_n_u_m_ _t_y_p_e___t │ │ │ │ │ * _l_o_a_d___t_o_r_r_e_n_t___l_i_m_i_t_s │ │ │ │ │ * _t_o_r_r_e_n_t___i_n_f_o │ │ │ │ │ o _t_o_r_r_e_n_t___i_n_f_o_(_) │ │ │ │ │ o _~_t_o_r_r_e_n_t___i_n_f_o_(_) │ │ │ │ │ - o _f_i_l_e_s_(_)_ _o_r_i_g___f_i_l_e_s_(_) │ │ │ │ │ + o _o_r_i_g___f_i_l_e_s_(_)_ _f_i_l_e_s_(_) │ │ │ │ │ o _r_e_n_a_m_e___f_i_l_e_(_) │ │ │ │ │ o _r_e_m_a_p___f_i_l_e_s_(_) │ │ │ │ │ o _t_r_a_c_k_e_r_s_(_)_ _c_l_e_a_r___t_r_a_c_k_e_r_s_(_)_ _a_d_d___t_r_a_c_k_e_r_(_) │ │ │ │ │ - o _c_o_l_l_e_c_t_i_o_n_s_(_)_ _s_i_m_i_l_a_r___t_o_r_r_e_n_t_s_(_) │ │ │ │ │ - o _s_e_t___w_e_b___s_e_e_d_s_(_)_ _a_d_d___u_r_l___s_e_e_d_(_)_ _w_e_b___s_e_e_d_s_(_)_ _a_d_d___h_t_t_p___s_e_e_d_(_) │ │ │ │ │ + o _s_i_m_i_l_a_r___t_o_r_r_e_n_t_s_(_)_ _c_o_l_l_e_c_t_i_o_n_s_(_) │ │ │ │ │ + o _s_e_t___w_e_b___s_e_e_d_s_(_)_ _w_e_b___s_e_e_d_s_(_)_ _a_d_d___u_r_l___s_e_e_d_(_)_ _a_d_d___h_t_t_p___s_e_e_d_(_) │ │ │ │ │ o _t_o_t_a_l___s_i_z_e_(_) │ │ │ │ │ - o _n_u_m___p_i_e_c_e_s_(_)_ _p_i_e_c_e___l_e_n_g_t_h_(_) │ │ │ │ │ + o _p_i_e_c_e___l_e_n_g_t_h_(_)_ _n_u_m___p_i_e_c_e_s_(_) │ │ │ │ │ o _b_l_o_c_k_s___p_e_r___p_i_e_c_e_(_) │ │ │ │ │ - o _e_n_d___p_i_e_c_e_(_)_ _p_i_e_c_e___r_a_n_g_e_(_)_ _l_a_s_t___p_i_e_c_e_(_) │ │ │ │ │ + o _l_a_s_t___p_i_e_c_e_(_)_ _p_i_e_c_e___r_a_n_g_e_(_)_ _e_n_d___p_i_e_c_e_(_) │ │ │ │ │ o _i_n_f_o___h_a_s_h_e_s_(_)_ _i_n_f_o___h_a_s_h_(_) │ │ │ │ │ o _v_1_(_)_ _v_2_(_) │ │ │ │ │ o _n_u_m___f_i_l_e_s_(_) │ │ │ │ │ o _m_a_p___b_l_o_c_k_(_) │ │ │ │ │ o _m_a_p___f_i_l_e_(_) │ │ │ │ │ o _s_s_l___c_e_r_t_(_) │ │ │ │ │ o _i_s___v_a_l_i_d_(_) │ │ │ │ │ o _p_r_i_v_(_) │ │ │ │ │ o _i_s___i_2_p_(_) │ │ │ │ │ o _p_i_e_c_e___s_i_z_e_(_) │ │ │ │ │ - o _h_a_s_h___f_o_r___p_i_e_c_e_(_)_ _h_a_s_h___f_o_r___p_i_e_c_e___p_t_r_(_) │ │ │ │ │ + o _h_a_s_h___f_o_r___p_i_e_c_e___p_t_r_(_)_ _h_a_s_h___f_o_r___p_i_e_c_e_(_) │ │ │ │ │ o _n_a_m_e_(_) │ │ │ │ │ o _c_r_e_a_t_i_o_n___d_a_t_e_(_) │ │ │ │ │ o _c_r_e_a_t_o_r_(_) │ │ │ │ │ o _c_o_m_m_e_n_t_(_) │ │ │ │ │ o _n_o_d_e_s_(_) │ │ │ │ │ o _a_d_d___n_o_d_e_(_) │ │ │ │ │ o _p_a_r_s_e___i_n_f_o___s_e_c_t_i_o_n_(_) │ │ │ │ │ @@ -120,74 +120,74 @@ │ │ │ │ │ the max number of bdecode tokens │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ttoorrrreenntt__iinnffoo ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_t_o_r_r_e_n_t___i_n_f_o_._h_p_p" │ │ │ │ │ the _t_o_r_r_e_n_t___i_n_f_o class holds the information found in a .torrent file. │ │ │ │ │ class torrent_info │ │ │ │ │ { │ │ │ │ │ - ttoorrrreenntt__iinnffoo (span buffer, error_code& ec, from_span_t); │ │ │ │ │ - ttoorrrreenntt__iinnffoo (std::string const& filename, error_code& ec); │ │ │ │ │ - ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file, load_torrent_limits const& │ │ │ │ │ -cfg); │ │ │ │ │ + ttoorrrreenntt__iinnffoo (char const* buffer, int size); │ │ │ │ │ ttoorrrreenntt__iinnffoo (torrent_info const& t); │ │ │ │ │ - ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file, error_code& ec); │ │ │ │ │ - ttoorrrreenntt__iinnffoo (std::string const& filename, load_torrent_limits const& cfg); │ │ │ │ │ - explicit ttoorrrreenntt__iinnffoo (info_hash_t const& info_hash); │ │ │ │ │ - explicit ttoorrrreenntt__iinnffoo (std::string const& filename); │ │ │ │ │ - explicit ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file); │ │ │ │ │ + ttoorrrreenntt__iinnffoo (std::string const& filename, error_code& ec); │ │ │ │ │ explicit ttoorrrreenntt__iinnffoo (span buffer, from_span_t); │ │ │ │ │ ttoorrrreenntt__iinnffoo (span buffer, load_torrent_limits const& cfg, │ │ │ │ │ from_span_t); │ │ │ │ │ - ttoorrrreenntt__iinnffoo (char const* buffer, int size); │ │ │ │ │ + explicit ttoorrrreenntt__iinnffoo (std::string const& filename); │ │ │ │ │ + explicit ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file); │ │ │ │ │ + ttoorrrreenntt__iinnffoo (span buffer, error_code& ec, from_span_t); │ │ │ │ │ + ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file, error_code& ec); │ │ │ │ │ + ttoorrrreenntt__iinnffoo (std::string const& filename, load_torrent_limits const& cfg); │ │ │ │ │ + explicit ttoorrrreenntt__iinnffoo (info_hash_t const& info_hash); │ │ │ │ │ + ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file, load_torrent_limits const& │ │ │ │ │ +cfg); │ │ │ │ │ ttoorrrreenntt__iinnffoo (char const* buffer, int size, error_code& ec); │ │ │ │ │ ~~ttoorrrreenntt__iinnffoo (); │ │ │ │ │ file_storage const& ffiilleess () const; │ │ │ │ │ file_storage const& oorriigg__ffiilleess () const; │ │ │ │ │ void rreennaammee__ffiillee (file_index_t index, std::string const& new_filename); │ │ │ │ │ void rreemmaapp__ffiilleess (file_storage const& f); │ │ │ │ │ std::vector const& ttrraacckkeerrss () const; │ │ │ │ │ void aadddd__ttrraacckkeerr (std::string const& url, int tier = 0); │ │ │ │ │ - void cclleeaarr__ttrraacckkeerrss (); │ │ │ │ │ void aadddd__ttrraacckkeerr (std::string const& url, int tier │ │ │ │ │ , announce_entry::tracker_source source); │ │ │ │ │ + void cclleeaarr__ttrraacckkeerrss (); │ │ │ │ │ std::vector ssiimmiillaarr__ttoorrrreennttss () const; │ │ │ │ │ std::vector ccoolllleeccttiioonnss () const; │ │ │ │ │ - std::vector const& wweebb__sseeeeddss () const; │ │ │ │ │ void aadddd__hhttttpp__sseeeedd (std::string const& url │ │ │ │ │ , std::string const& extern_auth = std::string() │ │ │ │ │ , web_seed_entry::headers_t const& extra_headers = web_seed_entry:: │ │ │ │ │ headers_t()); │ │ │ │ │ + std::vector const& wweebb__sseeeeddss () const; │ │ │ │ │ void aadddd__uurrll__sseeeedd (std::string const& url │ │ │ │ │ , std::string const& ext_auth = std::string() │ │ │ │ │ , web_seed_entry::headers_t const& ext_headers = web_seed_entry:: │ │ │ │ │ headers_t()); │ │ │ │ │ void sseett__wweebb__sseeeeddss (std::vector seeds); │ │ │ │ │ std::int64_t ttoottaall__ssiizzee () const; │ │ │ │ │ - int nnuumm__ppiieecceess () const; │ │ │ │ │ int ppiieeccee__lleennggtthh () const; │ │ │ │ │ + int nnuumm__ppiieecceess () const; │ │ │ │ │ int bblloocckkss__ppeerr__ppiieeccee () const; │ │ │ │ │ - index_range ppiieeccee__rraannggee () const; │ │ │ │ │ - piece_index_t eenndd__ppiieeccee () const; │ │ │ │ │ piece_index_t llaasstt__ppiieeccee () const; │ │ │ │ │ - sha1_hash iinnffoo__hhaasshh () const noexcept; │ │ │ │ │ + piece_index_t eenndd__ppiieeccee () const; │ │ │ │ │ + index_range ppiieeccee__rraannggee () const; │ │ │ │ │ info_hash_t const& iinnffoo__hhaasshheess () const; │ │ │ │ │ - bool vv22 () const; │ │ │ │ │ + sha1_hash iinnffoo__hhaasshh () const noexcept; │ │ │ │ │ bool vv11 () const; │ │ │ │ │ + bool vv22 () const; │ │ │ │ │ int nnuumm__ffiilleess () const; │ │ │ │ │ std::vector mmaapp__bblloocckk (piece_index_t const piece │ │ │ │ │ , std::int64_t offset, int size) const; │ │ │ │ │ peer_request mmaapp__ffiillee (file_index_t const file, std::int64_t offset, int │ │ │ │ │ size) const; │ │ │ │ │ string_view ssssll__cceerrtt () const; │ │ │ │ │ bool iiss__vvaalliidd () const; │ │ │ │ │ bool pprriivv () const; │ │ │ │ │ bool iiss__ii22pp () const; │ │ │ │ │ int ppiieeccee__ssiizzee (piece_index_t index) const; │ │ │ │ │ - char const* hhaasshh__ffoorr__ppiieeccee__ppttrr (piece_index_t const index) const; │ │ │ │ │ sha1_hash hhaasshh__ffoorr__ppiieeccee (piece_index_t index) const; │ │ │ │ │ + char const* hhaasshh__ffoorr__ppiieeccee__ppttrr (piece_index_t const index) const; │ │ │ │ │ bool iiss__llooaaddeedd () const; │ │ │ │ │ const std::string& nnaammee () const; │ │ │ │ │ std::time_t ccrreeaattiioonn__ddaattee () const; │ │ │ │ │ const std::string& ccrreeaattoorr () const; │ │ │ │ │ const std::string& ccoommmmeenntt () const; │ │ │ │ │ std::vector> const& nnooddeess () const; │ │ │ │ │ void aadddd__nnooddee (std::pair const& node); │ │ │ │ │ @@ -196,28 +196,28 @@ │ │ │ │ │ bdecode_node iinnffoo (char const* key) const; │ │ │ │ │ span iinnffoo__sseeccttiioonn () const; │ │ │ │ │ span ppiieeccee__llaayyeerr (file_index_t) const; │ │ │ │ │ void ffrreeee__ppiieeccee__llaayyeerrss (); │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ttoorrrreenntt__iinnffoo(()) ********** │ │ │ │ │ -ttoorrrreenntt__iinnffoo (span buffer, error_code& ec, from_span_t); │ │ │ │ │ -ttoorrrreenntt__iinnffoo (std::string const& filename, error_code& ec); │ │ │ │ │ -ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file, load_torrent_limits const& │ │ │ │ │ -cfg); │ │ │ │ │ +ttoorrrreenntt__iinnffoo (char const* buffer, int size); │ │ │ │ │ ttoorrrreenntt__iinnffoo (torrent_info const& t); │ │ │ │ │ -ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file, error_code& ec); │ │ │ │ │ -ttoorrrreenntt__iinnffoo (std::string const& filename, load_torrent_limits const& cfg); │ │ │ │ │ -explicit ttoorrrreenntt__iinnffoo (info_hash_t const& info_hash); │ │ │ │ │ -explicit ttoorrrreenntt__iinnffoo (std::string const& filename); │ │ │ │ │ -explicit ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file); │ │ │ │ │ +ttoorrrreenntt__iinnffoo (std::string const& filename, error_code& ec); │ │ │ │ │ explicit ttoorrrreenntt__iinnffoo (span buffer, from_span_t); │ │ │ │ │ ttoorrrreenntt__iinnffoo (span buffer, load_torrent_limits const& cfg, │ │ │ │ │ from_span_t); │ │ │ │ │ -ttoorrrreenntt__iinnffoo (char const* buffer, int size); │ │ │ │ │ +explicit ttoorrrreenntt__iinnffoo (std::string const& filename); │ │ │ │ │ +explicit ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file); │ │ │ │ │ +ttoorrrreenntt__iinnffoo (span buffer, error_code& ec, from_span_t); │ │ │ │ │ +ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file, error_code& ec); │ │ │ │ │ +ttoorrrreenntt__iinnffoo (std::string const& filename, load_torrent_limits const& cfg); │ │ │ │ │ +explicit ttoorrrreenntt__iinnffoo (info_hash_t const& info_hash); │ │ │ │ │ +ttoorrrreenntt__iinnffoo (bdecode_node const& torrent_file, load_torrent_limits const& │ │ │ │ │ +cfg); │ │ │ │ │ ttoorrrreenntt__iinnffoo (char const* buffer, int size, error_code& ec); │ │ │ │ │ The constructor that takes an info-hash will initialize the info-hash to the │ │ │ │ │ given value, but leave all other fields empty. This is used internally when │ │ │ │ │ downloading torrents without the metadata. The metadata will be created by │ │ │ │ │ libtorrent as soon as it has been downloaded from the swarm. │ │ │ │ │ The constructor that takes a _b_d_e_c_o_d_e___n_o_d_e will create a _t_o_r_r_e_n_t___i_n_f_o object │ │ │ │ │ from the information found in the given torrent_file. The _b_d_e_c_o_d_e___n_o_d_e │ │ │ │ │ @@ -241,15 +241,15 @@ │ │ │ │ │ from_span_t to disambiguate the std::string overload for string literals. There │ │ │ │ │ is an object in the libtorrent namespace of this type called from_span. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ~~ttoorrrreenntt__iinnffoo(()) ********** │ │ │ │ │ ~~ttoorrrreenntt__iinnffoo (); │ │ │ │ │ frees all storage associated with this _t_o_r_r_e_n_t___i_n_f_o object │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ffiilleess(()) oorriigg__ffiilleess(()) ********** │ │ │ │ │ +********** oorriigg__ffiilleess(()) ffiilleess(()) ********** │ │ │ │ │ file_storage const& ffiilleess () const; │ │ │ │ │ file_storage const& oorriigg__ffiilleess () const; │ │ │ │ │ The _f_i_l_e___s_t_o_r_a_g_e object contains the information on how to map the pieces to │ │ │ │ │ files. It is separated from the _t_o_r_r_e_n_t___i_n_f_o object because when creating │ │ │ │ │ torrents a storage object needs to be created without having a torrent file. │ │ │ │ │ When renaming files in a storage, the storage needs to make its own copy of the │ │ │ │ │ _f_i_l_e___s_t_o_r_a_g_e in order to make its mapping differ from the one in the torrent │ │ │ │ │ @@ -287,41 +287,41 @@ │ │ │ │ │ files in the torrent. │ │ │ │ │ The new specified file_storage must have the exact same size as the current │ │ │ │ │ one. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ttrraacckkeerrss(()) cclleeaarr__ttrraacckkeerrss(()) aadddd__ttrraacckkeerr(()) ********** │ │ │ │ │ std::vector const& ttrraacckkeerrss () const; │ │ │ │ │ void aadddd__ttrraacckkeerr (std::string const& url, int tier = 0); │ │ │ │ │ -void cclleeaarr__ttrraacckkeerrss (); │ │ │ │ │ void aadddd__ttrraacckkeerr (std::string const& url, int tier │ │ │ │ │ , announce_entry::tracker_source source); │ │ │ │ │ +void cclleeaarr__ttrraacckkeerrss (); │ │ │ │ │ add_tracker() adds a tracker to the announce-list. The tier determines the │ │ │ │ │ order in which the trackers are to be tried. The trackers() function will │ │ │ │ │ return a sorted vector of _a_n_n_o_u_n_c_e___e_n_t_r_y. Each announce _e_n_t_r_y contains a │ │ │ │ │ string, which is the tracker url, and a tier index. The tier index is the high- │ │ │ │ │ level priority. No matter which trackers that works or not, the ones with lower │ │ │ │ │ tier will always be tried before the one with higher tier number. For more │ │ │ │ │ information, see _a_n_n_o_u_n_c_e___e_n_t_r_y. │ │ │ │ │ trackers() returns all entries from announce-list. │ │ │ │ │ clear_trackers() removes all trackers from announce-list. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ccoolllleeccttiioonnss(()) ssiimmiillaarr__ttoorrrreennttss(()) ********** │ │ │ │ │ +********** ssiimmiillaarr__ttoorrrreennttss(()) ccoolllleeccttiioonnss(()) ********** │ │ │ │ │ std::vector ssiimmiillaarr__ttoorrrreennttss () const; │ │ │ │ │ std::vector ccoolllleeccttiioonnss () const; │ │ │ │ │ These two functions are related to _B_E_P_ _3_8 (mutable torrents). The vectors │ │ │ │ │ returned from these correspond to the "similar" and "collections" keys in the │ │ │ │ │ .torrent file. Both info-hashes and collections from within the info-dict and │ │ │ │ │ from outside of it are included. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** sseett__wweebb__sseeeeddss(()) aadddd__uurrll__sseeeedd(()) wweebb__sseeeeddss(()) aadddd__hhttttpp__sseeeedd(()) ********** │ │ │ │ │ -std::vector const& wweebb__sseeeeddss () const; │ │ │ │ │ +********** sseett__wweebb__sseeeeddss(()) wweebb__sseeeeddss(()) aadddd__uurrll__sseeeedd(()) aadddd__hhttttpp__sseeeedd(()) ********** │ │ │ │ │ void aadddd__hhttttpp__sseeeedd (std::string const& url │ │ │ │ │ , std::string const& extern_auth = std::string() │ │ │ │ │ , web_seed_entry::headers_t const& extra_headers = web_seed_entry:: │ │ │ │ │ headers_t()); │ │ │ │ │ +std::vector const& wweebb__sseeeeddss () const; │ │ │ │ │ void aadddd__uurrll__sseeeedd (std::string const& url │ │ │ │ │ , std::string const& ext_auth = std::string() │ │ │ │ │ , web_seed_entry::headers_t const& ext_headers = web_seed_entry:: │ │ │ │ │ headers_t()); │ │ │ │ │ void sseett__wweebb__sseeeeddss (std::vector seeds); │ │ │ │ │ web_seeds() returns all url seeds and http seeds in the torrent. Each _e_n_t_r_y is │ │ │ │ │ a web_seed_entry and may refer to either a url seed or http seed. │ │ │ │ │ @@ -339,47 +339,47 @@ │ │ │ │ │ ********** ttoottaall__ssiizzee(()) ********** │ │ │ │ │ std::int64_t ttoottaall__ssiizzee () const; │ │ │ │ │ total_size() returns the total number of bytes the torrent-file represents. │ │ │ │ │ Note that this is the number of pieces times the piece size (modulo the last │ │ │ │ │ piece possibly being smaller). With pad files, the total size will be larger │ │ │ │ │ than the sum of all (regular) file sizes. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** nnuumm__ppiieecceess(()) ppiieeccee__lleennggtthh(()) ********** │ │ │ │ │ -int nnuumm__ppiieecceess () const; │ │ │ │ │ +********** ppiieeccee__lleennggtthh(()) nnuumm__ppiieecceess(()) ********** │ │ │ │ │ int ppiieeccee__lleennggtthh () const; │ │ │ │ │ +int nnuumm__ppiieecceess () const; │ │ │ │ │ piece_length() and num_pieces() returns the number of byte for each piece and │ │ │ │ │ the total number of pieces, respectively. The difference between piece_size() │ │ │ │ │ and piece_length() is that piece_size() takes the piece index as argument and │ │ │ │ │ gives you the exact size of that piece. It will always be the same as │ │ │ │ │ piece_length() except in the case of the last piece, which may be smaller. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** bblloocckkss__ppeerr__ppiieeccee(()) ********** │ │ │ │ │ int bblloocckkss__ppeerr__ppiieeccee () const; │ │ │ │ │ returns the number of blocks there are in the typical piece. There may be fewer │ │ │ │ │ in the last piece) │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** eenndd__ppiieeccee(()) ppiieeccee__rraannggee(()) llaasstt__ppiieeccee(()) ********** │ │ │ │ │ -index_range ppiieeccee__rraannggee () const; │ │ │ │ │ -piece_index_t eenndd__ppiieeccee () const; │ │ │ │ │ +********** llaasstt__ppiieeccee(()) ppiieeccee__rraannggee(()) eenndd__ppiieeccee(()) ********** │ │ │ │ │ piece_index_t llaasstt__ppiieeccee () const; │ │ │ │ │ +piece_index_t eenndd__ppiieeccee () const; │ │ │ │ │ +index_range ppiieeccee__rraannggee () const; │ │ │ │ │ last_piece() returns the index to the last piece in the torrent and end_piece() │ │ │ │ │ returns the index to the one-past-end piece in the torrent piece_range() │ │ │ │ │ returns an implementation-defined type that can be used as the container in a │ │ │ │ │ range-for loop. Where the values are the indices of all pieces in the │ │ │ │ │ _f_i_l_e___s_t_o_r_a_g_e. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** iinnffoo__hhaasshheess(()) iinnffoo__hhaasshh(()) ********** │ │ │ │ │ -sha1_hash iinnffoo__hhaasshh () const noexcept; │ │ │ │ │ info_hash_t const& iinnffoo__hhaasshheess () const; │ │ │ │ │ +sha1_hash iinnffoo__hhaasshh () const noexcept; │ │ │ │ │ returns the info-hash of the torrent. For BitTorrent v2 support, use │ │ │ │ │ info_hashes() to get an object that may hold both a v1 and v2 info-hash │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** vv11(()) vv22(()) ********** │ │ │ │ │ -bool vv22 () const; │ │ │ │ │ bool vv11 () const; │ │ │ │ │ +bool vv22 () const; │ │ │ │ │ returns whether this torrent has v1 and/or v2 metadata, respectively. Hybrid │ │ │ │ │ torrents have both. These are shortcuts for info_hashes().has_v1() and │ │ │ │ │ info_hashes().has_v2() calls. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** nnuumm__ffiilleess(()) ********** │ │ │ │ │ int nnuumm__ffiilleess () const; │ │ │ │ │ If you need index-access to files you can use the num_files() along with the │ │ │ │ │ @@ -427,17 +427,17 @@ │ │ │ │ │ than the i2p network. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ppiieeccee__ssiizzee(()) ********** │ │ │ │ │ int ppiieeccee__ssiizzee (piece_index_t index) const; │ │ │ │ │ returns the piece size of file with index. This will be the same as │ │ │ │ │ _p_i_e_c_e___l_e_n_g_t_h_(_), except for the last piece, which may be shorter. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** hhaasshh__ffoorr__ppiieeccee(()) hhaasshh__ffoorr__ppiieeccee__ppttrr(()) ********** │ │ │ │ │ -char const* hhaasshh__ffoorr__ppiieeccee__ppttrr (piece_index_t const index) const; │ │ │ │ │ +********** hhaasshh__ffoorr__ppiieeccee__ppttrr(()) hhaasshh__ffoorr__ppiieeccee(()) ********** │ │ │ │ │ sha1_hash hhaasshh__ffoorr__ppiieeccee (piece_index_t index) const; │ │ │ │ │ +char const* hhaasshh__ffoorr__ppiieeccee__ppttrr (piece_index_t const index) const; │ │ │ │ │ hash_for_piece() takes a piece-index and returns the 20-bytes sha1-hash for │ │ │ │ │ that piece and info_hash() returns the 20-bytes sha1-hash for the info-section │ │ │ │ │ of the torrent file. hash_for_piece_ptr() returns a pointer to the 20 byte sha1 │ │ │ │ │ digest for the piece. Note that the string is not 0-terminated. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** nnaammee(()) ********** │ │ │ │ │ const std::string& nnaammee () const; │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Status.html │ │ │ │ @@ -426,15 +426,15 @@ │ │ │ │ currently connected to. │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    num_peers
    │ │ │ │
    the number of peers this torrent currently is connected to. Peer │ │ │ │ connections that are in the half-open state (is attempting to connect) │ │ │ │ or are queued for later connection attempt do not count. Although they │ │ │ │ -are visible in the peer list when you call get_peer_info().
    │ │ │ │ +are visible in the peer list when you call get_peer_info(). │ │ │ │
    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │
    num_complete num_incomplete
    │ │ │ │
    if the tracker sends scrape info in its announce reply, these fields │ │ │ │ will be set to the total number of peers that have the whole file and │ │ │ │ the total number of peers that are still downloading. set to -1 if the │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Trackers.html │ │ │ │ @@ -31,15 +31,15 @@ │ │ │ │

    home

    │ │ │ │
    │ │ │ │

    Table of contents

    │ │ │ │ │ │ │ │
    │ │ │ │ [report issue]
    │ │ │ │

    announce_infohash

    │ │ │ │ @@ -131,19 +131,19 @@ │ │ │ │

    announce_entry

    │ │ │ │

    Declared in "libtorrent/announce_entry.hpp"

    │ │ │ │

    this class holds information about one bittorrent tracker, as it │ │ │ │ relates to a specific torrent.

    │ │ │ │
    │ │ │ │  struct announce_entry
    │ │ │ │  {
    │ │ │ │ -   announce_entry ();
    │ │ │ │ -   ~announce_entry ();
    │ │ │ │ +   announce_entry (announce_entry const&);
    │ │ │ │     explicit announce_entry (string_view u);
    │ │ │ │ +   announce_entry ();
    │ │ │ │     announce_entry& operator= (announce_entry const&) &;
    │ │ │ │ -   announce_entry (announce_entry const&);
    │ │ │ │ +   ~announce_entry ();
    │ │ │ │  
    │ │ │ │     enum tracker_source
    │ │ │ │     {
    │ │ │ │        source_torrent,
    │ │ │ │        source_client,
    │ │ │ │        source_magnet_link,
    │ │ │ │        source_tex,
    │ │ │ │ @@ -154,24 +154,24 @@
    │ │ │ │     std::vector<announce_endpoint> endpoints;
    │ │ │ │     std::uint8_t tier  = 0;
    │ │ │ │     std::uint8_t fail_limit  = 0;
    │ │ │ │     std::uint8_t source:4;
    │ │ │ │     bool verified:1;
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ -[report issue]
    │ │ │ │ -

    announce_entry() operator=() ~announce_entry()

    │ │ │ │ +[report issue]
    │ │ │ │ +

    ~announce_entry() operator=() announce_entry()

    │ │ │ │
    │ │ │ │ -announce_entry ();
    │ │ │ │ -~announce_entry ();
    │ │ │ │ +announce_entry (announce_entry const&);
    │ │ │ │  explicit announce_entry (string_view u);
    │ │ │ │ +announce_entry ();
    │ │ │ │  announce_entry& operator= (announce_entry const&) &;
    │ │ │ │ -announce_entry (announce_entry const&);
    │ │ │ │ +~announce_entry ();
    │ │ │ │  
    │ │ │ │

    constructs a tracker announce entry with u as the URL.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    enum tracker_source

    │ │ │ │

    Declared in "libtorrent/announce_entry.hpp"

    │ │ │ │
    │ │ │ │ @@ -189,15 +189,15 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ + │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -2,15 +2,15 @@ │ │ │ │ │ _[_l_i_b_t_o_r_r_e_n_t_ _l_o_g_o_] │ │ │ │ │ VVeerrssiioonn:: 2.0.11 │ │ │ │ │ _h_o_m_e │ │ │ │ │ Table of contents │ │ │ │ │ * _a_n_n_o_u_n_c_e___i_n_f_o_h_a_s_h │ │ │ │ │ * _a_n_n_o_u_n_c_e___e_n_d_p_o_i_n_t │ │ │ │ │ * _a_n_n_o_u_n_c_e___e_n_t_r_y │ │ │ │ │ - o _a_n_n_o_u_n_c_e___e_n_t_r_y_(_)_ _o_p_e_r_a_t_o_r_=_(_)_ _~_a_n_n_o_u_n_c_e___e_n_t_r_y_(_) │ │ │ │ │ + o _~_a_n_n_o_u_n_c_e___e_n_t_r_y_(_)_ _o_p_e_r_a_t_o_r_=_(_)_ _a_n_n_o_u_n_c_e___e_n_t_r_y_(_) │ │ │ │ │ o _e_n_u_m_ _t_r_a_c_k_e_r___s_o_u_r_c_e │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ aannnnoouunnccee__iinnffoohhaasshh ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_a_n_n_o_u_n_c_e___e_n_t_r_y_._h_p_p" │ │ │ │ │ struct announce_infohash │ │ │ │ │ { │ │ │ │ │ std::string message; │ │ │ │ │ @@ -78,19 +78,19 @@ │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ aannnnoouunnccee__eennttrryy ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_a_n_n_o_u_n_c_e___e_n_t_r_y_._h_p_p" │ │ │ │ │ this class holds information about one bittorrent tracker, as it relates to a │ │ │ │ │ specific torrent. │ │ │ │ │ struct announce_entry │ │ │ │ │ { │ │ │ │ │ - aannnnoouunnccee__eennttrryy (); │ │ │ │ │ - ~~aannnnoouunnccee__eennttrryy (); │ │ │ │ │ + aannnnoouunnccee__eennttrryy (announce_entry const&); │ │ │ │ │ explicit aannnnoouunnccee__eennttrryy (string_view u); │ │ │ │ │ + aannnnoouunnccee__eennttrryy (); │ │ │ │ │ announce_entry& ooppeerraattoorr== (announce_entry const&) &; │ │ │ │ │ - aannnnoouunnccee__eennttrryy (announce_entry const&); │ │ │ │ │ + ~~aannnnoouunnccee__eennttrryy (); │ │ │ │ │ │ │ │ │ │ enum tracker_source │ │ │ │ │ { │ │ │ │ │ source_torrent, │ │ │ │ │ source_client, │ │ │ │ │ source_magnet_link, │ │ │ │ │ source_tex, │ │ │ │ │ @@ -101,20 +101,20 @@ │ │ │ │ │ std::vector endpoints; │ │ │ │ │ std::uint8_t ttiieerr = 0; │ │ │ │ │ std::uint8_t ffaaiill__lliimmiitt = 0; │ │ │ │ │ std::uint8_t source:4; │ │ │ │ │ bool verified:1; │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** aannnnoouunnccee__eennttrryy(()) ooppeerraattoorr==(()) ~~aannnnoouunnccee__eennttrryy(()) ********** │ │ │ │ │ -aannnnoouunnccee__eennttrryy (); │ │ │ │ │ -~~aannnnoouunnccee__eennttrryy (); │ │ │ │ │ +********** ~~aannnnoouunnccee__eennttrryy(()) ooppeerraattoorr==(()) aannnnoouunnccee__eennttrryy(()) ********** │ │ │ │ │ +aannnnoouunnccee__eennttrryy (announce_entry const&); │ │ │ │ │ explicit aannnnoouunnccee__eennttrryy (string_view u); │ │ │ │ │ +aannnnoouunnccee__eennttrryy (); │ │ │ │ │ announce_entry& ooppeerraattoorr== (announce_entry const&) &; │ │ │ │ │ -aannnnoouunnccee__eennttrryy (announce_entry const&); │ │ │ │ │ +~~aannnnoouunnccee__eennttrryy (); │ │ │ │ │ constructs a tracker announce _e_n_t_r_y with u as the URL. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** eennuumm ttrraacckkeerr__ssoouurrccee ********** │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_a_n_n_o_u_n_c_e___e_n_t_r_y_._h_p_p" │ │ │ │ │ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ │ │ │ │ │ |_nn_aa_mm_ee_ _ _ _ _ _ _ _ _ _ _ _ _ _ _|_vv_aa_ll_uu_ee_|_dd_ee_ss_cc_rr_ii_pp_tt_ii_oo_nn_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | │ │ │ │ │ |_s_o_u_r_c_e___t_o_r_r_e_n_t_ _ _ _ _|_1_ _ _ _ _|_t_h_e_ _t_r_a_c_k_e_r_ _w_a_s_ _p_a_r_t_ _o_f_ _t_h_e_ _._t_o_r_r_e_n_t_ _f_i_l_e_ _ _ _ _ _ _ _ _ _ | │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Utility.html │ │ │ │ @@ -29,31 +29,31 @@ │ │ │ │ │ │ │ │
    source_torrent1the tracker was part of the .torrent file
    source_client2the tracker was added programmatically via the add_tracker() functionthe tracker was added programmatically via the add_tracker() function
    source_magnet_link4the tracker was part of a magnet link
    source_tex8
    │ │ │ │

    home

    │ │ │ │
    │ │ │ │

    Table of contents

    │ │ │ │