--- /srv/reproducible-results/rbuild-debian/r-b-build.ocUVn6aI/b1/libtorrent-rasterbar_2.0.10-1.1_amd64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.ocUVn6aI/b2/libtorrent-rasterbar_2.0.10-1.1_amd64.changes ├── Files │ @@ -1,7 +1,7 @@ │ │ 14eae06655145f0a5e7dff15365d12c6 365488 libdevel optional libtorrent-rasterbar-dev_2.0.10-1.1_amd64.deb │ - 784dc905a6febe02efb4d7c5cd5784c5 1668220 doc optional libtorrent-rasterbar-doc_2.0.10-1.1_all.deb │ + b0825212ffce9e3f0716e1f4300d2fa0 1671752 doc optional libtorrent-rasterbar-doc_2.0.10-1.1_all.deb │ 29f21a462824d914ae6f18ab2cf5abaf 50673920 debug optional libtorrent-rasterbar2.0t64-dbgsym_2.0.10-1.1_amd64.deb │ 2945aa007071001ae6ba05757abeceee 1645756 libs optional libtorrent-rasterbar2.0t64_2.0.10-1.1_amd64.deb │ 5ce7613f1f28bc1e9227809f8064f9aa 13078076 debug optional python3-libtorrent-dbgsym_2.0.10-1.1_amd64.deb │ 76637171cec3b425ee9303f37877ae97 701232 python optional python3-libtorrent_2.0.10-1.1_amd64.deb ├── libtorrent-rasterbar-doc_2.0.10-1.1_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2024-02-28 20:35:15.000000 debian-binary │ │ -rw-r--r-- 0 0 0 3640 2024-02-28 20:35:15.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 1664388 2024-02-28 20:35:15.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 1667920 2024-02-28 20:35:15.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./control │ │ │ │ @@ -1,13 +1,13 @@ │ │ │ │ Package: libtorrent-rasterbar-doc │ │ │ │ Source: libtorrent-rasterbar │ │ │ │ Version: 2.0.10-1.1 │ │ │ │ Architecture: all │ │ │ │ Maintainer: Christian Marillat │ │ │ │ -Installed-Size: 5768 │ │ │ │ +Installed-Size: 5936 │ │ │ │ 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 │ │ │ │ @@ -73,43 +73,43 @@ │ │ │ │ -rw-r--r-- 0 root (0) root (0) 428298 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/img/troubleshooting.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 46279 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/img/troubleshooting_thumb.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 243 2024-02-19 12:14:14.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/img/utp_stack.diagram │ │ │ │ -rw-r--r-- 0 root (0) root (0) 2007 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/img/utp_stack.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 1156 2024-02-19 12:14:14.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/img/write_disk_buffers.diagram │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9631 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/img/write_disk_buffers.png │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9766 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/index.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 144610 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/manual-ref.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 144603 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/manual-ref.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9650 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/projects.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 22814 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/python_binding.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 33687 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Add_Torrent.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 256774 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Alerts.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 27437 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Bdecoding.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 25856 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Bencoding.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 88949 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Core.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 43739 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Create_Torrents.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 50884 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Custom_Storage.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 136977 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Custom_Storage.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 24960 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-DHT.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 48568 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Error_Codes.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 13261 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Filter.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 12804 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-PeerClass.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 68487 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Plugins.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9618 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Resume_Data.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 101856 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Session.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 101835 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Session.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 167853 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Settings.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9742 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Stats.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 56856 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Storage.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 129808 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Handle.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 55640 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Info.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 48266 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Status.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 16462 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Trackers.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 56848 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Storage.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 129801 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Handle.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 55629 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Info.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 48273 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Torrent_Status.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 16461 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Trackers.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 25530 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Utility.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 9129 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-ed25519.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 34353 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/reference.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 29242 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/security-audit.html │ │ │ │ --rw-r--r-- 0 root (0) root (0) 1272286 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/single-page-ref.html │ │ │ │ +-rw-r--r-- 0 root (0) root (0) 1358338 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/single-page-ref.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 10121 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/streaming.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 8807 2024-02-19 12:14:14.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/style.css │ │ │ │ -rw-r--r-- 0 root (0) root (0) 522811 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/todo.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 3021 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/troubleshooting.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 25162 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/tuning-ref.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 132630 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/tutorial-ref.html │ │ │ │ -rw-r--r-- 0 root (0) root (0) 16383 2024-02-28 20:35:15.000000 ./usr/share/doc/libtorrent-rasterbar-doc/html/udp_tracker_protocol.html │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/manual-ref.html │ │ │ │ @@ -115,15 +115,15 @@ │ │ │ │
  • main loop (see session)

    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
  • │ │ │ │
  • save resume data for all torrent_handles (optional, see │ │ │ │ save_resume_data())

    │ │ │ │
  • │ │ │ │
  • save session state (see session_state() and write_session_params())

    │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Add_Torrent.html │ │ │ │ @@ -28,65 +28,23 @@ │ │ │ │ 2.0.10 │ │ │ │ │ │ │ │ │ │ │ │

    home

    │ │ │ │
    │ │ │ │

    Table of contents

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

    client_data_t

    │ │ │ │ -

    Declared in "libtorrent/client_data.hpp"

    │ │ │ │ -

    A thin wrapper around a void pointer used as "user data". i.e. an opaque │ │ │ │ -cookie passed in to libtorrent and returned on demand. It adds type-safety by │ │ │ │ -requiring the same type be requested out of it as was assigned to it.

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

    client_data_t()

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

    construct a nullptr client data

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

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

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

    we don't allow type-unsafe operations

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

    add_torrent_params

    │ │ │ │

    Declared in "libtorrent/add_torrent_params.hpp"

    │ │ │ │

    The add_torrent_params contains all the information in a .torrent file │ │ │ │ along with all information necessary to add that torrent to a session. │ │ │ │ The key fields when adding a torrent are:

    │ │ │ │
      │ │ │ │
    • ti - the immutable info-dict part of the torrent
    • │ │ │ │ @@ -399,14 +357,56 @@ │ │ │ │ [report issue]
      │ │ │ │
      last_download last_upload
      │ │ │ │
      the posix time of the last time payload was received or sent for this │ │ │ │ torrent, respectively. A value of 0 means we don't know when we last │ │ │ │ uploaded or downloaded, or we have never uploaded or downloaded any │ │ │ │ payload for this torrent.
      │ │ │ │
      │ │ │ │ +[report issue]
    │ │ │ │ +
    │ │ │ │ +

    client_data_t

    │ │ │ │ +

    Declared in "libtorrent/client_data.hpp"

    │ │ │ │ +

    A thin wrapper around a void pointer used as "user data". i.e. an opaque │ │ │ │ +cookie passed in to libtorrent and returned on demand. It adds type-safety by │ │ │ │ +requiring the same type be requested out of it as was assigned to it.

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

    client_data_t()

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

    construct a nullptr client data

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

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

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

    we don't allow type-unsafe operations

    │ │ │ │ +
    │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │ │ │ │ │
    │ │ │ │
    │ │ │ │
  • │ │ │ │
  • torrent_plugin │ │ │ │
  • │ │ │ │
  • peer_plugin │ │ │ │
  • │ │ │ │
  • crypto_plugin │ │ │ │
  • │ │ │ │ -
  • create_smart_ban_plugin()
  • │ │ │ │ -
  • create_ut_pex_plugin()
  • │ │ │ │ +
  • create_ut_pex_plugin()
  • │ │ │ │ +
  • create_smart_ban_plugin()
  • │ │ │ │
  • create_ut_metadata_plugin()
  • │ │ │ │ │ │ │ │ │ │ │ │

    libtorrent has a plugin 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.

    │ │ │ │ @@ -198,42 +198,42 @@ │ │ │ │ void add_extension (std::shared_ptr<peer_plugin>); │ │ │ │ bool is_seed () const; │ │ │ │ bool upload_only () const; │ │ │ │ bool has_piece (piece_index_t i) const; │ │ │ │ peer_id const& pid () const; │ │ │ │ bool is_interesting () const; │ │ │ │ bool is_choked () const; │ │ │ │ - bool is_peer_interested () 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; │ │ │ │ + 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; │ │ │ │ - void disconnect (error_code const& ec, operation_t op │ │ │ │ - , disconnect_severity_t = peer_connection_interface::normal); │ │ │ │ bool ignore_unchoke_slots () const; │ │ │ │ bool on_local_network () 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 should_log (peer_log_alert::direction_t direction) const; │ │ │ │ bool can_disconnect (error_code const& ec) const; │ │ │ │ bool has_metadata () const; │ │ │ │ bool in_handshake () const; │ │ │ │ void send_buffer (char const* begin, int size); │ │ │ │ time_point time_of_last_unchoke () const; │ │ │ │ std::time_t last_seen_complete () 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; │ │ │ │ + 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"

    │ │ │ │ @@ -418,16 +418,16 @@ │ │ │ │
    │ │ │ │  struct torrent_plugin
    │ │ │ │  {
    │ │ │ │     virtual std::shared_ptr<peer_plugin> new_connection (peer_connection_handle const&);
    │ │ │ │     virtual void on_piece_pass (piece_index_t);
    │ │ │ │     virtual void on_piece_failed (piece_index_t);
    │ │ │ │     virtual void tick ();
    │ │ │ │ -   virtual bool on_pause ();
    │ │ │ │     virtual bool on_resume ();
    │ │ │ │ +   virtual bool on_pause ();
    │ │ │ │     virtual void on_files_checked ();
    │ │ │ │     virtual void on_state (torrent_status::state_t);
    │ │ │ │     virtual void on_add_peer (tcp::endpoint const&,
    │ │ │ │        peer_source_flags_t, add_peer_flags_t);
    │ │ │ │  
    │ │ │ │     static constexpr add_peer_flags_t first_time  = 1_bit;
    │ │ │ │     static constexpr add_peer_flags_t filtered  = 2_bit;
    │ │ │ │ @@ -466,21 +466,21 @@
    │ │ │ │  
    │ │ │ │

    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_resume() on_pause()

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

    on_pause() on_resume()

    │ │ │ │
    │ │ │ │ -virtual bool 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 │ │ │ │ will have this hook function called, and the standard handler will also not be │ │ │ │ invoked. So, returning true effectively overrides the standard behavior of │ │ │ │ pause or resume.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    called after a choke message has been sent to the peer

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

    sent_payload()

    │ │ │ │
    │ │ │ │  virtual void sent_payload (int /* bytes */);
    │ │ │ │ @@ -793,42 +793,42 @@
    │ │ │ │  (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]
    │ │ │ │ - │ │ │ │ -
    │ │ │ │ -

    create_smart_ban_plugin()

    │ │ │ │ -

    Declared in "libtorrent/extensions/smart_ban.hpp"

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

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

    │ │ │ │ [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 │ │ │ │ extension allows peers to gossip about their connections, allowing │ │ │ │ the swarm stay well connected and peers aware of more peers in the │ │ │ │ swarm. This extension is enabled by default unless explicitly disabled in │ │ │ │ the session constructor.

    │ │ │ │

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

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

    create_smart_ban_plugin()

    │ │ │ │ +

    Declared in "libtorrent/extensions/smart_ban.hpp"

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

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

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

    create_ut_metadata_plugin()

    │ │ │ │

    Declared in "libtorrent/extensions/ut_metadata.hpp"

    │ │ │ │
    │ │ │ │  std::shared_ptr<torrent_plugin> create_ut_metadata_plugin (torrent_handle const&, client_data_t);
    │ │ │ │  
    │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -19,42 +19,42 @@ │ │ │ │ │ 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 _t_i_c_k_(_) │ │ │ │ │ - o _o_n___r_e_s_u_m_e_(_)_ _o_n___p_a_u_s_e_(_) │ │ │ │ │ + o _o_n___p_a_u_s_e_(_)_ _o_n___r_e_s_u_m_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___r_e_q_u_e_s_t_(_)_ _o_n___h_a_v_e_(_)_ _o_n___i_n_t_e_r_e_s_t_e_d_(_)_ _o_n___n_o_t___i_n_t_e_r_e_s_t_e_d_(_) │ │ │ │ │ - _o_n___u_n_c_h_o_k_e_(_)_ _o_n___a_l_l_o_w_e_d___f_a_s_t_(_)_ _o_n___c_h_o_k_e_(_)_ _o_n___b_i_t_f_i_e_l_d_(_) │ │ │ │ │ - _o_n___d_o_n_t___h_a_v_e_(_)_ _o_n___h_a_v_e___a_l_l_(_)_ _o_n___h_a_v_e___n_o_n_e_(_) │ │ │ │ │ + o _o_n___n_o_t___i_n_t_e_r_e_s_t_e_d_(_)_ _o_n___h_a_v_e_(_)_ _o_n___c_h_o_k_e_(_)_ _o_n___i_n_t_e_r_e_s_t_e_d_(_) │ │ │ │ │ + _o_n___h_a_v_e___a_l_l_(_)_ _o_n___b_i_t_f_i_e_l_d_(_)_ _o_n___d_o_n_t___h_a_v_e_(_)_ _o_n___a_l_l_o_w_e_d___f_a_s_t_(_) │ │ │ │ │ + _o_n___r_e_q_u_e_s_t_(_)_ _o_n___h_a_v_e___n_o_n_e_(_)_ _o_n___u_n_c_h_o_k_e_(_) │ │ │ │ │ o _o_n___p_i_e_c_e_(_) │ │ │ │ │ - o _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___u_n_c_h_o_k_e_(_)_ _s_e_n_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___u_n_c_h_o_k_e_(_)_ _s_e_n_t___i_n_t_e_r_e_s_t_e_d_(_)_ _s_e_n_t___n_o_t___i_n_t_e_r_e_s_t_e_d_(_)_ _s_e_n_t___p_i_e_c_e_(_) │ │ │ │ │ + _s_e_n_t___h_a_v_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 _t_i_c_k_(_) │ │ │ │ │ o _w_r_i_t_e___r_e_q_u_e_s_t_(_) │ │ │ │ │ * _c_r_y_p_t_o___p_l_u_g_i_n │ │ │ │ │ o _d_e_c_r_y_p_t_(_) │ │ │ │ │ - * _c_r_e_a_t_e___s_m_a_r_t___b_a_n___p_l_u_g_i_n_(_) │ │ │ │ │ * _c_r_e_a_t_e___u_t___p_e_x___p_l_u_g_i_n_(_) │ │ │ │ │ + * _c_r_e_a_t_e___s_m_a_r_t___b_a_n___p_l_u_g_i_n_(_) │ │ │ │ │ * _c_r_e_a_t_e___u_t___m_e_t_a_d_a_t_a___p_l_u_g_i_n_(_) │ │ │ │ │ libtorrent has a _p_l_u_g_i_n interface for implementing extensions to the protocol. │ │ │ │ │ These can be general extensions for transferring metadata or peer exchange │ │ │ │ │ extensions, or it could be used to provide a way to customize the protocol to │ │ │ │ │ fit a particular (closed) network. │ │ │ │ │ In short, the _p_l_u_g_i_n interface makes it possible to: │ │ │ │ │ * register extension messages (sent in the extension handshake), see │ │ │ │ │ @@ -148,43 +148,43 @@ │ │ │ │ │ void aadddd__eexxtteennssiioonn (std::shared_ptr); │ │ │ │ │ bool iiss__sseeeedd () const; │ │ │ │ │ bool uuppllooaadd__oonnllyy () const; │ │ │ │ │ bool hhaass__ppiieeccee (piece_index_t i) const; │ │ │ │ │ peer_id const& ppiidd () const; │ │ │ │ │ bool iiss__iinntteerreessttiinngg () const; │ │ │ │ │ bool iiss__cchhookkeedd () const; │ │ │ │ │ - bool iiss__ppeeeerr__iinntteerreesstteedd () 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; │ │ │ │ │ + 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; │ │ │ │ │ - void ddiissccoonnnneecctt (error_code const& ec, operation_t op │ │ │ │ │ - , disconnect_severity_t = peer_connection_interface::normal); │ │ │ │ │ bool iiggnnoorree__uunncchhookkee__sslloottss () const; │ │ │ │ │ bool oonn__llooccaall__nneettwwoorrkk () const; │ │ │ │ │ bool ffaaiilleedd () const; │ │ │ │ │ - bool sshhoouulldd__lloogg (peer_log_alert::direction_t direction) const; │ │ │ │ │ void ppeeeerr__lloogg (peer_log_alert::direction_t direction │ │ │ │ │ , char const* event, char const* fmt = "", ...) const TORRENT_FORMAT │ │ │ │ │ (4,5); │ │ │ │ │ + bool sshhoouulldd__lloogg (peer_log_alert::direction_t direction) const; │ │ │ │ │ bool ccaann__ddiissccoonnnneecctt (error_code const& ec) const; │ │ │ │ │ bool hhaass__mmeettaaddaattaa () const; │ │ │ │ │ bool iinn__hhaannddsshhaakkee () const; │ │ │ │ │ void sseenndd__bbuuffffeerr (char const* begin, int size); │ │ │ │ │ time_point ttiimmee__ooff__llaasstt__uunncchhookkee () const; │ │ │ │ │ std::time_t llaasstt__sseeeenn__ccoommpplleettee () const; │ │ │ │ │ - bool ooppeerraattoorr!!== (peer_connection_handle const& o) const; │ │ │ │ │ bool ooppeerraattoorr==== (peer_connection_handle const& o) const; │ │ │ │ │ bool ooppeerraattoorr<< (peer_connection_handle const& o) const; │ │ │ │ │ + bool ooppeerraattoorr!!== (peer_connection_handle const& o) const; │ │ │ │ │ std::shared_ptr nnaattiivvee__hhaannddllee () const; │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ bbtt__ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e_._h_p_p" │ │ │ │ │ The _b_t___p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e provides a handle to the internal bittorrent peer │ │ │ │ │ connection object to plugins. It's low level and may not be a stable API across │ │ │ │ │ @@ -324,16 +324,16 @@ │ │ │ │ │ struct torrent_plugin │ │ │ │ │ { │ │ │ │ │ virtual std::shared_ptr nneeww__ccoonnnneeccttiioonn (peer_connection_handle │ │ │ │ │ const&); │ │ │ │ │ virtual void oonn__ppiieeccee__ppaassss (piece_index_t); │ │ │ │ │ virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t); │ │ │ │ │ virtual void ttiicckk (); │ │ │ │ │ - virtual bool oonn__ppaauussee (); │ │ │ │ │ virtual bool oonn__rreessuummee (); │ │ │ │ │ + virtual bool oonn__ppaauussee (); │ │ │ │ │ virtual void oonn__ffiilleess__cchheecckkeedd (); │ │ │ │ │ virtual void oonn__ssttaattee (torrent_status::state_t); │ │ │ │ │ virtual void oonn__aadddd__ppeeeerr (tcp::endpoint const&, │ │ │ │ │ peer_source_flags_t, add_peer_flags_t); │ │ │ │ │ │ │ │ │ │ static constexpr add_peer_flags_t ffiirrsstt__ttiimmee = 1_bit; │ │ │ │ │ static constexpr add_peer_flags_t ffiilltteerreedd = 2_bit; │ │ │ │ │ @@ -363,17 +363,17 @@ │ │ │ │ │ through the torrent and the piece_picker. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** ttiicckk(()) ********** │ │ │ │ │ virtual void ttiicckk (); │ │ │ │ │ This hook is called approximately once per second. It is a way of making it │ │ │ │ │ easy for plugins to do timed events, for sending messages or whatever. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** oonn__rreessuummee(()) oonn__ppaauussee(()) ********** │ │ │ │ │ -virtual bool oonn__ppaauussee (); │ │ │ │ │ +********** oonn__ppaauussee(()) oonn__rreessuummee(()) ********** │ │ │ │ │ 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 │ │ │ │ │ resume. │ │ │ │ │ Note that if you call pause() or resume() on the torrent from your handler it │ │ │ │ │ @@ -419,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 (piece_index_t); │ │ │ │ │ - virtual bool oonn__uunncchhookkee (); │ │ │ │ │ - virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ │ virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//); │ │ │ │ │ + virtual bool oonn__uunncchhookkee (); │ │ │ │ │ virtual bool oonn__ddoonntt__hhaavvee (piece_index_t); │ │ │ │ │ virtual bool oonn__hhaavvee__aallll (); │ │ │ │ │ - virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t); │ │ │ │ │ - virtual bool oonn__nnoott__iinntteerreesstteedd (); │ │ │ │ │ + virtual bool oonn__hhaavvee (piece_index_t); │ │ │ │ │ virtual bool oonn__rreeqquueesstt (peer_request const&); │ │ │ │ │ virtual bool oonn__cchhookkee (); │ │ │ │ │ + virtual bool oonn__nnoott__iinntteerreesstteedd (); │ │ │ │ │ + virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t); │ │ │ │ │ virtual bool oonn__iinntteerreesstteedd (); │ │ │ │ │ + virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ │ virtual bool oonn__ppiieeccee (peer_request const& //**ppiieeccee**// │ │ │ │ │ , span //**bbuuff**//); │ │ │ │ │ + virtual bool oonn__ssuuggggeesstt (piece_index_t); │ │ │ │ │ virtual bool oonn__ccaanncceell (peer_request const&); │ │ │ │ │ virtual bool oonn__rreejjeecctt (peer_request const&); │ │ │ │ │ - virtual bool oonn__ssuuggggeesstt (piece_index_t); │ │ │ │ │ - virtual void sseenntt__hhaavvee__aallll (); │ │ │ │ │ + virtual void sseenntt__ssuuggggeesstt (piece_index_t); │ │ │ │ │ virtual void sseenntt__ccaanncceell (peer_request const&); │ │ │ │ │ + virtual void sseenntt__hhaavvee__aallll (); │ │ │ │ │ virtual void sseenntt__rreeqquueesstt (peer_request const&); │ │ │ │ │ - virtual void sseenntt__hhaavvee__nnoonnee (); │ │ │ │ │ - virtual void sseenntt__rreejjeecctt__rreeqquueesstt (peer_request const&); │ │ │ │ │ virtual void sseenntt__aallllooww__ffaasstt (piece_index_t); │ │ │ │ │ - virtual void sseenntt__ssuuggggeesstt (piece_index_t); │ │ │ │ │ + virtual void sseenntt__rreejjeecctt__rreeqquueesstt (peer_request const&); │ │ │ │ │ virtual void sseenntt__cchhookkee (); │ │ │ │ │ - virtual void sseenntt__nnoott__iinntteerreesstteedd (); │ │ │ │ │ + virtual void sseenntt__hhaavvee__nnoonnee (); │ │ │ │ │ virtual void sseenntt__iinntteerreesstteedd (); │ │ │ │ │ - virtual void sseenntt__ppiieeccee (peer_request const&); │ │ │ │ │ virtual void sseenntt__uunncchhookkee (); │ │ │ │ │ + virtual void sseenntt__ppiieeccee (peer_request const&); │ │ │ │ │ virtual void sseenntt__hhaavvee (piece_index_t); │ │ │ │ │ + virtual void sseenntt__nnoott__iinntteerreesstteedd (); │ │ │ │ │ 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__ppaassss (piece_index_t); │ │ │ │ │ @@ -491,48 +491,48 @@ │ │ │ │ │ ********** oonn__eexxtteennssiioonn__hhaannddsshhaakkee(()) ********** │ │ │ │ │ virtual bool oonn__eexxtteennssiioonn__hhaannddsshhaakkee (bdecode_node const&); │ │ │ │ │ called when the extension handshake from the other end is received if this │ │ │ │ │ returns false, it means that this extension isn't supported by this peer. It │ │ │ │ │ will result in this _p_e_e_r___p_l_u_g_i_n being removed from the peer_connection and │ │ │ │ │ destructed. this is not called for web seeds │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** oonn__rreeqquueesstt(()) oonn__hhaavvee(()) oonn__iinntteerreesstteedd(()) oonn__nnoott__iinntteerreesstteedd(()) oonn__uunncchhookkee(()) │ │ │ │ │ -oonn__aalllloowweedd__ffaasstt(()) oonn__cchhookkee(()) oonn__bbiittffiieelldd(()) oonn__ddoonntt__hhaavvee(()) oonn__hhaavvee__aallll(()) │ │ │ │ │ -oonn__hhaavvee__nnoonnee(()) ********** │ │ │ │ │ -virtual bool oonn__hhaavvee (piece_index_t); │ │ │ │ │ -virtual bool oonn__uunncchhookkee (); │ │ │ │ │ -virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ │ +********** oonn__nnoott__iinntteerreesstteedd(()) oonn__hhaavvee(()) oonn__cchhookkee(()) oonn__iinntteerreesstteedd(()) oonn__hhaavvee__aallll(()) │ │ │ │ │ +oonn__bbiittffiieelldd(()) oonn__ddoonntt__hhaavvee(()) oonn__aalllloowweedd__ffaasstt(()) oonn__rreeqquueesstt(()) oonn__hhaavvee__nnoonnee(()) │ │ │ │ │ +oonn__uunncchhookkee(()) ********** │ │ │ │ │ virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//); │ │ │ │ │ +virtual bool oonn__uunncchhookkee (); │ │ │ │ │ virtual bool oonn__ddoonntt__hhaavvee (piece_index_t); │ │ │ │ │ virtual bool oonn__hhaavvee__aallll (); │ │ │ │ │ -virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t); │ │ │ │ │ -virtual bool oonn__nnoott__iinntteerreesstteedd (); │ │ │ │ │ +virtual bool oonn__hhaavvee (piece_index_t); │ │ │ │ │ virtual bool oonn__rreeqquueesstt (peer_request const&); │ │ │ │ │ virtual bool oonn__cchhookkee (); │ │ │ │ │ +virtual bool oonn__nnoott__iinntteerreesstteedd (); │ │ │ │ │ +virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t); │ │ │ │ │ virtual bool oonn__iinntteerreesstteedd (); │ │ │ │ │ +virtual bool oonn__hhaavvee__nnoonnee (); │ │ │ │ │ returning true from any of the message handlers indicates that the _p_l_u_g_i_n has │ │ │ │ │ handled the message. it will break the _p_l_u_g_i_n chain traversing and not let │ │ │ │ │ anyone else handle the message, including the default handler. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** oonn__ppiieeccee(()) ********** │ │ │ │ │ virtual bool oonn__ppiieeccee (peer_request const& //**ppiieeccee**// │ │ │ │ │ , span //**bbuuff**//); │ │ │ │ │ This function is called when the peer connection is receiving a piece. buf │ │ │ │ │ points (non-owning pointer) to the data in an internal immutable disk buffer. │ │ │ │ │ The length of the data is specified in the length member of the piece │ │ │ │ │ parameter. returns true to indicate that the piece is handled and the rest of │ │ │ │ │ the logic should be ignored. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** sseenntt__hhaavvee(()) sseenntt__nnoott__iinntteerreesstteedd(()) sseenntt__uunncchhookkee(()) sseenntt__iinntteerreesstteedd(()) │ │ │ │ │ -sseenntt__ppiieeccee(()) ********** │ │ │ │ │ -virtual void sseenntt__nnoott__iinntteerreesstteedd (); │ │ │ │ │ +********** sseenntt__uunncchhookkee(()) sseenntt__iinntteerreesstteedd(()) sseenntt__nnoott__iinntteerreesstteedd(()) sseenntt__ppiieeccee(()) │ │ │ │ │ +sseenntt__hhaavvee(()) ********** │ │ │ │ │ virtual void sseenntt__iinntteerreesstteedd (); │ │ │ │ │ -virtual void sseenntt__ppiieeccee (peer_request const&); │ │ │ │ │ virtual void sseenntt__uunncchhookkee (); │ │ │ │ │ +virtual void sseenntt__ppiieeccee (peer_request const&); │ │ │ │ │ virtual void sseenntt__hhaavvee (piece_index_t); │ │ │ │ │ +virtual void sseenntt__nnoott__iinntteerreesstteedd (); │ │ │ │ │ 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] │ │ │ │ │ @@ -594,35 +594,35 @@ │ │ │ │ │ consume is set to the number of bytes which should be trimmed from the head of │ │ │ │ │ the buffers, default is 0 │ │ │ │ │ produce is set to the number of bytes of payload which are now ready to be sent │ │ │ │ │ to the upper layer. default is the number of bytes passed in receive_vec │ │ │ │ │ packet_size is set to the minimum number of bytes which must be read to advance │ │ │ │ │ the next step of decryption. default is 0 │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ ccrreeaattee__ssmmaarrtt__bbaann__pplluuggiinn(()) ************ │ │ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_/_s_m_a_r_t___b_a_n_._h_p_p" │ │ │ │ │ -std::shared_ptr ccrreeaattee__ssmmaarrtt__bbaann__pplluuggiinn (torrent_handle const&, │ │ │ │ │ -client_data_t); │ │ │ │ │ -constructor function for the smart ban extension. The extension keeps track of │ │ │ │ │ -the data peers have sent us for failing pieces and once the piece completes and │ │ │ │ │ -passes the hash check bans the peers that turned out to have sent corrupt data. │ │ │ │ │ -This function can either be passed in the add_torrent_params::extensions field, │ │ │ │ │ -or via _t_o_r_r_e_n_t___h_a_n_d_l_e_:_:_a_d_d___e_x_t_e_n_s_i_o_n_(_). │ │ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ccrreeaattee__uutt__ppeexx__pplluuggiinn(()) ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_/_u_t___p_e_x_._h_p_p" │ │ │ │ │ std::shared_ptr ccrreeaattee__uutt__ppeexx__pplluuggiinn (torrent_handle const&, │ │ │ │ │ client_data_t); │ │ │ │ │ constructor function for the ut_pex extension. The ut_pex extension allows │ │ │ │ │ peers to gossip about their connections, allowing the swarm stay well connected │ │ │ │ │ and peers aware of more peers in the swarm. This extension is enabled by │ │ │ │ │ default unless explicitly disabled in the _s_e_s_s_i_o_n constructor. │ │ │ │ │ This can either be passed in the add_torrent_params::extensions field, or via │ │ │ │ │ _t_o_r_r_e_n_t___h_a_n_d_l_e_:_:_a_d_d___e_x_t_e_n_s_i_o_n_(_). │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ +************ ccrreeaattee__ssmmaarrtt__bbaann__pplluuggiinn(()) ************ │ │ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_/_s_m_a_r_t___b_a_n_._h_p_p" │ │ │ │ │ +std::shared_ptr ccrreeaattee__ssmmaarrtt__bbaann__pplluuggiinn (torrent_handle const&, │ │ │ │ │ +client_data_t); │ │ │ │ │ +constructor function for the smart ban extension. The extension keeps track of │ │ │ │ │ +the data peers have sent us for failing pieces and once the piece completes and │ │ │ │ │ +passes the hash check bans the peers that turned out to have sent corrupt data. │ │ │ │ │ +This function can either be passed in the add_torrent_params::extensions field, │ │ │ │ │ +or via _t_o_r_r_e_n_t___h_a_n_d_l_e_:_:_a_d_d___e_x_t_e_n_s_i_o_n_(_). │ │ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ ccrreeaattee__uutt__mmeettaaddaattaa__pplluuggiinn(()) ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_/_u_t___m_e_t_a_d_a_t_a_._h_p_p" │ │ │ │ │ std::shared_ptr ccrreeaattee__uutt__mmeettaaddaattaa__pplluuggiinn (torrent_handle │ │ │ │ │ const&, client_data_t); │ │ │ │ │ constructor function for the ut_metadata extension. The ut_metadata extension │ │ │ │ │ allows peers to request the .torrent file (or more specifically the info- │ │ │ │ │ dictionary of the .torrent file) from each other. This is the main building │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Resume_Data.html │ │ │ │ @@ -30,28 +30,28 @@ │ │ │ │ │ │ │ │

    home

    │ │ │ │
    │ │ │ │

    Table of contents

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

    read_resume_data()

    │ │ │ │

    Declared in "libtorrent/read_resume_data.hpp"

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

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

    │ │ │ │ @@ -72,22 +72,22 @@ │ │ │ │

    Declared in "libtorrent/write_resume_data.hpp"

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

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

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

    write_torrent_file() write_torrent_file_buf()

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

    write_torrent_file_buf() write_torrent_file()

    │ │ │ │

    Declared in "libtorrent/write_resume_data.hpp"

    │ │ │ │
    │ │ │ │ -entry write_torrent_file (add_torrent_params const& atp);
    │ │ │ │  entry write_torrent_file (add_torrent_params const& atp, write_torrent_flags_t flags);
    │ │ │ │ +entry write_torrent_file (add_torrent_params const& atp);
    │ │ │ │  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 │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -1,25 +1,25 @@ │ │ │ │ │ > │ │ │ │ │ _[_l_i_b_t_o_r_r_e_n_t_ _l_o_g_o_] │ │ │ │ │ VVeerrssiioonn:: 2.0.10 │ │ │ │ │ _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___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 (bdecode_node const& rd │ │ │ │ │ - , int piece_limit = 0x200000); │ │ │ │ │ + , error_code& ec, int piece_limit = 0x200000); │ │ │ │ │ add_torrent_params rreeaadd__rreessuummee__ddaattaa (span buffer │ │ │ │ │ , error_code& ec, load_torrent_limits const& cfg = {}); │ │ │ │ │ add_torrent_params rreeaadd__rreessuummee__ddaattaa (bdecode_node const& rd │ │ │ │ │ - , error_code& ec, int piece_limit = 0x200000); │ │ │ │ │ + , int piece_limit = 0x200000); │ │ │ │ │ add_torrent_params rreeaadd__rreessuummee__ddaattaa (span buffer │ │ │ │ │ , load_torrent_limits const& cfg = {}); │ │ │ │ │ these functions are used to parse resume data and populate the appropriate │ │ │ │ │ fields in an _a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s object. This object can then be used to add the │ │ │ │ │ actual _t_o_r_r_e_n_t___i_n_f_o object to and pass to session::add_torrent() or session:: │ │ │ │ │ async_add_torrent(). │ │ │ │ │ If the client wants to override any field that was loaded from the resume data, │ │ │ │ │ @@ -36,19 +36,19 @@ │ │ │ │ │ ************ wwrriittee__rreessuummee__ddaattaa__bbuuff(()) wwrriittee__rreessuummee__ddaattaa(()) ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_._h_p_p" │ │ │ │ │ std::vector wwrriittee__rreessuummee__ddaattaa__bbuuff (add_torrent_params const& atp); │ │ │ │ │ entry wwrriittee__rreessuummee__ddaattaa (add_torrent_params const& atp); │ │ │ │ │ this function turns the resume data in an add_torrent_params object into a │ │ │ │ │ bencoded structure │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -************ wwrriittee__ttoorrrreenntt__ffiillee(()) 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" │ │ │ │ │ -entry wwrriittee__ttoorrrreenntt__ffiillee (add_torrent_params const& atp); │ │ │ │ │ entry wwrriittee__ttoorrrreenntt__ffiillee (add_torrent_params const& atp, write_torrent_flags_t │ │ │ │ │ flags); │ │ │ │ │ +entry wwrriittee__ttoorrrreenntt__ffiillee (add_torrent_params const& atp); │ │ │ │ │ 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 │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Session.html │ │ │ │ @@ -52,79 +52,79 @@ │ │ │ │
    • is_valid()
    • │ │ │ │
    • session_state()
    • │ │ │ │
    • get_torrent_status() refresh_torrent_status()
    • │ │ │ │
    • post_torrent_updates()
    • │ │ │ │
    • post_session_stats()
    • │ │ │ │
    • post_dht_stats()
    • │ │ │ │
    • set_dht_state()
    • │ │ │ │ -
    • find_torrent() get_torrents()
    • │ │ │ │ -
    • async_add_torrent() add_torrent()
    • │ │ │ │ -
    • resume() is_paused() pause()
    • │ │ │ │ +
    • get_torrents() find_torrent()
    • │ │ │ │ +
    • add_torrent() async_add_torrent()
    • │ │ │ │ +
    • is_paused() resume() pause()
    • │ │ │ │
    • is_dht_running()
    • │ │ │ │
    • set_dht_storage()
    • │ │ │ │
    • add_dht_node()
    • │ │ │ │
    • dht_get_item()
    • │ │ │ │
    • dht_get_item()
    • │ │ │ │
    • dht_put_item()
    • │ │ │ │
    • dht_put_item()
    • │ │ │ │ -
    • dht_get_peers() dht_announce()
    • │ │ │ │ +
    • dht_announce() dht_get_peers()
    • │ │ │ │
    • dht_live_nodes()
    • │ │ │ │
    • dht_sample_infohashes()
    • │ │ │ │
    • dht_direct_request()
    • │ │ │ │
    • add_extension()
    • │ │ │ │
    • get_ip_filter() set_ip_filter()
    • │ │ │ │
    • set_port_filter()
    • │ │ │ │ -
    • ssl_listen_port() is_listening() listen_port()
    • │ │ │ │ +
    • listen_port() ssl_listen_port() is_listening()
    • │ │ │ │
    • set_peer_class_filter() get_peer_class_filter()
    • │ │ │ │ -
    • set_peer_class_type_filter() get_peer_class_type_filter()
    • │ │ │ │ +
    • get_peer_class_type_filter() set_peer_class_type_filter()
    • │ │ │ │
    • create_peer_class()
    • │ │ │ │
    • delete_peer_class()
    • │ │ │ │ -
    • get_peer_class() set_peer_class()
    • │ │ │ │ +
    • set_peer_class() get_peer_class()
    • │ │ │ │
    • remove_torrent()
    • │ │ │ │ -
    • apply_settings() get_settings()
    • │ │ │ │ -
    • wait_for_alert() pop_alerts() set_alert_notify()
    • │ │ │ │ +
    • get_settings() apply_settings()
    • │ │ │ │ +
    • pop_alerts() wait_for_alert() set_alert_notify()
    • │ │ │ │
    • delete_port_mapping() add_port_mapping()
    • │ │ │ │
    • reopen_network_sockets()
    • │ │ │ │
    • native_handle()
    • │ │ │ │
    │ │ │ │ │ │ │ │ -
  • write_session_params() read_session_params() write_session_params_buf()
  • │ │ │ │ +
  • write_session_params_buf() write_session_params() read_session_params()
  • │ │ │ │ │ │ │ │
    │ │ │ │ [report issue]
    │ │ │ │

    session_proxy

    │ │ │ │

    Declared in "libtorrent/session.hpp"

    │ │ │ │

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

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

    session_proxy() ~session_proxy() operator=()

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

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

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

    session

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

    │ │ │ │

    see apply_settings().

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

    session()

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

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

    │ │ │ │

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

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

    session()

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

    │ │ │ │
    │ │ │ │ @@ -236,18 +236,18 @@ │ │ │ │ before it's started.

    │ │ │ │
    │ │ │ │  struct session_params
    │ │ │ │  {
    │ │ │ │     session_params (settings_pack const& sp);
    │ │ │ │     session_params (settings_pack&& sp);
    │ │ │ │     session_params ();
    │ │ │ │ -   session_params (settings_pack const& sp
    │ │ │ │ -      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │     session_params (settings_pack&& sp
    │ │ │ │        , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ +   session_params (settings_pack const& sp
    │ │ │ │ +      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │  
    │ │ │ │     settings_pack settings;
    │ │ │ │     std::vector<std::shared_ptr<plugin>> extensions;
    │ │ │ │     dht::dht_state dht_state;
    │ │ │ │     dht::dht_storage_constructor_type dht_storage_constructor;
    │ │ │ │     disk_io_constructor_type disk_io_constructor;
    │ │ │ │     std::map<std::string, std::string> ext_state;
    │ │ │ │ @@ -264,18 +264,18 @@
    │ │ │ │  

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

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

    session_params()

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

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

    │ │ │ │ [report issue]
    │ │ │ │
    settings
    │ │ │ │
    The settings to configure the session with
    │ │ │ │
    │ │ │ │ @@ -326,27 +326,27 @@ │ │ │ │ std::function<bool(torrent_status const&)> const& pred │ │ │ │ , status_flags_t flags = {}) const; │ │ │ │ void refresh_torrent_status (std::vector<torrent_status>* ret │ │ │ │ , status_flags_t flags = {}) const; │ │ │ │ void post_torrent_updates (status_flags_t flags = status_flags_t::all()); │ │ │ │ void post_session_stats (); │ │ │ │ void post_dht_stats (); │ │ │ │ - void set_dht_state (dht::dht_state const& st); │ │ │ │ void set_dht_state (dht::dht_state&& st); │ │ │ │ - torrent_handle find_torrent (sha1_hash const& info_hash) const; │ │ │ │ + void set_dht_state (dht::dht_state const& 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); │ │ │ │ + void async_add_torrent (add_torrent_params&& params); │ │ │ │ + void async_add_torrent (add_torrent_params const& params); │ │ │ │ + void pause (); │ │ │ │ void resume (); │ │ │ │ bool is_paused () const; │ │ │ │ - void pause (); │ │ │ │ bool is_dht_running () const; │ │ │ │ void set_dht_storage (dht::dht_storage_constructor_type sc); │ │ │ │ void add_dht_node (std::pair<std::string, int> const& node); │ │ │ │ void dht_get_item (sha1_hash const& target); │ │ │ │ void dht_get_item (std::array<char, 32> key │ │ │ │ , std::string salt = std::string()); │ │ │ │ sha1_hash dht_put_item (entry data); │ │ │ │ @@ -361,34 +361,34 @@ │ │ │ │ void dht_direct_request (udp::endpoint const& ep, entry const& e, client_data_t userdata = {}); │ │ │ │ void add_extension (std::function<std::shared_ptr<torrent_plugin>( │ │ │ │ torrent_handle const&, client_data_t)> ext); │ │ │ │ void add_extension (std::shared_ptr<plugin> ext); │ │ │ │ void set_ip_filter (ip_filter f); │ │ │ │ ip_filter get_ip_filter () const; │ │ │ │ void set_port_filter (port_filter const& f); │ │ │ │ - unsigned short ssl_listen_port () const; │ │ │ │ unsigned short listen_port () const; │ │ │ │ + unsigned short ssl_listen_port () const; │ │ │ │ bool is_listening () const; │ │ │ │ - ip_filter get_peer_class_filter () 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 remove_torrent (const torrent_handle&, remove_flags_t = {}); │ │ │ │ - settings_pack get_settings () const; │ │ │ │ void apply_settings (settings_pack const&); │ │ │ │ void apply_settings (settings_pack&&); │ │ │ │ - void set_alert_notify (std::function<void()> const& fun); │ │ │ │ + settings_pack get_settings () const; │ │ │ │ void pop_alerts (std::vector<alert*>* alerts); │ │ │ │ alert* wait_for_alert (time_duration max_wait); │ │ │ │ - void delete_port_mapping (port_mapping_t handle); │ │ │ │ + void set_alert_notify (std::function<void()> const& fun); │ │ │ │ std::vector<port_mapping_t> add_port_mapping (portmap_protocol t, int external_port, int local_port); │ │ │ │ + void delete_port_mapping (port_mapping_t handle); │ │ │ │ void reopen_network_sockets (reopen_network_flags_t options = reopen_map_ports); │ │ │ │ std::shared_ptr<aux::session_impl> native_handle () const; │ │ │ │ │ │ │ │ static constexpr save_state_flags_t save_settings = 0_bit; │ │ │ │ static constexpr save_state_flags_t save_dht_state = 2_bit; │ │ │ │ static constexpr save_state_flags_t save_extension_state = 11_bit; │ │ │ │ static constexpr save_state_flags_t save_ip_filter = 12_bit; │ │ │ │ @@ -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 const& st);
    │ │ │ │  void set_dht_state (dht::dht_state&& st);
    │ │ │ │ +void set_dht_state (dht::dht_state const& 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()

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

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

    │ │ │ │

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

    │ │ │ │

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

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

    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);
    │ │ │ │ +void async_add_torrent (add_torrent_params&& params);
    │ │ │ │ +void async_add_torrent (add_torrent_params const& params);
    │ │ │ │  
    │ │ │ │

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

    │ │ │ │

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

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

    resume() is_paused() pause()

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

    is_paused() resume() pause()

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

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

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

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

    dht_get_peers() dht_announce()

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

    dht_announce() dht_get_peers()

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

    │ │ │ │ @@ -806,37 +806,37 @@ │ │ │ │
    │ │ │ │  void set_port_filter (port_filter const& f);
    │ │ │ │  
    │ │ │ │

    apply port_filter 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.

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

    ssl_listen_port() is_listening() listen_port()

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

    listen_port() ssl_listen_port() is_listening()

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

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

    │ │ │ │ @@ -856,21 +856,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]
    │ │ │ │ -
    │ │ │ │ -

    set_peer_class_type_filter() get_peer_class_type_filter()

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

    get_peer_class_type_filter() set_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:

    │ │ │ │
      │ │ │ │ @@ -909,18 +909,18 @@ │ │ │ │ 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;
    │ │ │ │  
    │ │ │ │

    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 │ │ │ │ @@ -938,60 +938,60 @@ │ │ │ │

    │ │ │ │  void remove_torrent (const torrent_handle&, remove_flags_t = {});
    │ │ │ │  
    │ │ │ │

    remove_torrent() will close all peer connections associated with │ │ │ │ the torrent and tell the tracker that we've stopped participating in │ │ │ │ the swarm. This operation cannot fail. When it completes, you will │ │ │ │ receive a torrent_removed_alert.

    │ │ │ │ -

    remove_torrent() is non-blocking, but will remove the torrent from the │ │ │ │ +

    remove_torrent() is non-blocking, but will remove the torrent from the │ │ │ │ session synchronously. Calling session_handle::add_torrent() immediately │ │ │ │ afterward with the same torrent will succeed. Note that this creates a │ │ │ │ new handle which is not equal to the removed one.

    │ │ │ │

    The optional second argument options can be used to delete all the │ │ │ │ files downloaded by this torrent. To do so, pass in the value │ │ │ │ session_handle::delete_files. Once the torrent is deleted, a │ │ │ │ torrent_deleted_alert is posted.

    │ │ │ │ -

    The torrent_handle remains valid for some time after remove_torrent() is │ │ │ │ +

    The torrent_handle remains valid for some time after remove_torrent() is │ │ │ │ called. It will become invalid only after all libtorrent tasks (such as │ │ │ │ I/O tasks) release their references to the torrent. Until this happens, │ │ │ │ torrent_handle::is_valid() will return true, and other calls such │ │ │ │ as torrent_handle::status() will succeed. Because of this, and because │ │ │ │ -remove_torrent() is non-blocking, the following sequence usually │ │ │ │ +remove_torrent() is non-blocking, the following sequence usually │ │ │ │ succeeds (does not throw system_error): │ │ │ │ .. code:: c++

    │ │ │ │
    │ │ │ │ session.remove_handle(handle); │ │ │ │ handle.save_resume_data();
    │ │ │ │

    Note that when a queued or downloading torrent is removed, its position │ │ │ │ in the download queue is vacated and every subsequent torrent in the │ │ │ │ queue has their queue positions updated. This can potentially cause a │ │ │ │ large state_update to be posted. When removing all torrents, it is │ │ │ │ advised to remove them from the back of the queue, to minimize the │ │ │ │ shifting.

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

    apply_settings() get_settings()

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

    get_settings() apply_settings()

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

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

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

    wait_for_alert() pop_alerts() set_alert_notify()

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

    pop_alerts() wait_for_alert() set_alert_notify()

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

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

    │ │ │ │

    It is safe to call pop_alerts from multiple different threads, as │ │ │ │ @@ -1042,16 +1042,16 @@ │ │ │ │ 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()

    │ │ │ │
    │ │ │ │ -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]
    │ │ │ │ @@ -1117,30 +1117,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() read_session_params() write_session_params_buf()

    │ │ │ │ +
    │ │ │ │ +

    write_session_params_buf() write_session_params() read_session_params()

    │ │ │ │

    Declared in "libtorrent/session_params.hpp"

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

    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 {} │ │ │ │ │ @@ -17,70 +17,70 @@ │ │ │ │ │ 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 _r_e_s_u_m_e_(_)_ _i_s___p_a_u_s_e_d_(_)_ _p_a_u_s_e_(_) │ │ │ │ │ + o _g_e_t___t_o_r_r_e_n_t_s_(_)_ _f_i_n_d___t_o_r_r_e_n_t_(_) │ │ │ │ │ + o _a_d_d___t_o_r_r_e_n_t_(_)_ _a_s_y_n_c___a_d_d___t_o_r_r_e_n_t_(_) │ │ │ │ │ + o _i_s___p_a_u_s_e_d_(_)_ _r_e_s_u_m_e_(_)_ _p_a_u_s_e_(_) │ │ │ │ │ o _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___a_n_n_o_u_n_c_e_(_)_ _d_h_t___g_e_t___p_e_e_r_s_(_) │ │ │ │ │ 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 _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 _s_s_l___l_i_s_t_e_n___p_o_r_t_(_)_ _i_s___l_i_s_t_e_n_i_n_g_(_)_ _l_i_s_t_e_n___p_o_r_t_(_) │ │ │ │ │ + o _l_i_s_t_e_n___p_o_r_t_(_)_ _s_s_l___l_i_s_t_e_n___p_o_r_t_(_)_ _i_s___l_i_s_t_e_n_i_n_g_(_) │ │ │ │ │ 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 _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 _g_e_t___p_e_e_r___c_l_a_s_s___t_y_p_e___f_i_l_t_e_r_(_)_ _s_e_t___p_e_e_r___c_l_a_s_s___t_y_p_e___f_i_l_t_e_r_(_) │ │ │ │ │ o _c_r_e_a_t_e___p_e_e_r___c_l_a_s_s_(_) │ │ │ │ │ o _d_e_l_e_t_e___p_e_e_r___c_l_a_s_s_(_) │ │ │ │ │ - o _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 _w_a_i_t___f_o_r___a_l_e_r_t_(_)_ _p_o_p___a_l_e_r_t_s_(_)_ _s_e_t___a_l_e_r_t___n_o_t_i_f_y_(_) │ │ │ │ │ + o _g_e_t___s_e_t_t_i_n_g_s_(_)_ _a_p_p_l_y___s_e_t_t_i_n_g_s_(_) │ │ │ │ │ + o _p_o_p___a_l_e_r_t_s_(_)_ _w_a_i_t___f_o_r___a_l_e_r_t_(_)_ _s_e_t___a_l_e_r_t___n_o_t_i_f_y_(_) │ │ │ │ │ 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 _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_(_)_ _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___b_u_f_(_) │ │ │ │ │ + * _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s___b_u_f_(_)_ _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s_(_)_ _r_e_a_d___s_e_s_s_i_o_n___p_a_r_a_m_s_(_) │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ sseessssiioonn__pprrooxxyy ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n_._h_p_p" │ │ │ │ │ this is a holder for the internal _s_e_s_s_i_o_n implementation object. Once the │ │ │ │ │ _s_e_s_s_i_o_n destruction is explicitly initiated, this holder is used to synchronize │ │ │ │ │ the completion of the shutdown. The lifetime of this object may outlive │ │ │ │ │ _s_e_s_s_i_o_n, causing the _s_e_s_s_i_o_n destructor to not block. The _s_e_s_s_i_o_n___p_r_o_x_y │ │ │ │ │ destructor will block however, until the underlying _s_e_s_s_i_o_n is done shutting │ │ │ │ │ down. │ │ │ │ │ struct session_proxy │ │ │ │ │ { │ │ │ │ │ - session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept; │ │ │ │ │ - sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ │ ~~sseessssiioonn__pprrooxxyy (); │ │ │ │ │ + sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ │ + sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ │ + session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept; │ │ │ │ │ sseessssiioonn__pprrooxxyy (); │ │ │ │ │ session_proxy& ooppeerraattoorr== (session_proxy const&) &; │ │ │ │ │ - sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ │ }; │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sseessssiioonn__pprrooxxyy(()) ~~sseessssiioonn__pprrooxxyy(()) ooppeerraattoorr==(()) ********** │ │ │ │ │ -session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept; │ │ │ │ │ -sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ │ ~~sseessssiioonn__pprrooxxyy (); │ │ │ │ │ +sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ │ +sseessssiioonn__pprrooxxyy (session_proxy const&); │ │ │ │ │ +session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept; │ │ │ │ │ sseessssiioonn__pprrooxxyy (); │ │ │ │ │ session_proxy& ooppeerraattoorr== (session_proxy const&) &; │ │ │ │ │ -sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept; │ │ │ │ │ default constructor, does not refer to any _s_e_s_s_i_o_n implementation object. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ************ sseessssiioonn ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n_._h_p_p" │ │ │ │ │ The _s_e_s_s_i_o_n holds all state that spans multiple torrents. Among other things it │ │ │ │ │ runs the network loop and manages all torrents. Once it's created, the _s_e_s_s_i_o_n │ │ │ │ │ object will spawn the main thread that will do all the work. The main thread │ │ │ │ │ @@ -88,47 +88,47 @@ │ │ │ │ │ You have some control over _s_e_s_s_i_o_n configuration through the session_handle:: │ │ │ │ │ apply_settings() member function. To change one or more configuration options, │ │ │ │ │ create a _s_e_t_t_i_n_g_s___p_a_c_k. object and fill it with the settings to be set and pass │ │ │ │ │ it in to session::apply_settings(). │ │ │ │ │ see _a_p_p_l_y___s_e_t_t_i_n_g_s_(_). │ │ │ │ │ struct session : session_handle │ │ │ │ │ { │ │ │ │ │ + sseessssiioonn (); │ │ │ │ │ + sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ │ explicit sseessssiioonn (session_params&& params); │ │ │ │ │ sseessssiioonn (session_params const& params, session_flags_t flags); │ │ │ │ │ - sseessssiioonn (); │ │ │ │ │ explicit sseessssiioonn (session_params const& params); │ │ │ │ │ - sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ │ - sseessssiioonn (session_params const& params, io_context& ios, session_flags_t); │ │ │ │ │ - sseessssiioonn (session_params&& params, io_context& ios, session_flags_t); │ │ │ │ │ sseessssiioonn (session_params&& params, io_context& ios); │ │ │ │ │ + sseessssiioonn (session_params const& params, io_context& ios, session_flags_t); │ │ │ │ │ sseessssiioonn (session_params const& params, io_context& ios); │ │ │ │ │ + sseessssiioonn (session_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 (); │ │ │ │ │ +sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ │ explicit sseessssiioonn (session_params&& params); │ │ │ │ │ sseessssiioonn (session_params const& params, session_flags_t flags); │ │ │ │ │ -sseessssiioonn (); │ │ │ │ │ explicit sseessssiioonn (session_params const& params); │ │ │ │ │ -sseessssiioonn (session_params&& params, session_flags_t flags); │ │ │ │ │ Constructs the _s_e_s_s_i_o_n objects which acts as the container of torrents. In │ │ │ │ │ order to avoid a race condition between starting the _s_e_s_s_i_o_n and configuring │ │ │ │ │ it, you can pass in a _s_e_s_s_i_o_n___p_a_r_a_m_s object. Its settings will take effect │ │ │ │ │ before the _s_e_s_s_i_o_n starts up. │ │ │ │ │ The overloads taking flags can be used to start a _s_e_s_s_i_o_n in paused mode (by │ │ │ │ │ passing in session::paused). Note that add_default_plugins do not have an │ │ │ │ │ affect on constructors that take a _s_e_s_s_i_o_n___p_a_r_a_m_s object. It already contains │ │ │ │ │ the plugins to use. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sseessssiioonn(()) ********** │ │ │ │ │ -sseessssiioonn (session_params const& params, io_context& ios, session_flags_t); │ │ │ │ │ -sseessssiioonn (session_params&& params, io_context& ios, session_flags_t); │ │ │ │ │ sseessssiioonn (session_params&& params, io_context& ios); │ │ │ │ │ +sseessssiioonn (session_params const& params, io_context& ios, session_flags_t); │ │ │ │ │ sseessssiioonn (session_params const& params, io_context& ios); │ │ │ │ │ +sseessssiioonn (session_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 │ │ │ │ │ @@ -165,18 +165,18 @@ │ │ │ │ │ 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 const& sp); │ │ │ │ │ sseessssiioonn__ppaarraammss (settings_pack&& sp); │ │ │ │ │ sseessssiioonn__ppaarraammss (); │ │ │ │ │ - sseessssiioonn__ppaarraammss (settings_pack const& sp │ │ │ │ │ - , std::vector> exts); │ │ │ │ │ sseessssiioonn__ppaarraammss (settings_pack&& sp │ │ │ │ │ , std::vector> exts); │ │ │ │ │ + sseessssiioonn__ppaarraammss (settings_pack const& sp │ │ │ │ │ + , std::vector> exts); │ │ │ │ │ │ │ │ │ │ settings_pack settings; │ │ │ │ │ std::vector> extensions; │ │ │ │ │ dht::dht_state dht_state; │ │ │ │ │ dht::dht_storage_constructor_type dht_storage_constructor; │ │ │ │ │ disk_io_constructor_type disk_io_constructor; │ │ │ │ │ std::map ext_state; │ │ │ │ │ @@ -188,18 +188,18 @@ │ │ │ │ │ sseessssiioonn__ppaarraammss (settings_pack&& sp); │ │ │ │ │ sseessssiioonn__ppaarraammss (); │ │ │ │ │ This constructor can be used to start with the default plugins (ut_metadata, │ │ │ │ │ ut_pex and smart_ban). Pass a _s_e_t_t_i_n_g_s___p_a_c_k to set the initial settings when │ │ │ │ │ the _s_e_s_s_i_o_n starts. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** sseessssiioonn__ppaarraammss(()) ********** │ │ │ │ │ -sseessssiioonn__ppaarraammss (settings_pack const& sp │ │ │ │ │ - , std::vector> exts); │ │ │ │ │ sseessssiioonn__ppaarraammss (settings_pack&& sp │ │ │ │ │ , std::vector> exts); │ │ │ │ │ +sseessssiioonn__ppaarraammss (settings_pack const& sp │ │ │ │ │ + , std::vector> exts); │ │ │ │ │ This constructor helps to configure the set of initial plugins to be added to │ │ │ │ │ the _s_e_s_s_i_o_n before it's started. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ settings │ │ │ │ │ The settings to configure the _s_e_s_s_i_o_n with │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ extensions │ │ │ │ │ @@ -240,28 +240,28 @@ │ │ │ │ │ std::function const& pred │ │ │ │ │ , status_flags_t flags = {}) const; │ │ │ │ │ void rreeffrreesshh__ttoorrrreenntt__ssttaattuuss (std::vector* ret │ │ │ │ │ , status_flags_t flags = {}) const; │ │ │ │ │ void ppoosstt__ttoorrrreenntt__uuppddaatteess (status_flags_t flags = status_flags_t::all()); │ │ │ │ │ void ppoosstt__sseessssiioonn__ssttaattss (); │ │ │ │ │ void ppoosstt__ddhhtt__ssttaattss (); │ │ │ │ │ - void sseett__ddhhtt__ssttaattee (dht::dht_state const& st); │ │ │ │ │ void sseett__ddhhtt__ssttaattee (dht::dht_state&& st); │ │ │ │ │ - torrent_handle ffiinndd__ttoorrrreenntt (sha1_hash const& info_hash) const; │ │ │ │ │ + void sseett__ddhhtt__ssttaattee (dht::dht_state const& 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); │ │ │ │ │ + void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ │ + void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params); │ │ │ │ │ + void ppaauussee (); │ │ │ │ │ void rreessuummee (); │ │ │ │ │ bool iiss__ppaauusseedd () const; │ │ │ │ │ - void ppaauussee (); │ │ │ │ │ bool iiss__ddhhtt__rruunnnniinngg () const; │ │ │ │ │ void sseett__ddhhtt__ssttoorraaggee (dht::dht_storage_constructor_type sc); │ │ │ │ │ void aadddd__ddhhtt__nnooddee (std::pair const& node); │ │ │ │ │ void ddhhtt__ggeett__iitteemm (sha1_hash const& target); │ │ │ │ │ void ddhhtt__ggeett__iitteemm (std::array key │ │ │ │ │ , std::string salt = std::string()); │ │ │ │ │ sha1_hash ddhhtt__ppuutt__iitteemm (entry data); │ │ │ │ │ @@ -279,35 +279,35 @@ │ │ │ │ │ client_data_t userdata = {}); │ │ │ │ │ void aadddd__eexxtteennssiioonn (std::function( │ │ │ │ │ torrent_handle const&, client_data_t)> ext); │ │ │ │ │ void aadddd__eexxtteennssiioonn (std::shared_ptr ext); │ │ │ │ │ void sseett__iipp__ffiilltteerr (ip_filter f); │ │ │ │ │ ip_filter ggeett__iipp__ffiilltteerr () const; │ │ │ │ │ void sseett__ppoorrtt__ffiilltteerr (port_filter const& f); │ │ │ │ │ - unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ │ unsigned short lliisstteenn__ppoorrtt () const; │ │ │ │ │ + unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ │ bool iiss__lliisstteenniinngg () const; │ │ │ │ │ - ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () 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 rreemmoovvee__ttoorrrreenntt (const torrent_handle&, remove_flags_t = {}); │ │ │ │ │ - settings_pack ggeett__sseettttiinnggss () const; │ │ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack const&); │ │ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack&&); │ │ │ │ │ - void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun); │ │ │ │ │ + settings_pack ggeett__sseettttiinnggss () const; │ │ │ │ │ void ppoopp__aalleerrttss (std::vector* alerts); │ │ │ │ │ alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait); │ │ │ │ │ - void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle); │ │ │ │ │ + void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun); │ │ │ │ │ std::vector aadddd__ppoorrtt__mmaappppiinngg (portmap_protocol t, int │ │ │ │ │ external_port, int local_port); │ │ │ │ │ + void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle); │ │ │ │ │ void rreeooppeenn__nneettwwoorrkk__ssoocckkeettss (reopen_network_flags_t options = │ │ │ │ │ reopen_map_ports); │ │ │ │ │ std::shared_ptr nnaattiivvee__hhaannddllee () const; │ │ │ │ │ │ │ │ │ │ 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; │ │ │ │ │ @@ -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 const& st); │ │ │ │ │ void sseett__ddhhtt__ssttaattee (dht::dht_state&& st); │ │ │ │ │ +void sseett__ddhhtt__ssttaattee (dht::dht_state const& 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(()) ********** │ │ │ │ │ -torrent_handle ffiinndd__ttoorrrreenntt (sha1_hash const& info_hash) const; │ │ │ │ │ +********** 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(()) ********** │ │ │ │ │ +********** aadddd__ttoorrrreenntt(()) aassyynncc__aadddd__ttoorrrreenntt(()) ********** │ │ │ │ │ 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); │ │ │ │ │ +void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params); │ │ │ │ │ +void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params); │ │ │ │ │ You add torrents through the _a_d_d___t_o_r_r_e_n_t_(_) function where you give an object │ │ │ │ │ with all the parameters. The _a_d_d___t_o_r_r_e_n_t_(_) overloads will block until the │ │ │ │ │ torrent has been added (or failed to be added) and returns an error code and a │ │ │ │ │ _t_o_r_r_e_n_t___h_a_n_d_l_e. In order to add torrents more efficiently, consider using │ │ │ │ │ _a_s_y_n_c___a_d_d___t_o_r_r_e_n_t_(_) which returns immediately, without waiting for the torrent │ │ │ │ │ to add. Notification of the torrent being added is sent as _a_d_d___t_o_r_r_e_n_t___a_l_e_r_t. │ │ │ │ │ The overload that does not take an error_code throws an exception on error and │ │ │ │ │ @@ -438,18 +438,18 @@ │ │ │ │ │ torrent_flags::paused and torrent_flags::auto_managed. In order to add a magnet │ │ │ │ │ link that will just download the metadata, but no payload, set the │ │ │ │ │ torrent_flags::upload_mode flag. │ │ │ │ │ Special consideration has to be taken when adding hybrid torrents (i.e. │ │ │ │ │ torrents that are BitTorrent v2 torrents that are backwards compatible with │ │ │ │ │ v1). For more details, see _B_i_t_T_o_r_r_e_n_t_ _v_2_ _t_o_r_r_e_n_t_s. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** rreessuummee(()) iiss__ppaauusseedd(()) ppaauussee(()) ********** │ │ │ │ │ +********** iiss__ppaauusseedd(()) rreessuummee(()) ppaauussee(()) ********** │ │ │ │ │ +void ppaauussee (); │ │ │ │ │ void rreessuummee (); │ │ │ │ │ bool iiss__ppaauusseedd () const; │ │ │ │ │ -void ppaauussee (); │ │ │ │ │ Pausing the _s_e_s_s_i_o_n has the same effect as pausing every torrent in it, except │ │ │ │ │ that torrents will not be resumed by the auto-manage mechanism. Resuming will │ │ │ │ │ restore the torrents to their previous paused state. i.e. the _s_e_s_s_i_o_n pause │ │ │ │ │ state is separate from the torrent pause state. A torrent is inactive if it is │ │ │ │ │ paused or if the _s_e_s_s_i_o_n is paused. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ ********** iiss__ddhhtt__rruunnnniinngg(()) ********** │ │ │ │ │ @@ -525,15 +525,15 @@ │ │ │ │ │ and make the function entirely self-contained. The only reason data blob's │ │ │ │ │ value is computed via a function instead of just passing in the new value is to │ │ │ │ │ avoid race conditions. If you want to uuppddaattee the value in the DHT, you must │ │ │ │ │ first retrieve it, then modify it, then write it back. The way the DHT works, │ │ │ │ │ it is natural to always do a lookup before storing and calling the callback in │ │ │ │ │ between is convenient. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** ddhhtt__ggeett__ppeeeerrss(()) ddhhtt__aannnnoouunnccee(()) ********** │ │ │ │ │ +********** ddhhtt__aannnnoouunnccee(()) ddhhtt__ggeett__ppeeeerrss(()) ********** │ │ │ │ │ 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 │ │ │ │ │ @@ -610,27 +610,27 @@ │ │ │ │ │ ********** sseett__ppoorrtt__ffiilltteerr(()) ********** │ │ │ │ │ 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] │ │ │ │ │ -********** ssssll__lliisstteenn__ppoorrtt(()) iiss__lliisstteenniinngg(()) lliisstteenn__ppoorrtt(()) ********** │ │ │ │ │ -unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ │ +********** lliisstteenn__ppoorrtt(()) ssssll__lliisstteenn__ppoorrtt(()) iiss__lliisstteenniinngg(()) ********** │ │ │ │ │ unsigned short lliisstteenn__ppoorrtt () const; │ │ │ │ │ +unsigned short ssssll__lliisstteenn__ppoorrtt () const; │ │ │ │ │ bool iiss__lliisstteenniinngg () 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; │ │ │ │ │ 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. │ │ │ │ │ @@ -647,17 +647,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] │ │ │ │ │ -********** sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) ggeett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) ********** │ │ │ │ │ -void sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr (peer_class_type_filter const& f); │ │ │ │ │ +********** ggeett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) sseett__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 │ │ │ │ │ @@ -685,15 +685,15 @@ │ │ │ │ │ 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(()) ********** │ │ │ │ │ +********** sseett__ppeeeerr__ccllaassss(()) ggeett__ppeeeerr__ccllaassss(()) ********** │ │ │ │ │ void sseett__ppeeeerr__ccllaassss (peer_class_t cid, peer_class_info const& pci); │ │ │ │ │ peer_class_info ggeett__ppeeeerr__ccllaassss (peer_class_t cid) const; │ │ │ │ │ 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 │ │ │ │ │ @@ -725,26 +725,26 @@ │ │ │ │ │ session.remove_handle(handle); handle.save_resume_data(); │ │ │ │ │ Note that when a queued or downloading torrent is removed, its position in the │ │ │ │ │ download queue is vacated and every subsequent torrent in the queue has their │ │ │ │ │ queue positions updated. This can potentially cause a large state_update to be │ │ │ │ │ posted. When removing all torrents, it is advised to remove them from the back │ │ │ │ │ of the queue, to minimize the shifting. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** aappppllyy__sseettttiinnggss(()) ggeett__sseettttiinnggss(()) ********** │ │ │ │ │ -settings_pack ggeett__sseettttiinnggss () const; │ │ │ │ │ +********** ggeett__sseettttiinnggss(()) aappppllyy__sseettttiinnggss(()) ********** │ │ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack const&); │ │ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack&&); │ │ │ │ │ +settings_pack ggeett__sseettttiinnggss () const; │ │ │ │ │ Applies the settings specified by the _s_e_t_t_i_n_g_s___p_a_c_k s. This is an asynchronous │ │ │ │ │ operation that will return immediately and actually apply the settings to the │ │ │ │ │ main thread of libtorrent some time later. │ │ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e] │ │ │ │ │ -********** wwaaiitt__ffoorr__aalleerrtt(()) ppoopp__aalleerrttss(()) sseett__aalleerrtt__nnoottiiffyy(()) ********** │ │ │ │ │ -void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun); │ │ │ │ │ +********** ppoopp__aalleerrttss(()) wwaaiitt__ffoorr__aalleerrtt(()) sseett__aalleerrtt__nnoottiiffyy(()) ********** │ │ │ │ │ void ppoopp__aalleerrttss (std::vector* alerts); │ │ │ │ │ alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait); │ │ │ │ │ +void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun); │ │ │ │ │ Alerts is the main mechanism for libtorrent to report errors and events. │ │ │ │ │ pop_alerts fills in the vector passed to it with pointers to new alerts. The │ │ │ │ │ _s_e_s_s_i_o_n still owns these alerts and they will stay valid until the next time │ │ │ │ │ pop_alerts is called. You may not delete the _a_l_e_r_t objects. │ │ │ │ │ It is safe to call pop_alerts from multiple different threads, as long as the │ │ │ │ │ alerts themselves are not accessed once another thread calls pop_alerts. Doing │ │ │ │ │ this requires manual synchronization between the popping threads. │ │ │ │ │ @@ -784,17 +784,17 @@ │ │ │ │ │ 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); │ │ │ │ │ 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 = │ │ │ │ │ @@ -840,25 +840,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(()) rreeaadd__sseessssiioonn__ppaarraammss(()) wwrriittee__sseessssiioonn__ppaarraammss__bbuuff(()) │ │ │ │ │ +************ wwrriittee__sseessssiioonn__ppaarraammss__bbuuff(()) wwrriittee__sseessssiioonn__ppaarraammss(()) rreeaadd__sseessssiioonn__ppaarraammss(()) │ │ │ │ │ ************ │ │ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n___p_a_r_a_m_s_._h_p_p" │ │ │ │ │ -session_params rreeaadd__sseessssiioonn__ppaarraammss (span buf │ │ │ │ │ - , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ std::vector wwrriittee__sseessssiioonn__ppaarraammss__bbuuff (session_params const& sp │ │ │ │ │ , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ session_params rreeaadd__sseessssiioonn__ppaarraammss (bdecode_node const& e │ │ │ │ │ , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ entry wwrriittee__sseessssiioonn__ppaarraammss (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()); │ │ │ │ │ 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 │ │ │ │ @@ -29,35 +29,35 @@ │ │ │ │ │ │ │ │ │ │ │ │

    home

    │ │ │ │
    │ │ │ │

    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 │ │ │ │ @@ -4562,23 +4562,23 @@ │ │ │ │ i2p_port).

    │ │ │ │
    │ │ │ │  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_bool (int name, bool val) override;
    │ │ │ │     void set_int (int name, int val) override;
    │ │ │ │     void set_str (int name, std::string val) override;
    │ │ │ │     void set_int (int name, flags::bitfield_flag<Type, Tag> const val);
    │ │ │ │ -   void set_bool (int name, bool 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;
    │ │ │ │ +   std::string const& get_str (int name) const override;
    │ │ │ │     bool get_bool (int name) const override;
    │ │ │ │     void for_each (Fun&& f) const;
    │ │ │ │  
    │ │ │ │     enum type_bases
    │ │ │ │     {
    │ │ │ │        string_type_base,
    │ │ │ │        int_type_base,
    │ │ │ │ @@ -4650,22 +4650,22 @@
    │ │ │ │        socks5_pw,
    │ │ │ │        http,
    │ │ │ │        http_pw,
    │ │ │ │     };
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -

    set_int() set_str() set_bool()

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

    set_int() set_bool() set_str()

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

    │ │ │ │ @@ -4686,21 +4686,21 @@ │ │ │ │
    │ │ │ │

    clear()

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

    clear a specific setting from the pack

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

    get_str() get_int() get_bool()

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

    get_str() get_bool() get_int()

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

    │ │ │ │ @@ -5060,19 +5060,38 @@ │ │ │ │ http_pw │ │ │ │ 5 │ │ │ │ The server is assumed to be an HTTP proxy that requires user │ │ │ │ authorization. The username and password will be sent to the proxy. │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ + │ │ │ │ +[report issue]
    │ │ │ │
    │ │ │ │ -
    │ │ │ │ -

    min_memory_usage() high_performance_seed()

    │ │ │ │ +
    │ │ │ │ +

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

    high_performance_seed() min_memory_usage()

    │ │ │ │

    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 │ │ │ │ @@ -5147,33 +5166,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]
    │ │ │ │ -
    │ │ │ │ -

    setting_by_name() name_for_setting()

    │ │ │ │ -

    Declared in "libtorrent/settings_pack.hpp"

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

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

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

    default_settings()

    │ │ │ │ -

    Declared in "libtorrent/settings_pack.hpp"

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

    returns a settings_pack with every setting set to its default value

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