--- /srv/rebuilderd/tmp/rebuilderdY2wFNF/inputs/libtorrent-rasterbar-doc_2.0.11-1_all.deb +++ /srv/rebuilderd/tmp/rebuilderdY2wFNF/out/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 3628 2025-01-28 14:33:12.000000 control.tar.xz │ --rw-r--r-- 0 0 0 1666144 2025-01-28 14:33:12.000000 data.tar.xz │ +-rw-r--r-- 0 0 0 3624 2025-01-28 14:33:12.000000 control.tar.xz │ +-rw-r--r-- 0 0 0 1669092 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 │ │ │ @@ -82,34 +82,34 @@ │ │ │ -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) 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) 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) 56856 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) 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) 55640 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) 55632 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) 16462 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) 1274764 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) 1360841 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/manual-ref.html │ │ │ @@ -100,15 +100,15 @@ │ │ │ the session, it contains the main loop that serves all torrents.

│ │ │

The basic usage is as follows:

│ │ │ │ │ │ │ │ │ -
  • 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,30 +33,30 @@ │ │ │

    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 │ │ │ @@ -94,81 +94,490 @@ │ │ │

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

    libtorrent_category()

    │ │ │ -

    Declared in "libtorrent/error_code.hpp"

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

    return the instance of the libtorrent_error_category which │ │ │ -maps libtorrent error codes to human readable error messages.

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

    http_category()

    │ │ │ -

    Declared in "libtorrent/error_code.hpp"

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

    returns the error_category for HTTP errors

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

    gzip_category()

    │ │ │ -

    Declared in "libtorrent/gzip.hpp"

    │ │ │ +
    │ │ │ +

    pcp_category()

    │ │ │ +

    Declared in "libtorrent/natpmp.hpp"

    │ │ │
    │ │ │ -boost::system::error_category& gzip_category ();
    │ │ │ +boost::system::error_category& pcp_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]
    │ │ │ -
    │ │ │ -

    i2p_category()

    │ │ │ -

    Declared in "libtorrent/i2p_stream.hpp"

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

    returns the error category for I2P errors

    │ │ │ [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]
    │ │ │ -
    │ │ │ -

    pcp_category()

    │ │ │ -

    Declared in "libtorrent/natpmp.hpp"

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

    gzip_category()

    │ │ │ +

    Declared in "libtorrent/gzip.hpp"

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

    get the error_category for zip errors

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

    i2p_category()

    │ │ │ +

    Declared in "libtorrent/i2p_stream.hpp"

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

    returns the error category for I2P errors

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

    bdecode_category()

    │ │ │

    Declared in "libtorrent/bdecode.hpp"

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

    libtorrent_category()

    │ │ │ +

    Declared in "libtorrent/error_code.hpp"

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

    return the instance of the libtorrent_error_category which │ │ │ +maps libtorrent error codes to human readable error messages.

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

    http_category()

    │ │ │ +

    Declared in "libtorrent/error_code.hpp"

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

    returns the error_category for HTTP errors

    │ │ │ +[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
    │ │ │ +[report issue]
    │ │ │ +
    │ │ │ +

    enum socks_error_code

    │ │ │ +

    Declared in "libtorrent/socks5_stream.hpp"

    │ │ │ + │ │ │ +│ │ │ +│ │ │ +│ │ │ +│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
    namevaluedescription
    no_error0 
    unsupported_version1 
    unsupported_authentication_method2 
    unsupported_authentication_version3 
    authentication_error4 
    username_required5 
    general_failure6 
    command_not_supported7 
    no_identd8 
    identd_error9 
    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 i2p_error_code

    │ │ │ +

    Declared in "libtorrent/i2p_stream.hpp"

    │ │ │ + │ │ │ +│ │ │ +│ │ │ +│ │ │ +│ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ + │ │ │ +
    namevaluedescription
    no_error0 
    parse_failed1 
    cant_reach_peer2 
    i2p_error3 
    invalid_key4 
    invalid_id5 
    timeout6 
    key_not_found7 
    duplicated_id8 
    num_errors9 
    │ │ │ +[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 error_code_enum

    │ │ │

    Declared in "libtorrent/error_code.hpp"

    │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ @@ -991,423 +1400,14 @@ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
    service_unavailable503 
    │ │ │ -[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 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
    │ │ │ -[report issue]
    │ │ │ -
    │ │ │ -

    enum i2p_error_code

    │ │ │ -

    Declared in "libtorrent/i2p_stream.hpp"

    │ │ │ - │ │ │ -│ │ │ -│ │ │ -│ │ │ -│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    namevaluedescription
    no_error0 
    parse_failed1 
    cant_reach_peer2 
    i2p_error3 
    invalid_key4 
    invalid_id5 
    timeout6 
    key_not_found7 
    duplicated_id8 
    num_errors9 
    │ │ │ -[report issue]
    │ │ │ -
    │ │ │ -

    enum socks_error_code

    │ │ │ -

    Declared in "libtorrent/socks5_stream.hpp"

    │ │ │ - │ │ │ -│ │ │ -│ │ │ -│ │ │ -│ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ - │ │ │ -
    namevaluedescription
    no_error0 
    unsupported_version1 
    unsupported_authentication_method2 
    unsupported_authentication_version3 
    authentication_error4 
    username_required5 
    general_failure6 
    command_not_supported7 
    no_identd8 
    identd_error9 
    num_errors10 
    │ │ │ -[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/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
    │ │ │
    │ │ │ │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │ │ │ │
    │ │ │
    │ │ │
    │ │ │ │ │ │ +
    │ │ │ +

    peer_connection_handle

    │ │ │ +

    Declared in "libtorrent/peer_connection_handle.hpp"

    │ │ │ +

    the peer_connection_handle class provides a handle to the internal peer │ │ │ +connection object, to be used by plugins. This is a low level interface that │ │ │ +may not be stable across libtorrent versions

    │ │ │ +
    │ │ │ +struct peer_connection_handle
    │ │ │ +{
    │ │ │ +   explicit peer_connection_handle (std::weak_ptr<peer_connection> impl);
    │ │ │ +   connection_type type () const;
    │ │ │ +   void add_extension (std::shared_ptr<peer_plugin>);
    │ │ │ +   peer_plugin const* find_plugin (string_view type) const;
    │ │ │ +   bool is_seed () const;
    │ │ │ +   bool upload_only () const;
    │ │ │ +   peer_id const& pid () const;
    │ │ │ +   bool has_piece (piece_index_t i) const;
    │ │ │ +   bool is_choked () const;
    │ │ │ +   bool is_interesting () const;
    │ │ │ +   bool has_peer_choked () const;
    │ │ │ +   bool is_peer_interested () const;
    │ │ │ +   void maybe_unchoke_this_peer ();
    │ │ │ +   void choke_this_peer ();
    │ │ │ +   void get_peer_info (peer_info& p) const;
    │ │ │ +   torrent_handle associated_torrent () const;
    │ │ │ +   tcp::endpoint local_endpoint () const;
    │ │ │ +   tcp::endpoint const& remote () const;
    │ │ │ +   bool is_outgoing () const;
    │ │ │ +   bool is_disconnecting () const;
    │ │ │ +   void disconnect (error_code const& ec, operation_t op
    │ │ │ +      , disconnect_severity_t = peer_connection_interface::normal);
    │ │ │ +   bool is_connecting () const;
    │ │ │ +   bool on_local_network () const;
    │ │ │ +   bool ignore_unchoke_slots () const;
    │ │ │ +   bool failed () const;
    │ │ │ +   bool should_log (peer_log_alert::direction_t direction) const;
    │ │ │ +   void peer_log (peer_log_alert::direction_t direction
    │ │ │ +      , char const* event, char const* fmt = "", ...) const TORRENT_FORMAT(4,5);
    │ │ │ +   bool can_disconnect (error_code const& ec) const;
    │ │ │ +   bool has_metadata () const;
    │ │ │ +   bool in_handshake () const;
    │ │ │ +   void send_buffer (char const* begin, int size);
    │ │ │ +   std::time_t last_seen_complete () const;
    │ │ │ +   time_point time_of_last_unchoke () const;
    │ │ │ +   bool operator!= (peer_connection_handle const& o) const;
    │ │ │ +   bool operator< (peer_connection_handle const& o) const;
    │ │ │ +   bool operator== (peer_connection_handle const& o) const;
    │ │ │ +   std::shared_ptr<peer_connection> native_handle () const;
    │ │ │ +};
    │ │ │ +
    │ │ │ +[report issue]
    │ │ │ +
    │ │ │ +

    bt_peer_connection_handle

    │ │ │ +

    Declared in "libtorrent/peer_connection_handle.hpp"

    │ │ │ +

    The bt_peer_connection_handle provides a handle to the internal bittorrent │ │ │ +peer connection object to plugins. It's low level and may not be a stable API │ │ │ +across libtorrent versions.

    │ │ │ +
    │ │ │ +struct bt_peer_connection_handle : peer_connection_handle
    │ │ │ +{
    │ │ │ +   explicit bt_peer_connection_handle (peer_connection_handle pc);
    │ │ │ +   bool support_extensions () const;
    │ │ │ +   bool packet_finished () const;
    │ │ │ +   bool supports_encryption () const;
    │ │ │ +   void switch_recv_crypto (std::shared_ptr<crypto_plugin> crypto);
    │ │ │ +   void switch_send_crypto (std::shared_ptr<crypto_plugin> crypto);
    │ │ │ +   std::shared_ptr<bt_peer_connection> native_handle () const;
    │ │ │ +};
    │ │ │ +
    │ │ │ [report issue]
    │ │ │
    │ │ │

    plugin

    │ │ │

    Declared in "libtorrent/extensions.hpp"

    │ │ │

    this is the base class for a session plugin. One primary feature │ │ │ is that it is notified of all torrents that are added to the session, │ │ │ and can add its own torrent_plugins.

    │ │ │ @@ -376,18 +446,18 @@ │ │ │ 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);
    │ │ │  
    │ │ │

    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 │ │ │ @@ -396,18 +466,18 @@ │ │ │

    │ │ │

    tick()

    │ │ │
    │ │ │  virtual void tick ();
    │ │ │  
    │ │ │

    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_pause() on_resume()

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

    on_resume() on_pause()

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

    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 │ │ │ @@ -475,43 +545,43 @@ │ │ │ { │ │ │ 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_have_none (); │ │ │ + virtual bool on_bitfield (bitfield const& /*bitfield*/); │ │ │ + virtual bool on_unchoke (); │ │ │ virtual bool on_have (piece_index_t); │ │ │ - virtual bool on_request (peer_request const&); │ │ │ + virtual bool on_dont_have (piece_index_t); │ │ │ + virtual bool on_have_all (); │ │ │ virtual bool on_not_interested (); │ │ │ virtual bool on_allowed_fast (piece_index_t); │ │ │ - virtual bool on_bitfield (bitfield const& /*bitfield*/); │ │ │ - virtual bool on_interested (); │ │ │ + virtual bool on_request (peer_request const&); │ │ │ + virtual bool on_have_none (); │ │ │ virtual bool on_choke (); │ │ │ - virtual bool on_unchoke (); │ │ │ - virtual bool on_have_all (); │ │ │ - virtual bool on_dont_have (piece_index_t); │ │ │ + virtual bool on_interested (); │ │ │ virtual bool on_piece (peer_request const& /*piece*/ │ │ │ , span<char const> /*buf*/); │ │ │ + virtual bool on_cancel (peer_request const&); │ │ │ virtual bool on_reject (peer_request const&); │ │ │ virtual bool on_suggest (piece_index_t); │ │ │ - virtual bool on_cancel (peer_request const&); │ │ │ - virtual void sent_allow_fast (piece_index_t); │ │ │ - virtual void sent_choke (); │ │ │ - virtual void sent_have_all (); │ │ │ virtual void sent_suggest (piece_index_t); │ │ │ - virtual void sent_request (peer_request const&); │ │ │ + virtual void sent_cancel (peer_request const&); │ │ │ virtual void sent_have_none (); │ │ │ + virtual void sent_have_all (); │ │ │ + virtual void sent_choke (); │ │ │ + virtual void sent_allow_fast (piece_index_t); │ │ │ virtual void sent_reject_request (peer_request const&); │ │ │ - virtual void sent_cancel (peer_request const&); │ │ │ - virtual void sent_have (piece_index_t); │ │ │ - virtual void sent_interested (); │ │ │ + virtual void sent_request (peer_request const&); │ │ │ virtual void sent_piece (peer_request const&); │ │ │ - virtual void sent_not_interested (); │ │ │ virtual void sent_unchoke (); │ │ │ + virtual void sent_not_interested (); │ │ │ + virtual void sent_interested (); │ │ │ + virtual void sent_have (piece_index_t); │ │ │ 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); │ │ │ @@ -571,37 +641,37 @@ │ │ │

    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_unchoke() on_have_none() on_not_interested() on_request() on_dont_have() on_have_all() on_bitfield() on_have() on_allowed_fast() on_choke() on_interested()

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

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

    │ │ │
    │ │ │ -virtual bool on_have_none ();
    │ │ │ +virtual bool on_bitfield (bitfield const& /*bitfield*/);
    │ │ │ +virtual bool on_unchoke ();
    │ │ │  virtual bool on_have (piece_index_t);
    │ │ │ -virtual bool on_request (peer_request const&);
    │ │ │ +virtual bool on_dont_have (piece_index_t);
    │ │ │ +virtual bool on_have_all ();
    │ │ │  virtual bool on_not_interested ();
    │ │ │  virtual bool on_allowed_fast (piece_index_t);
    │ │ │ -virtual bool on_bitfield (bitfield const& /*bitfield*/);
    │ │ │ -virtual bool on_interested ();
    │ │ │ +virtual bool on_request (peer_request const&);
    │ │ │ +virtual bool on_have_none ();
    │ │ │  virtual bool on_choke ();
    │ │ │ -virtual bool on_unchoke ();
    │ │ │ -virtual bool on_have_all ();
    │ │ │ -virtual bool on_dont_have (piece_index_t);
    │ │ │ +virtual bool on_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]
    │ │ │ @@ -613,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_unchoke() sent_have() sent_not_interested() sent_piece() sent_interested()

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

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

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

    called after a choke message has been sent to the peer

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

    sent_payload()

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

    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);
    │ │ │  
    │ │ │

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

    │ │ │ [report issue]
    │ │ │ @@ -703,16 +773,16 @@ │ │ │
    │ │ │
    │ │ │

    crypto_plugin

    │ │ │

    Declared in "libtorrent/extensions.hpp"

    │ │ │
    │ │ │  struct crypto_plugin
    │ │ │  {
    │ │ │ -   virtual void set_incoming_key (span<char const> key) = 0;
    │ │ │     virtual void set_outgoing_key (span<char const> key) = 0;
    │ │ │ +   virtual void set_incoming_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()

    │ │ │
    │ │ │ @@ -723,86 +793,16 @@
    │ │ │  (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]
    │ │ │ -
    │ │ │ -
    │ │ │ -

    peer_connection_handle

    │ │ │ -

    Declared in "libtorrent/peer_connection_handle.hpp"

    │ │ │ -

    the peer_connection_handle class provides a handle to the internal peer │ │ │ -connection object, to be used by plugins. This is a low level interface that │ │ │ -may not be stable across libtorrent versions

    │ │ │ -
    │ │ │ -struct peer_connection_handle
    │ │ │ -{
    │ │ │ -   explicit peer_connection_handle (std::weak_ptr<peer_connection> impl);
    │ │ │ -   connection_type type () const;
    │ │ │ -   peer_plugin const* find_plugin (string_view type) const;
    │ │ │ -   void add_extension (std::shared_ptr<peer_plugin>);
    │ │ │ -   bool is_seed () const;
    │ │ │ -   bool upload_only () const;
    │ │ │ -   peer_id const& pid () const;
    │ │ │ -   bool has_piece (piece_index_t i) const;
    │ │ │ -   bool is_interesting () const;
    │ │ │ -   bool is_choked () const;
    │ │ │ -   bool is_peer_interested () const;
    │ │ │ -   bool has_peer_choked () const;
    │ │ │ -   void choke_this_peer ();
    │ │ │ -   void maybe_unchoke_this_peer ();
    │ │ │ -   void get_peer_info (peer_info& p) const;
    │ │ │ -   torrent_handle associated_torrent () const;
    │ │ │ -   tcp::endpoint const& remote () const;
    │ │ │ -   tcp::endpoint local_endpoint () const;
    │ │ │ -   void disconnect (error_code const& ec, operation_t op
    │ │ │ -      , disconnect_severity_t = peer_connection_interface::normal);
    │ │ │ -   bool is_outgoing () const;
    │ │ │ -   bool is_connecting () const;
    │ │ │ -   bool is_disconnecting () const;
    │ │ │ -   bool on_local_network () const;
    │ │ │ -   bool ignore_unchoke_slots () const;
    │ │ │ -   bool failed () const;
    │ │ │ -   bool should_log (peer_log_alert::direction_t direction) const;
    │ │ │ -   void peer_log (peer_log_alert::direction_t direction
    │ │ │ -      , char const* event, char const* fmt = "", ...) const TORRENT_FORMAT(4,5);
    │ │ │ -   bool can_disconnect (error_code const& ec) const;
    │ │ │ -   bool has_metadata () const;
    │ │ │ -   bool in_handshake () const;
    │ │ │ -   void send_buffer (char const* begin, int size);
    │ │ │ -   std::time_t last_seen_complete () const;
    │ │ │ -   time_point time_of_last_unchoke () const;
    │ │ │ -   bool operator== (peer_connection_handle const& o) const;
    │ │ │ -   bool operator< (peer_connection_handle const& o) const;
    │ │ │ -   bool operator!= (peer_connection_handle const& o) const;
    │ │ │ -   std::shared_ptr<peer_connection> native_handle () const;
    │ │ │ -};
    │ │ │ -
    │ │ │ -[report issue]
    │ │ │ -
    │ │ │ -

    bt_peer_connection_handle

    │ │ │ -

    Declared in "libtorrent/peer_connection_handle.hpp"

    │ │ │ -

    The bt_peer_connection_handle provides a handle to the internal bittorrent │ │ │ -peer connection object to plugins. It's low level and may not be a stable API │ │ │ -across libtorrent versions.

    │ │ │ -
    │ │ │ -struct bt_peer_connection_handle : peer_connection_handle
    │ │ │ -{
    │ │ │ -   explicit bt_peer_connection_handle (peer_connection_handle pc);
    │ │ │ -   bool packet_finished () const;
    │ │ │ -   bool support_extensions () const;
    │ │ │ -   bool supports_encryption () const;
    │ │ │ -   void switch_send_crypto (std::shared_ptr<crypto_plugin> crypto);
    │ │ │ -   void switch_recv_crypto (std::shared_ptr<crypto_plugin> crypto);
    │ │ │ -   std::shared_ptr<bt_peer_connection> native_handle () const;
    │ │ │ -};
    │ │ │ -
    │ │ │ [report issue]
    │ │ │ +
    │ │ │
    │ │ │

    create_ut_pex_plugin()

    │ │ │

    Declared in "libtorrent/extensions/ut_pex.hpp"

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

    constructor function for the ut_pex extension. The ut_pex │ │ │ ├── html2text {} │ │ │ │ @@ -2,57 +2,57 @@ │ │ │ │ _[_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_ _w_o_r_d_ _o_f_ _c_a_u_t_i_o_n │ │ │ │ * _p_l_u_g_i_n_-_i_n_t_e_r_f_a_c_e │ │ │ │ * _c_u_s_t_o_m_ _a_l_e_r_t_s │ │ │ │ + * _p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e │ │ │ │ + * _b_t___p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e │ │ │ │ * _p_l_u_g_i_n │ │ │ │ o _i_m_p_l_e_m_e_n_t_e_d___f_e_a_t_u_r_e_s_(_) │ │ │ │ o _n_e_w___t_o_r_r_e_n_t_(_) │ │ │ │ o _a_d_d_e_d_(_) │ │ │ │ o _a_b_o_r_t_(_) │ │ │ │ o _o_n___d_h_t___r_e_q_u_e_s_t_(_) │ │ │ │ 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___p_a_u_s_e_(_)_ _o_n___r_e_s_u_m_e_(_) │ │ │ │ + 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___u_n_c_h_o_k_e_(_)_ _o_n___h_a_v_e___n_o_n_e_(_)_ _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___d_o_n_t___h_a_v_e_(_)_ _o_n___h_a_v_e___a_l_l_(_)_ _o_n___b_i_t_f_i_e_l_d_(_)_ _o_n___h_a_v_e_(_) │ │ │ │ - _o_n___a_l_l_o_w_e_d___f_a_s_t_(_)_ _o_n___c_h_o_k_e_(_)_ _o_n___i_n_t_e_r_e_s_t_e_d_(_) │ │ │ │ + o _o_n___u_n_c_h_o_k_e_(_)_ _o_n___h_a_v_e___n_o_n_e_(_)_ _o_n___h_a_v_e___a_l_l_(_)_ _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___d_o_n_t___h_a_v_e_(_)_ _o_n___i_n_t_e_r_e_s_t_e_d_(_)_ _o_n___c_h_o_k_e_(_) │ │ │ │ + _o_n___b_i_t_f_i_e_l_d_(_)_ _o_n___h_a_v_e_(_)_ _o_n___r_e_q_u_e_s_t_(_) │ │ │ │ o _o_n___p_i_e_c_e_(_) │ │ │ │ - o _s_e_n_t___u_n_c_h_o_k_e_(_)_ _s_e_n_t___h_a_v_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___i_n_t_e_r_e_s_t_e_d_(_) │ │ │ │ + o _s_e_n_t___i_n_t_e_r_e_s_t_e_d_(_)_ _s_e_n_t___h_a_v_e_(_)_ _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_(_) │ │ │ │ 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_(_) │ │ │ │ - * _p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e │ │ │ │ - * _b_t___p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e │ │ │ │ * _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. │ │ │ │ @@ -131,14 +131,79 @@ │ │ │ │ The static category is required for checking whether or not the category for a │ │ │ │ specific _a_l_e_r_t is enabled or not, without instantiating the _a_l_e_r_t. The category │ │ │ │ virtual function is the run-time equivalence. │ │ │ │ The what() virtual function may simply be a string literal of the class name of │ │ │ │ your _a_l_e_r_t. │ │ │ │ For more information, see the _a_l_e_r_t_ _s_e_c_t_i_o_n. │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ +************ 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 _p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e class provides a handle to the internal peer │ │ │ │ +connection object, to be used by plugins. This is a low level interface that │ │ │ │ +may not be stable across libtorrent versions │ │ │ │ +struct peer_connection_handle │ │ │ │ +{ │ │ │ │ + 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; │ │ │ │ + bool iiss__iinntteerreessttiinngg () const; │ │ │ │ + bool hhaass__ppeeeerr__cchhookkeedd () const; │ │ │ │ + bool iiss__ppeeeerr__iinntteerreesstteedd () const; │ │ │ │ + void mmaayybbee__uunncchhookkee__tthhiiss__ppeeeerr (); │ │ │ │ + void cchhookkee__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__oouuttggooiinngg () const; │ │ │ │ + bool iiss__ddiissccoonnnneeccttiinngg () const; │ │ │ │ + void ddiissccoonnnneecctt (error_code const& ec, operation_t op │ │ │ │ + , disconnect_severity_t = peer_connection_interface::normal); │ │ │ │ + bool iiss__ccoonnnneeccttiinngg () 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 ccaann__ddiissccoonnnneecctt (error_code const& ec) const; │ │ │ │ + bool hhaass__mmeettaaddaattaa () const; │ │ │ │ + bool iinn__hhaannddsshhaakkee () const; │ │ │ │ + void sseenndd__bbuuffffeerr (char const* begin, int size); │ │ │ │ + std::time_t llaasstt__sseeeenn__ccoommpplleettee () const; │ │ │ │ + time_point ttiimmee__ooff__llaasstt__uunncchhookkee () 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 │ │ │ │ +connection object to plugins. It's low level and may not be a stable API across │ │ │ │ +libtorrent versions. │ │ │ │ +struct bt_peer_connection_handle : peer_connection_handle │ │ │ │ +{ │ │ │ │ + explicit bbtt__ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee (peer_connection_handle pc); │ │ │ │ + bool ssuuppppoorrtt__eexxtteennssiioonnss () const; │ │ │ │ + bool ppaacckkeett__ffiinniisshheedd () const; │ │ │ │ + bool ssuuppppoorrttss__eennccrryyppttiioonn () const; │ │ │ │ + void sswwiittcchh__rreeccvv__ccrryyppttoo (std::shared_ptr crypto); │ │ │ │ + void sswwiittcchh__sseenndd__ccrryyppttoo (std::shared_ptr crypto); │ │ │ │ + std::shared_ptr nnaattiivvee__hhaannddllee () const; │ │ │ │ +}; │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ ************ 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" │ │ │ │ this is the base class for a _s_e_s_s_i_o_n _p_l_u_g_i_n. One primary feature is that it is │ │ │ │ notified of all torrents that are added to the _s_e_s_s_i_o_n, and can add its own │ │ │ │ torrent_plugins. │ │ │ │ struct plugin │ │ │ │ { │ │ │ │ @@ -285,28 +350,28 @@ │ │ │ │ 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(()) ********** │ │ │ │ +********** oonn__ppiieeccee__ffaaiilleedd(()) oonn__ppiieeccee__ppaassss(()) ********** │ │ │ │ virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ virtual void oonn__ppiieeccee__ppaassss (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__ppaauussee(()) oonn__rreessuummee(()) ********** │ │ │ │ +********** oonn__rreessuummee(()) oonn__ppaauussee(()) ********** │ │ │ │ virtual bool oonn__rreessuummee (); │ │ │ │ virtual bool oonn__ppaauussee (); │ │ │ │ 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 │ │ │ │ @@ -354,43 +419,43 @@ │ │ │ │ { │ │ │ │ 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__hhaavvee__nnoonnee (); │ │ │ │ + virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//); │ │ │ │ + virtual bool oonn__uunncchhookkee (); │ │ │ │ virtual bool oonn__hhaavvee (piece_index_t); │ │ │ │ - virtual bool oonn__rreeqquueesstt (peer_request const&); │ │ │ │ + virtual bool oonn__ddoonntt__hhaavvee (piece_index_t); │ │ │ │ + virtual bool oonn__hhaavvee__aallll (); │ │ │ │ virtual bool oonn__nnoott__iinntteerreesstteedd (); │ │ │ │ virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t); │ │ │ │ - virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//); │ │ │ │ - virtual bool oonn__iinntteerreesstteedd (); │ │ │ │ + virtual bool oonn__rreeqquueesstt (peer_request const&); │ │ │ │ + virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ virtual bool oonn__cchhookkee (); │ │ │ │ - virtual bool oonn__uunncchhookkee (); │ │ │ │ - virtual bool oonn__hhaavvee__aallll (); │ │ │ │ - virtual bool oonn__ddoonntt__hhaavvee (piece_index_t); │ │ │ │ + virtual bool oonn__iinntteerreesstteedd (); │ │ │ │ virtual bool oonn__ppiieeccee (peer_request const& //**ppiieeccee**// │ │ │ │ , span //**bbuuff**//); │ │ │ │ + virtual bool oonn__ccaanncceell (peer_request const&); │ │ │ │ virtual bool oonn__rreejjeecctt (peer_request const&); │ │ │ │ virtual bool oonn__ssuuggggeesstt (piece_index_t); │ │ │ │ - virtual bool oonn__ccaanncceell (peer_request const&); │ │ │ │ - virtual void sseenntt__aallllooww__ffaasstt (piece_index_t); │ │ │ │ - virtual void sseenntt__cchhookkee (); │ │ │ │ - virtual void sseenntt__hhaavvee__aallll (); │ │ │ │ virtual void sseenntt__ssuuggggeesstt (piece_index_t); │ │ │ │ - virtual void sseenntt__rreeqquueesstt (peer_request const&); │ │ │ │ + virtual void sseenntt__ccaanncceell (peer_request const&); │ │ │ │ virtual void sseenntt__hhaavvee__nnoonnee (); │ │ │ │ + virtual void sseenntt__hhaavvee__aallll (); │ │ │ │ + virtual void sseenntt__cchhookkee (); │ │ │ │ + virtual void sseenntt__aallllooww__ffaasstt (piece_index_t); │ │ │ │ virtual void sseenntt__rreejjeecctt__rreeqquueesstt (peer_request const&); │ │ │ │ - virtual void sseenntt__ccaanncceell (peer_request const&); │ │ │ │ - virtual void sseenntt__hhaavvee (piece_index_t); │ │ │ │ - virtual void sseenntt__iinntteerreesstteedd (); │ │ │ │ + virtual void sseenntt__rreeqquueesstt (peer_request const&); │ │ │ │ virtual void sseenntt__ppiieeccee (peer_request const&); │ │ │ │ - virtual void sseenntt__nnoott__iinntteerreesstteedd (); │ │ │ │ virtual void sseenntt__uunncchhookkee (); │ │ │ │ + virtual void sseenntt__nnoott__iinntteerreesstteedd (); │ │ │ │ + virtual void sseenntt__iinntteerreesstteedd (); │ │ │ │ + virtual void sseenntt__hhaavvee (piece_index_t); │ │ │ │ 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); │ │ │ │ @@ -426,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__uunncchhookkee(()) oonn__hhaavvee__nnoonnee(()) oonn__nnoott__iinntteerreesstteedd(()) oonn__rreeqquueesstt(()) oonn__ddoonntt__hhaavvee │ │ │ │ -(()) oonn__hhaavvee__aallll(()) oonn__bbiittffiieelldd(()) oonn__hhaavvee(()) oonn__aalllloowweedd__ffaasstt(()) oonn__cchhookkee(()) │ │ │ │ -oonn__iinntteerreesstteedd(()) ********** │ │ │ │ -virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ +********** oonn__uunncchhookkee(()) oonn__hhaavvee__nnoonnee(()) oonn__hhaavvee__aallll(()) oonn__aalllloowweedd__ffaasstt(()) │ │ │ │ +oonn__nnoott__iinntteerreesstteedd(()) oonn__ddoonntt__hhaavvee(()) oonn__iinntteerreesstteedd(()) oonn__cchhookkee(()) oonn__bbiittffiieelldd(()) │ │ │ │ +oonn__hhaavvee(()) oonn__rreeqquueesstt(()) ********** │ │ │ │ +virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//); │ │ │ │ +virtual bool oonn__uunncchhookkee (); │ │ │ │ virtual bool oonn__hhaavvee (piece_index_t); │ │ │ │ -virtual bool oonn__rreeqquueesstt (peer_request const&); │ │ │ │ +virtual bool oonn__ddoonntt__hhaavvee (piece_index_t); │ │ │ │ +virtual bool oonn__hhaavvee__aallll (); │ │ │ │ virtual bool oonn__nnoott__iinntteerreesstteedd (); │ │ │ │ virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t); │ │ │ │ -virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//); │ │ │ │ -virtual bool oonn__iinntteerreesstteedd (); │ │ │ │ +virtual bool oonn__rreeqquueesstt (peer_request const&); │ │ │ │ +virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ virtual bool oonn__cchhookkee (); │ │ │ │ -virtual bool oonn__uunncchhookkee (); │ │ │ │ -virtual bool oonn__hhaavvee__aallll (); │ │ │ │ -virtual bool oonn__ddoonntt__hhaavvee (piece_index_t); │ │ │ │ +virtual bool oonn__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__uunncchhookkee(()) sseenntt__hhaavvee(()) sseenntt__nnoott__iinntteerreesstteedd(()) sseenntt__ppiieeccee(()) │ │ │ │ -sseenntt__iinntteerreesstteedd(()) ********** │ │ │ │ -virtual void sseenntt__hhaavvee (piece_index_t); │ │ │ │ -virtual void sseenntt__iinntteerreesstteedd (); │ │ │ │ +********** sseenntt__iinntteerreesstteedd(()) sseenntt__hhaavvee(()) sseenntt__uunncchhookkee(()) sseenntt__nnoott__iinntteerreesstteedd(()) │ │ │ │ +sseenntt__ppiieeccee(()) ********** │ │ │ │ virtual void sseenntt__ppiieeccee (peer_request const&); │ │ │ │ -virtual void sseenntt__nnoott__iinntteerreesstteedd (); │ │ │ │ virtual void sseenntt__uunncchhookkee (); │ │ │ │ +virtual void sseenntt__nnoott__iinntteerreesstteedd (); │ │ │ │ +virtual void sseenntt__iinntteerreesstteedd (); │ │ │ │ +virtual void sseenntt__hhaavvee (piece_index_t); │ │ │ │ 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] │ │ │ │ @@ -490,15 +555,15 @@ │ │ │ │ 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(()) ********** │ │ │ │ +********** oonn__ppiieeccee__ffaaiilleedd(()) oonn__ppiieeccee__ppaassss(()) ********** │ │ │ │ virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ virtual void oonn__ppiieeccee__ppaassss (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 (); │ │ │ │ @@ -510,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__iinnccoommiinngg__kkeeyy (span key) = 0; │ │ │ │ virtual void sseett__oouuttggooiinngg__kkeeyy (span key) = 0; │ │ │ │ + virtual void sseett__iinnccoommiinngg__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**//) = │ │ │ │ @@ -529,79 +594,14 @@ │ │ │ │ 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] │ │ │ │ -************ 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 _p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e class provides a handle to the internal peer │ │ │ │ -connection object, to be used by plugins. This is a low level interface that │ │ │ │ -may not be stable across libtorrent versions │ │ │ │ -struct peer_connection_handle │ │ │ │ -{ │ │ │ │ - explicit ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee (std::weak_ptr impl); │ │ │ │ - connection_type ttyyppee () const; │ │ │ │ - peer_plugin const* ffiinndd__pplluuggiinn (string_view type) const; │ │ │ │ - void aadddd__eexxtteennssiioonn (std::shared_ptr); │ │ │ │ - bool iiss__sseeeedd () const; │ │ │ │ - bool uuppllooaadd__oonnllyy () const; │ │ │ │ - peer_id const& ppiidd () const; │ │ │ │ - bool hhaass__ppiieeccee (piece_index_t i) const; │ │ │ │ - bool iiss__iinntteerreessttiinngg () 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 const& rreemmoottee () 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__oouuttggooiinngg () const; │ │ │ │ - bool iiss__ccoonnnneeccttiinngg () const; │ │ │ │ - bool iiss__ddiissccoonnnneeccttiinngg () 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 ccaann__ddiissccoonnnneecctt (error_code const& ec) const; │ │ │ │ - bool hhaass__mmeettaaddaattaa () const; │ │ │ │ - bool iinn__hhaannddsshhaakkee () const; │ │ │ │ - void sseenndd__bbuuffffeerr (char const* begin, int size); │ │ │ │ - std::time_t llaasstt__sseeeenn__ccoommpplleettee () const; │ │ │ │ - time_point ttiimmee__ooff__llaasstt__uunncchhookkee () 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 │ │ │ │ -connection object to plugins. It's low level and may not be a stable API across │ │ │ │ -libtorrent versions. │ │ │ │ -struct bt_peer_connection_handle : peer_connection_handle │ │ │ │ -{ │ │ │ │ - explicit bbtt__ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee (peer_connection_handle pc); │ │ │ │ - bool ppaacckkeett__ffiinniisshheedd () const; │ │ │ │ - bool ssuuppppoorrtt__eexxtteennssiioonnss () const; │ │ │ │ - bool ssuuppppoorrttss__eennccrryyppttiioonn () const; │ │ │ │ - void sswwiittcchh__sseenndd__ccrryyppttoo (std::shared_ptr crypto); │ │ │ │ - void sswwiittcchh__rreeccvv__ccrryyppttoo (std::shared_ptr crypto); │ │ │ │ - std::shared_ptr nnaattiivvee__hhaannddllee () const; │ │ │ │ -}; │ │ │ │ -[_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 │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Resume_Data.html │ │ │ @@ -29,31 +29,31 @@ │ │ │ │ │ │ │ │ │

    home

    │ │ │
    │ │ │

    Table of contents

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

    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 │ │ │ @@ -61,35 +61,35 @@ │ │ │

    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_buf() write_resume_data()

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

    write_resume_data() write_resume_data_buf()

    │ │ │

    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);
    │ │ │ +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()

    │ │ │ + │ │ │ +[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);
    │ │ │ +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
    • │ │ │ ├── html2text {} │ │ │ │ @@ -1,27 +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 │ │ │ │ * _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___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_(_)_ _w_r_i_t_e___t_o_r_r_e_n_t___f_i_l_e___b_u_f_(_) │ │ │ │ + * _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___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_l_a_g_s___t │ │ │ │ [_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 (span buffer │ │ │ │ , error_code& ec, 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 │ │ │ │ - , load_torrent_limits const& cfg = {}); │ │ │ │ +add_torrent_params rreeaadd__rreessuummee__ddaattaa (bdecode_node const& rd │ │ │ │ + , error_code& ec, int piece_limit = 0x200000); │ │ │ │ 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. │ │ │ │ @@ -29,28 +29,28 @@ │ │ │ │ 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__bbuuff(()) wwrriittee__rreessuummee__ddaattaa(()) ************ │ │ │ │ +************ 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" │ │ │ │ -std::vector wwrriittee__rreessuummee__ddaattaa__bbuuff (add_torrent_params const& atp); │ │ │ │ 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(()) ************ │ │ │ │ +************ 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); │ │ │ │ +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 │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Session.html │ │ │ @@ -34,15 +34,15 @@ │ │ │ │ │ │
    │ │ │ [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);
    │ │ │ -   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);
    │ │ │ +   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 ();
    │ │ │  session_params (settings_pack const& sp);
    │ │ │ -session_params (settings_pack&& 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);
    │ │ │ +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
    │ │ │
    │ │ │ @@ -178,33 +178,33 @@ │ │ │ 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 const&);
    │ │ │ +   session_proxy (session_proxy&&) noexcept;
    │ │ │     session_proxy& operator= (session_proxy&&) & noexcept;
    │ │ │     session_proxy& operator= (session_proxy const&) &;
    │ │ │ -   session_proxy (session_proxy&&) noexcept;
    │ │ │ -   ~session_proxy ();
    │ │ │     session_proxy ();
    │ │ │ +   ~session_proxy ();
    │ │ │ +   session_proxy (session_proxy const&);
    │ │ │  };
    │ │ │  
    │ │ │ - │ │ │ + │ │ │ │ │ │ -[report issue]
    │ │ │ -

    ~session_proxy() operator=() session_proxy()

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

    session_proxy() operator=() ~session_proxy()

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

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

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

    session

    │ │ │ @@ -218,35 +218,35 @@ │ │ │ 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
    │ │ │  {
    │ │ │ -   session (session_params const& params, session_flags_t flags);
    │ │ │ -   session (session_params&& params, session_flags_t flags);
    │ │ │ -   explicit session (session_params&& params);
    │ │ │     session ();
    │ │ │ +   session (session_params&& params, session_flags_t flags);
    │ │ │ +   session (session_params const& params, session_flags_t flags);
    │ │ │     explicit session (session_params const& params);
    │ │ │ +   explicit session (session_params&& params);
    │ │ │     session (session_params&& params, io_context& ios);
    │ │ │     session (session_params const& params, io_context& ios, session_flags_t);
    │ │ │ -   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_flags_t);
    │ │ │     ~session ();
    │ │ │     session_proxy abort ();
    │ │ │  };
    │ │ │  
    │ │ │ [report issue]
    │ │ │

    session()

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

    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 │ │ │ @@ -254,16 +254,16 @@ │ │ │ take a session_params object. It already contains the plugins to use.

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

    session()

    │ │ │
    │ │ │  session (session_params&& params, io_context& ios);
    │ │ │  session (session_params const& params, io_context& ios, session_flags_t);
    │ │ │ -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_flags_t);
    │ │ │  
    │ │ │

    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.

    │ │ │
    │ │ │ @@ -310,85 +310,85 @@ │ │ │ [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;
    │ │ │ +   void refresh_torrent_status (std::vector<torrent_status>* ret
    │ │ │ +      , status_flags_t flags = {}) const;
    │ │ │     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;
    │ │ │     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);
    │ │ │ +   void set_dht_state (dht::dht_state&& st);
    │ │ │     std::vector<torrent_handle> get_torrents () const;
    │ │ │     torrent_handle find_torrent (sha1_hash const& info_hash) const;
    │ │ │ -   torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
    │ │ │ +   torrent_handle add_torrent (add_torrent_params const& params, error_code& ec);
    │ │ │     void async_add_torrent (add_torrent_params const& params);
    │ │ │ -   void async_add_torrent (add_torrent_params&& params);
    │ │ │     torrent_handle add_torrent (add_torrent_params const& params);
    │ │ │ +   torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
    │ │ │ +   void async_add_torrent (add_torrent_params&& params);
    │ │ │     torrent_handle add_torrent (add_torrent_params&& params);
    │ │ │ -   torrent_handle add_torrent (add_torrent_params const& params, error_code& ec);
    │ │ │ -   void pause ();
    │ │ │     bool is_paused () const;
    │ │ │ +   void pause ();
    │ │ │     void resume ();
    │ │ │     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);
    │ │ │     void dht_put_item (std::array<char, 32> key
    │ │ │        , std::function<void(entry&, std::array<char, 64>&
    │ │ │        , std::int64_t&, std::string const&)> cb
    │ │ │        , std::string salt = std::string());
    │ │ │ -   void dht_get_peers (sha1_hash const& info_hash);
    │ │ │     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);
    │ │ │     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::shared_ptr<plugin> ext);
    │ │ │     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);
    │ │ │     void set_port_filter (port_filter const& f);
    │ │ │ -   unsigned short ssl_listen_port () const;
    │ │ │ -   bool is_listening () const;
    │ │ │     unsigned short listen_port () const;
    │ │ │ -   ip_filter get_peer_class_filter () const;
    │ │ │ +   bool is_listening () const;
    │ │ │ +   unsigned short ssl_listen_port () const;
    │ │ │     void set_peer_class_filter (ip_filter const& f);
    │ │ │ -   void set_peer_class_type_filter (peer_class_type_filter const& f);
    │ │ │ +   ip_filter get_peer_class_filter () const;
    │ │ │     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&);
    │ │ │ +   void apply_settings (settings_pack&&);
    │ │ │     alert* wait_for_alert (time_duration max_wait);
    │ │ │     void pop_alerts (std::vector<alert*>* alerts);
    │ │ │     void set_alert_notify (std::function<void()> const& fun);
    │ │ │ -   void delete_port_mapping (port_mapping_t handle);
    │ │ │     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;
    │ │ │     static constexpr save_state_flags_t save_extension_state  = 11_bit;
    │ │ │     static constexpr save_state_flags_t save_ip_filter  = 12_bit;
    │ │ │ @@ -425,19 +425,19 @@
    │ │ │  the flags parameter can be used to only save certain parts of the
    │ │ │  session state

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

    get_torrent_status() refresh_torrent_status()

    │ │ │
    │ │ │ +void refresh_torrent_status (std::vector<torrent_status>* ret
    │ │ │ +      , status_flags_t flags = {}) const;
    │ │ │  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;
    │ │ │  
    │ │ │
    │ │ │

    Note

    │ │ │

    these calls are potentially expensive and won't scale well with │ │ │ lots of torrents. If you're concerned about performance, consider │ │ │ using post_torrent_updates() instead.

    │ │ │
    │ │ │ @@ -501,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]
    │ │ │ -
    │ │ │ -

    find_torrent() get_torrents()

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

    get_torrents() find_torrent()

    │ │ │
    │ │ │  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]
    │ │ │ -
    │ │ │ -

    async_add_torrent() add_torrent()

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

    add_torrent() async_add_torrent()

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

    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 │ │ │ @@ -566,22 +566,22 @@ │ │ │ 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]
    │ │ │ -
    │ │ │ -

    pause() resume() is_paused()

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

    is_paused() resume() pause()

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

    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 │ │ │ @@ -695,16 +695,16 @@ │ │ │ the DHT works, it is natural to always do a lookup before storing and │ │ │ calling the callback in between is convenient.

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

    dht_get_peers() dht_announce()

    │ │ │
    │ │ │ -void dht_get_peers (sha1_hash const& info_hash);
    │ │ │  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.

    │ │ │

    dht_announce() will issue a DHT announce request to the DHT to the │ │ │ specified info-hash, advertising the specified port. If the port is │ │ │ left at its default, 0, the port will be implied by the DHT message's │ │ │ @@ -749,17 +749,17 @@ │ │ │ with the response (if any) and the userdata pointer passed in here. │ │ │ Since this alert is a response to an explicit call, it will always be │ │ │ posted, regardless of the alert mask.

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

    add_extension()

    │ │ │
    │ │ │ -void add_extension (std::shared_ptr<plugin> ext);
    │ │ │  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);
    │ │ │  
    │ │ │

    This function adds an extension to this session. The argument is a │ │ │ function object that is called with a torrent_handle and which should │ │ │ return a std::shared_ptr<torrent_plugin>. To write custom │ │ │ plugins, see libtorrent plugins. For the typical bittorrent client │ │ │ all of these extensions should be added. The main plugins implemented │ │ │ in libtorrent are:

    │ │ │ @@ -787,18 +787,18 @@ │ │ │ that sends bad data with very high accuracy. Should │ │ │ eliminate most problems on poisoned torrents. │ │ │ │ │ │
    │ │ │  #include <libtorrent/extensions/smart_ban.hpp>
    │ │ │  ses.add_extension(&lt::create_smart_ban_plugin);
    │ │ │  
    │ │ │ - │ │ │ -[report issue]
    │ │ │ -
    │ │ │ -

    set_ip_filter() get_ip_filter()

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

    get_ip_filter() set_ip_filter()

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

    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 │ │ │ @@ -818,31 +818,31 @@ │ │ │ anti-virus software by connecting to SMTP, FTP ports.

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

    is_listening() ssl_listen_port() listen_port()

    │ │ │
    │ │ │ -unsigned short ssl_listen_port () const;
    │ │ │ -bool is_listening () const;
    │ │ │  unsigned short listen_port () const;
    │ │ │ +bool is_listening () 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.

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

    set_peer_class_filter() get_peer_class_filter()

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

    get_peer_class_filter() set_peer_class_filter()

    │ │ │
    │ │ │ -ip_filter get_peer_class_filter () const;
    │ │ │  void set_peer_class_filter (ip_filter const& f);
    │ │ │ +ip_filter get_peer_class_filter () const;
    │ │ │  
    │ │ │

    Sets the peer class filter for this session. All new peer connections │ │ │ will take this into account and be added to the peer classes specified │ │ │ by this filter, based on the peer's IP address.

    │ │ │

    The ip-filter essentially maps an IP -> uint32. Each bit in that 32 │ │ │ bit integer represents a peer class. The least significant bit │ │ │ represents class 0, the next bit class 1 and so on.

    │ │ │ @@ -862,21 +862,21 @@ │ │ │ 32 bits in the IP range mapping. Only the set bits matter; no peer │ │ │ class will be removed from a peer as a result of this call, peer │ │ │ classes are only added.

    │ │ │

    The peer_class argument cannot be greater than 31. The bitmasks │ │ │ representing peer classes in the peer_class_filter are 32 bits.

    │ │ │

    The get_peer_class_filter() function returns the current filter.

    │ │ │

    For more information, see peer classes.

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

    get_peer_class_type_filter() set_peer_class_type_filter()

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

    set_peer_class_type_filter() get_peer_class_type_filter()

    │ │ │
    │ │ │ -void set_peer_class_type_filter (peer_class_type_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);
    │ │ │  
    │ │ │

    Sets and gets the peer class type filter. This is controls automatic │ │ │ peer class assignments to peers based on what kind of socket it is.

    │ │ │

    It does not only support assigning peer classes, it also supports │ │ │ removing peer classes based on socket type.

    │ │ │

    The order of these rules being applied are:

    │ │ │
      │ │ │ @@ -915,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]
    │ │ │ -
    │ │ │ -

    get_peer_class() set_peer_class()

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

    set_peer_class() get_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 │ │ │ @@ -975,16 +975,16 @@ │ │ │ shifting.

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

    apply_settings() get_settings()

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

    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]
    │ │ │ @@ -1043,21 +1043,21 @@ │ │ │ message to an HWND or some other main message pump. The actual │ │ │ retrieval of alerts should not be done in the callback. In fact, the │ │ │ callback should not block. It should not perform any expensive work. │ │ │ It really should just notify the main application thread.

    │ │ │

    The type of an alert is returned by the polymorphic function │ │ │ alert::type() but can also be queries from a concrete type via │ │ │ T::alert_type, as a static constant.

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

    delete_port_mapping() add_port_mapping()

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

    add_port_mapping() delete_port_mapping()

    │ │ │
    │ │ │ -void delete_port_mapping (port_mapping_t handle);
    │ │ │  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);
    │ │ │  
    │ │ │

    add_port_mapping adds one or more port forwards on UPnP and/or NAT-PMP, │ │ │ whichever is enabled. A mapping is created for each listen socket │ │ │ in the session. The return values are all handles referring to the │ │ │ port mappings that were just created. Pass them to delete_port_mapping() │ │ │ to remove them.

    │ │ │ [report issue]
    │ │ │ @@ -1123,30 +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]
    │ │ │ +[report issue]
    │ │ │
    │ │ │ -
    │ │ │ -

    write_session_params_buf() write_session_params() read_session_params()

    │ │ │ +
    │ │ │ +

    read_session_params() write_session_params() write_session_params_buf()

    │ │ │

    Declared in "libtorrent/session_params.hpp"

    │ │ │
    │ │ │ -session_params read_session_params (bdecode_node const& e
    │ │ │ +std::vector<char> write_session_params_buf (session_params const& sp
    │ │ │     , 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 (span<char const> buf
    │ │ │     , 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());
    │ │ │  
    │ │ │

    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 {} │ │ │ │ @@ -3,95 +3,95 @@ │ │ │ │ VVeerrssiioonn:: 2.0.11 │ │ │ │ _h_o_m_e │ │ │ │ Table of contents │ │ │ │ * _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___p_r_o_x_y │ │ │ │ - o _~_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___p_r_o_x_y_(_) │ │ │ │ + o _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___p_r_o_x_y_(_) │ │ │ │ * _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___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 _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 _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 _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 _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___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 _g_e_t___i_p___f_i_l_t_e_r_(_)_ _s_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_(_)_ _s_s_l___l_i_s_t_e_n___p_o_r_t_(_)_ _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 _g_e_t___p_e_e_r___c_l_a_s_s___f_i_l_t_e_r_(_)_ _s_e_t___p_e_e_r___c_l_a_s_s___f_i_l_t_e_r_(_) │ │ │ │ + o _s_e_t___p_e_e_r___c_l_a_s_s___t_y_p_e___f_i_l_t_e_r_(_)_ _g_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 _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 _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 _r_e_m_o_v_e___t_o_r_r_e_n_t_(_) │ │ │ │ o _a_p_p_l_y___s_e_t_t_i_n_g_s_(_)_ _g_e_t___s_e_t_t_i_n_g_s_(_) │ │ │ │ o _s_e_t___a_l_e_r_t___n_o_t_i_f_y_(_)_ _w_a_i_t___f_o_r___a_l_e_r_t_(_)_ _p_o_p___a_l_e_r_t_s_(_) │ │ │ │ - o _d_e_l_e_t_e___p_o_r_t___m_a_p_p_i_n_g_(_)_ _a_d_d___p_o_r_t___m_a_p_p_i_n_g_(_) │ │ │ │ + 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_(_) │ │ │ │ - * _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_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_(_) │ │ │ │ [_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); │ │ │ │ - sseessssiioonn__ppaarraammss (settings_pack&& sp │ │ │ │ - , std::vector> exts); │ │ │ │ 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 (); │ │ │ │ sseessssiioonn__ppaarraammss (settings_pack const& sp); │ │ │ │ -sseessssiioonn__ppaarraammss (settings_pack&& 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); │ │ │ │ +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 │ │ │ │ @@ -122,29 +122,29 @@ │ │ │ │ _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 const&); │ │ │ │ + sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept; │ │ │ │ session_proxy& ooppeerraattoorr== (session_proxy const&) &; │ │ │ │ - sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ - ~~sseessssiioonn__pprrooxxyy (); │ │ │ │ sseessssiioonn__pprrooxxyy (); │ │ │ │ + ~~sseessssiioonn__pprrooxxyy (); │ │ │ │ + sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ }; │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ -********** ~~sseessssiioonn__pprrooxxyy(()) ooppeerraattoorr==(()) sseessssiioonn__pprrooxxyy(()) ********** │ │ │ │ -sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ +********** sseessssiioonn__pprrooxxyy(()) ooppeerraattoorr==(()) ~~sseessssiioonn__pprrooxxyy(()) ********** │ │ │ │ +sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept; │ │ │ │ session_proxy& ooppeerraattoorr== (session_proxy const&) &; │ │ │ │ -sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ -~~sseessssiioonn__pprrooxxyy (); │ │ │ │ sseessssiioonn__pprrooxxyy (); │ │ │ │ +~~sseessssiioonn__pprrooxxyy (); │ │ │ │ +sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ 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 │ │ │ │ @@ -152,47 +152,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 │ │ │ │ { │ │ │ │ - sseessssiioonn (session_params const& params, session_flags_t flags); │ │ │ │ - sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ - explicit sseessssiioonn (session_params&& params); │ │ │ │ sseessssiioonn (); │ │ │ │ + sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ + sseessssiioonn (session_params const& params, session_flags_t flags); │ │ │ │ explicit sseessssiioonn (session_params const& params); │ │ │ │ + explicit sseessssiioonn (session_params&& params); │ │ │ │ sseessssiioonn (session_params&& params, io_context& ios); │ │ │ │ sseessssiioonn (session_params const& params, io_context& ios, session_flags_t); │ │ │ │ - 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, session_flags_t); │ │ │ │ ~~sseessssiioonn (); │ │ │ │ session_proxy aabboorrtt (); │ │ │ │ }; │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ ********** sseessssiioonn(()) ********** │ │ │ │ -sseessssiioonn (session_params const& params, session_flags_t flags); │ │ │ │ -sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ -explicit sseessssiioonn (session_params&& params); │ │ │ │ sseessssiioonn (); │ │ │ │ +sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ +sseessssiioonn (session_params const& params, session_flags_t flags); │ │ │ │ explicit sseessssiioonn (session_params const& params); │ │ │ │ +explicit sseessssiioonn (session_params&& params); │ │ │ │ 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); │ │ │ │ sseessssiioonn (session_params const& params, io_context& ios, session_flags_t); │ │ │ │ -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, session_flags_t); │ │ │ │ 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 │ │ │ │ @@ -232,82 +232,82 @@ │ │ │ │ operation on it will throw a system_error exception, with error code │ │ │ │ invalid_session_handle. │ │ │ │ struct session_handle │ │ │ │ { │ │ │ │ bool iiss__vvaalliidd () const; │ │ │ │ session_params sseessssiioonn__ssttaattee (save_state_flags_t flags = │ │ │ │ save_state_flags_t::all()) const; │ │ │ │ + void rreeffrreesshh__ttoorrrreenntt__ssttaattuuss (std::vector* ret │ │ │ │ + , status_flags_t flags = {}) const; │ │ │ │ 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; │ │ │ │ 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); │ │ │ │ + void sseett__ddhhtt__ssttaattee (dht::dht_state&& st); │ │ │ │ std::vector ggeett__ttoorrrreennttss () const; │ │ │ │ torrent_handle ffiinndd__ttoorrrreenntt (sha1_hash const& info_hash) const; │ │ │ │ - torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec); │ │ │ │ + torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& │ │ │ │ +ec); │ │ │ │ void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params); │ │ │ │ - void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params); │ │ │ │ + torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec); │ │ │ │ + void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ - torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& │ │ │ │ -ec); │ │ │ │ - void ppaauussee (); │ │ │ │ bool iiss__ppaauusseedd () const; │ │ │ │ + void ppaauussee (); │ │ │ │ void rreessuummee (); │ │ │ │ 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); │ │ │ │ void ddhhtt__ppuutt__iitteemm (std::array key │ │ │ │ , std::function& │ │ │ │ , std::int64_t&, std::string const&)> cb │ │ │ │ , std::string salt = std::string()); │ │ │ │ - void ddhhtt__ggeett__ppeeeerrss (sha1_hash const& info_hash); │ │ │ │ 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); │ │ │ │ void ddhhtt__lliivvee__nnooddeess (sha1_hash const& nid); │ │ │ │ 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::shared_ptr ext); │ │ │ │ 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); │ │ │ │ void sseett__ppoorrtt__ffiilltteerr (port_filter const& f); │ │ │ │ - unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ - bool iiss__lliisstteenniinngg () const; │ │ │ │ unsigned short lliisstteenn__ppoorrtt () const; │ │ │ │ - ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const; │ │ │ │ + bool iiss__lliisstteenniinngg () const; │ │ │ │ + unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ void sseett__ppeeeerr__ccllaassss__ffiilltteerr (ip_filter const& f); │ │ │ │ - void sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr (peer_class_type_filter const& f); │ │ │ │ + ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const; │ │ │ │ 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&); │ │ │ │ + void aappppllyy__sseettttiinnggss (settings_pack&&); │ │ │ │ alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait); │ │ │ │ void ppoopp__aalleerrttss (std::vector* alerts); │ │ │ │ void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun); │ │ │ │ - void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle); │ │ │ │ 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; │ │ │ │ │ │ │ │ static constexpr save_state_flags_t ssaavvee__sseettttiinnggss = 0_bit; │ │ │ │ static constexpr save_state_flags_t ssaavvee__ddhhtt__ssttaattee = 2_bit; │ │ │ │ static constexpr save_state_flags_t ssaavvee__eexxtteennssiioonn__ssttaattee = 11_bit; │ │ │ │ @@ -334,19 +334,19 @@ │ │ │ │ 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] │ │ │ │ ********** ggeett__ttoorrrreenntt__ssttaattuuss(()) rreeffrreesshh__ttoorrrreenntt__ssttaattuuss(()) ********** │ │ │ │ +void rreeffrreesshh__ttoorrrreenntt__ssttaattuuss (std::vector* ret │ │ │ │ + , status_flags_t flags = {}) const; │ │ │ │ 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 │ │ │ │ torrents. If you're concerned about performance, consider using │ │ │ │ post_torrent_updates() instead. │ │ │ │ get_torrent_status returns a vector of the _t_o_r_r_e_n_t___s_t_a_t_u_s for every torrent │ │ │ │ which satisfies pred, which is a predicate function which determines if a │ │ │ │ torrent should be included in the returned set or not. Returning true means it │ │ │ │ @@ -391,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] │ │ │ │ -********** ffiinndd__ttoorrrreenntt(()) ggeett__ttoorrrreennttss(()) ********** │ │ │ │ +********** ggeett__ttoorrrreennttss(()) ffiinndd__ttoorrrreenntt(()) ********** │ │ │ │ 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] │ │ │ │ -********** aassyynncc__aadddd__ttoorrrreenntt(()) aadddd__ttoorrrreenntt(()) ********** │ │ │ │ -torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec); │ │ │ │ +********** aadddd__ttoorrrreenntt(()) aassyynncc__aadddd__ttoorrrreenntt(()) ********** │ │ │ │ +torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& ec); │ │ │ │ void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params); │ │ │ │ -void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params); │ │ │ │ +torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec); │ │ │ │ +void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ -torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& ec); │ │ │ │ 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 │ │ │ │ @@ -442,17 +442,17 @@ │ │ │ │ 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] │ │ │ │ -********** ppaauussee(()) rreessuummee(()) iiss__ppaauusseedd(()) ********** │ │ │ │ -void ppaauussee (); │ │ │ │ +********** iiss__ppaauusseedd(()) rreessuummee(()) ppaauussee(()) ********** │ │ │ │ bool iiss__ppaauusseedd () const; │ │ │ │ +void ppaauussee (); │ │ │ │ void rreessuummee (); │ │ │ │ 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] │ │ │ │ @@ -530,17 +530,17 @@ │ │ │ │ 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__ggeett__ppeeeerrss(()) ddhhtt__aannnnoouunnccee(()) ********** │ │ │ │ -void ddhhtt__ggeett__ppeeeerrss (sha1_hash const& info_hash); │ │ │ │ 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 │ │ │ │ info-hash, advertising the specified port. If the port is left at its default, │ │ │ │ 0, the port will be implied by the DHT message's source port (which may improve │ │ │ │ connectivity through a NAT). dht_announce() is not affected by the │ │ │ │ @@ -572,17 +572,17 @@ │ │ │ │ Send an arbitrary DHT request directly to the specified endpoint. This function │ │ │ │ is intended for use by plugins. When a response is received or the request │ │ │ │ times out, a _d_h_t___d_i_r_e_c_t___r_e_s_p_o_n_s_e___a_l_e_r_t will be posted with the response (if │ │ │ │ any) and the userdata pointer passed in here. Since this _a_l_e_r_t is a response to │ │ │ │ an explicit call, it will always be posted, regardless of the _a_l_e_r_t mask. │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ ********** aadddd__eexxtteennssiioonn(()) ********** │ │ │ │ -void aadddd__eexxtteennssiioonn (std::shared_ptr ext); │ │ │ │ void aadddd__eexxtteennssiioonn (std::function( │ │ │ │ torrent_handle const&, client_data_t)> ext); │ │ │ │ +void aadddd__eexxtteennssiioonn (std::shared_ptr ext); │ │ │ │ This function adds an extension to this _s_e_s_s_i_o_n. The argument is a function │ │ │ │ object that is called with a torrent_handle and which should return a std:: │ │ │ │ shared_ptr. To write custom plugins, see _l_i_b_t_o_r_r_e_n_t_ _p_l_u_g_i_n_s. │ │ │ │ For the typical bittorrent client all of these extensions should be added. The │ │ │ │ main plugins implemented in libtorrent are: │ │ │ │ uTorrent metadata │ │ │ │ Allows peers to download the metadata (.torrent files) from the swarm │ │ │ │ @@ -597,15 +597,15 @@ │ │ │ │ smart ban _p_l_u_g_i_n │ │ │ │ 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(()) ********** │ │ │ │ +********** ggeett__iipp__ffiilltteerr(()) sseett__iipp__ffiilltteerr(()) ********** │ │ │ │ ip_filter ggeett__iipp__ffiilltteerr () const; │ │ │ │ void sseett__iipp__ffiilltteerr (ip_filter f); │ │ │ │ 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 │ │ │ │ @@ -616,26 +616,26 @@ │ │ │ │ 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(()) ssssll__lliisstteenn__ppoorrtt(()) lliisstteenn__ppoorrtt(()) ********** │ │ │ │ -unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ -bool iiss__lliisstteenniinngg () const; │ │ │ │ unsigned short lliisstteenn__ppoorrtt () const; │ │ │ │ +bool iiss__lliisstteenniinngg () 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(()) ********** │ │ │ │ -ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const; │ │ │ │ +********** ggeett__ppeeeerr__ccllaassss__ffiilltteerr(()) sseett__ppeeeerr__ccllaassss__ffiilltteerr(()) ********** │ │ │ │ void sseett__ppeeeerr__ccllaassss__ffiilltteerr (ip_filter const& f); │ │ │ │ +ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const; │ │ │ │ Sets the peer class filter for this _s_e_s_s_i_o_n. All new peer connections will take │ │ │ │ this into account and be added to the peer classes specified by this filter, │ │ │ │ based on the peer's IP address. │ │ │ │ The ip-filter essentially maps an IP -> uint32. Each bit in that 32 bit integer │ │ │ │ represents a peer class. The least significant bit represents class 0, the next │ │ │ │ bit class 1 and so on. │ │ │ │ For more info, see _i_p___f_i_l_t_e_r. │ │ │ │ @@ -652,17 +652,17 @@ │ │ │ │ in the IP range mapping. Only the set bits matter; no peer class will be │ │ │ │ removed from a peer as a result of this call, peer classes are only added. │ │ │ │ The peer_class argument cannot be greater than 31. The bitmasks representing │ │ │ │ peer classes in the peer_class_filter are 32 bits. │ │ │ │ The get_peer_class_filter() function returns the current filter. │ │ │ │ For more information, see _p_e_e_r_ _c_l_a_s_s_e_s. │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ -********** ggeett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) ********** │ │ │ │ -void sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr (peer_class_type_filter const& f); │ │ │ │ +********** sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) ggeett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) ********** │ │ │ │ peer_class_type_filter ggeett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr () const; │ │ │ │ +void sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr (peer_class_type_filter const& f); │ │ │ │ Sets and gets the ppeeeerr ccllaassss ttyyppee ffiilltteerr. This is controls automatic peer class │ │ │ │ assignments to peers based on what kind of socket it is. │ │ │ │ It does not only support assigning peer classes, it also supports removing peer │ │ │ │ classes based on socket type. │ │ │ │ The order of these rules being applied are: │ │ │ │ 1. peer-class IP filter │ │ │ │ 2. peer-class type filter, removing classes │ │ │ │ @@ -690,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] │ │ │ │ -********** ggeett__ppeeeerr__ccllaassss(()) sseett__ppeeeerr__ccllaassss(()) ********** │ │ │ │ -void sseett__ppeeeerr__ccllaassss (peer_class_t cid, peer_class_info const& pci); │ │ │ │ +********** sseett__ppeeeerr__ccllaassss(()) ggeett__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 │ │ │ │ @@ -732,16 +732,16 @@ │ │ │ │ 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] │ │ │ │ ********** aappppllyy__sseettttiinnggss(()) ggeett__sseettttiinnggss(()) ********** │ │ │ │ settings_pack ggeett__sseettttiinnggss () const; │ │ │ │ -void aappppllyy__sseettttiinnggss (settings_pack&&); │ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack const&); │ │ │ │ +void aappppllyy__sseettttiinnggss (settings_pack&&); │ │ │ │ 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] │ │ │ │ ********** sseett__aalleerrtt__nnoottiiffyy(()) wwaaiitt__ffoorr__aalleerrtt(()) ppoopp__aalleerrttss(()) ********** │ │ │ │ alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait); │ │ │ │ void ppoopp__aalleerrttss (std::vector* alerts); │ │ │ │ @@ -788,18 +788,18 @@ │ │ │ │ alerts should not be done in the callback. In fact, the callback should not │ │ │ │ block. It should not perform any expensive work. It really should just notify │ │ │ │ the main application thread. │ │ │ │ The type of an _a_l_e_r_t is returned by the polymorphic function alert::type() but │ │ │ │ can also be queries from a concrete type via T::alert_type, as a static │ │ │ │ constant. │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ -********** ddeelleettee__ppoorrtt__mmaappppiinngg(()) aadddd__ppoorrtt__mmaappppiinngg(()) ********** │ │ │ │ -void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle); │ │ │ │ +********** aadddd__ppoorrtt__mmaappppiinngg(()) ddeelleettee__ppoorrtt__mmaappppiinngg(()) ********** │ │ │ │ std::vector aadddd__ppoorrtt__mmaappppiinngg (portmap_protocol t, int │ │ │ │ external_port, int local_port); │ │ │ │ +void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle); │ │ │ │ add_port_mapping adds one or more port forwards on UPnP and/or NAT-PMP, │ │ │ │ whichever is enabled. A mapping is created for each listen socket in the │ │ │ │ _s_e_s_s_i_o_n. The return values are all handles referring to the port mappings that │ │ │ │ were just created. Pass them to _d_e_l_e_t_e___p_o_r_t___m_a_p_p_i_n_g_(_) to remove them. │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ ********** rreeooppeenn__nneettwwoorrkk__ssoocckkeettss(()) ********** │ │ │ │ void rreeooppeenn__nneettwwoorrkk__ssoocckkeettss (reopen_network_flags_t options = │ │ │ │ @@ -845,25 +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] │ │ │ │ -************ wwrriittee__sseessssiioonn__ppaarraammss__bbuuff(()) wwrriittee__sseessssiioonn__ppaarraammss(()) rreeaadd__sseessssiioonn__ppaarraammss(()) │ │ │ │ +************ rreeaadd__sseessssiioonn__ppaarraammss(()) wwrriittee__sseessssiioonn__ppaarraammss(()) wwrriittee__sseessssiioonn__ppaarraammss__bbuuff(()) │ │ │ │ ************ │ │ │ │ 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 (bdecode_node const& e │ │ │ │ +std::vector wwrriittee__sseessssiioonn__ppaarraammss__bbuuff (session_params const& sp │ │ │ │ , 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 (span buf │ │ │ │ , 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()); │ │ │ │ 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,31 +33,31 @@ │ │ │

    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 │ │ │ to the session when passed to session::apply_settings(). It's empty when │ │ │ @@ -4599,23 +4599,23 @@ │ │ │

    │ │ │  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_int (int name, int val) override;
    │ │ │     void set_bool (int name, bool val) override;
    │ │ │     void set_int (int name, flags::bitfield_flag<Type, Tag> const val);
    │ │ │ -   void set_int (int name, int val) override;
    │ │ │     bool has_val (int name) const override;
    │ │ │     void clear ();
    │ │ │     void clear (int name);
    │ │ │ -   std::string const& get_str (int name) const override;
    │ │ │     int get_int (int name) const override;
    │ │ │     bool get_bool (int name) const override;
    │ │ │ +   std::string const& get_str (int name) const override;
    │ │ │     void for_each (Fun&& f) const;
    │ │ │  
    │ │ │     enum type_bases
    │ │ │     {
    │ │ │        string_type_base,
    │ │ │        int_type_base,
    │ │ │        bool_type_base,
    │ │ │ @@ -4691,17 +4691,17 @@
    │ │ │  
    │ │ │ │ │ │ │ │ │ [report issue]
    │ │ │

    set_bool() set_str() set_int()

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

    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]
    │ │ │
    │ │ │

    has_val()

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

    clear()

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

    clear a specific setting from the pack

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

    get_bool() get_int() get_str()

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

    get_str() get_bool() get_int()

    │ │ │
    │ │ │ -std::string const& get_str (int name) const override;
    │ │ │  int get_int (int name) const override;
    │ │ │  bool get_bool (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 │ │ │ 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.

    │ │ │ [report issue]
    │ │ │ @@ -5096,16 +5096,64 @@ │ │ │ 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] │ │ │ │ │ │ +
    │ │ │ +

    name_for_setting() setting_by_name()

    │ │ │ +

    Declared in "libtorrent/settings_pack.hpp"

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

    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]
    │ │ │ +
    │ │ │ +

    min_memory_usage() high_performance_seed()

    │ │ │ +

    Declared in "libtorrent/session.hpp"

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

    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 │ │ │ +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 that each connection only has at most one block in │ │ │ +use at any one time. It lowers the outstanding blocks send to the disk │ │ │ +I/O thread so that connections only have one block waiting to be flushed │ │ │ +to disk at any given time. It lowers the max number of peers in the peer │ │ │ +list for torrents. It performs multiple smaller reads when it hashes │ │ │ +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]
    │ │ │
    │ │ │

    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);
    │ │ │  
    │ │ │ @@ -5154,62 +5202,14 @@ │ │ │ Tribler │ │ │ │ │ │ │ │ │ │ │ │

    There's an informal directory of client id's here.

    │ │ │

    The major, minor, revision and tag parameters are used to │ │ │ identify the version of your client.

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

    min_memory_usage() high_performance_seed()

    │ │ │ -

    Declared in "libtorrent/session.hpp"

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

    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 │ │ │ -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 that each connection only has at most one block in │ │ │ -use at any one time. It lowers the outstanding blocks send to the disk │ │ │ -I/O thread so that connections only have one block waiting to be flushed │ │ │ -to disk at any given time. It lowers the max number of peers in the peer │ │ │ -list for torrents. It performs multiple smaller reads when it hashes │ │ │ -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

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