--- /srv/reproducible-results/rbuild-debian/r-b-build.MxKy5KfJ/b1/libtorrent-rasterbar_2.0.8-1_arm64.changes +++ /srv/reproducible-results/rbuild-debian/r-b-build.MxKy5KfJ/b2/libtorrent-rasterbar_2.0.8-1_arm64.changes ├── Files │ @@ -1,7 +1,7 @@ │ │ ea2b15fc2deab7780aaacf712285a085 360872 libdevel optional libtorrent-rasterbar-dev_2.0.8-1_arm64.deb │ - 926bb5a68ac62410d9a1510b97fb2257 1605628 doc optional libtorrent-rasterbar-doc_2.0.8-1_all.deb │ + 7ed72382f1bf9876b66e89b43366c2e3 1605692 doc optional libtorrent-rasterbar-doc_2.0.8-1_all.deb │ 9ec46b4275c7f127701bd431e7298a67 51089296 debug optional libtorrent-rasterbar2.0-dbgsym_2.0.8-1_arm64.deb │ 482e75b766c380893e3f3eca9ecc60fb 1382480 libs optional libtorrent-rasterbar2.0_2.0.8-1_arm64.deb │ 4afa0182598fe3d364cc2025d382f7b1 12997680 debug optional python3-libtorrent-dbgsym_2.0.8-1_arm64.deb │ 6156d8646e7ae39928a4980cbd3eef60 644948 python optional python3-libtorrent_2.0.8-1_arm64.deb ├── libtorrent-rasterbar-doc_2.0.8-1_all.deb │ ├── file list │ │ @@ -1,3 +1,3 @@ │ │ -rw-r--r-- 0 0 0 4 2022-10-23 15:10:21.000000 debian-binary │ │ -rw-r--r-- 0 0 0 3632 2022-10-23 15:10:21.000000 control.tar.xz │ │ --rw-r--r-- 0 0 0 1601804 2022-10-23 15:10:21.000000 data.tar.xz │ │ +-rw-r--r-- 0 0 0 1601868 2022-10-23 15:10:21.000000 data.tar.xz │ ├── control.tar.xz │ │ ├── control.tar │ │ │ ├── ./md5sums │ │ │ │ ├── ./md5sums │ │ │ │ │┄ Files differ │ ├── data.tar.xz │ │ ├── data.tar │ │ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/single-page-ref.html │ │ │ │ @@ -55,94 +55,94 @@ │ │ │ │
  • enum error_code_enum
  • │ │ │ │
  • session_params │ │ │ │
  • │ │ │ │
  • session_proxy │ │ │ │
  • │ │ │ │
  • session │ │ │ │
  • │ │ │ │
  • session_handle │ │ │ │
  • │ │ │ │ -
  • read_session_params() write_session_params_buf() write_session_params()
  • │ │ │ │ +
  • write_session_params_buf() read_session_params() write_session_params()
  • │ │ │ │
  • web_seed_entry │ │ │ │
  • │ │ │ │
  • load_torrent_limits
  • │ │ │ │
  • torrent_info │ │ │ │
  • │ │ │ │
  • piece_block
  • │ │ │ │
  • peer_request │ │ │ │
  • │ │ │ │ -
  • load_torrent_parsed() load_torrent_file() load_torrent_buffer()
  • │ │ │ │ +
  • load_torrent_file() load_torrent_buffer() load_torrent_parsed()
  • │ │ │ │
  • make_magnet_uri()
  • │ │ │ │
  • parse_magnet_uri()
  • │ │ │ │
  • truncate_files()
  • │ │ │ │
  • version()
  • │ │ │ │
  • enum socket_type_t
  • │ │ │ │
  • enum protocol_version
  • │ │ │ │
  • enum portmap_transport
  • │ │ │ │ @@ -199,30 +199,30 @@ │ │ │ │
  • load_state()
  • │ │ │ │ │ │ │ │ │ │ │ │
  • torrent_plugin │ │ │ │
  • │ │ │ │
  • peer_plugin │ │ │ │
  • │ │ │ │
  • storage_params
  • │ │ │ │ @@ -280,87 +280,87 @@ │ │ │ │
  • posix_disk_io_constructor()
  • │ │ │ │
  • default_disk_io_constructor()
  • │ │ │ │
  • enum storage_mode_t
  • │ │ │ │
  • enum status_t
  • │ │ │ │
  • enum move_flags_t
  • │ │ │ │
  • client_data_t │ │ │ │
  • │ │ │ │
  • add_torrent_params
  • │ │ │ │
  • peer_class_info
  • │ │ │ │
  • peer_class_type_filter │ │ │ │
  • │ │ │ │
  • block_info │ │ │ │
  • │ │ │ │
  • partial_piece_info
  • │ │ │ │
  • torrent_handle │ │ │ │
  • │ │ │ │
  • hash_value()
  • │ │ │ │
  • open_file_state
  • │ │ │ │
  • disk_interface │ │ │ │
  • │ │ │ │
  • dht_get_peers_reply_alert
  • │ │ │ │
  • dht_direct_response_alert
  • │ │ │ │
  • picker_log_alert
  • │ │ │ │
  • session_error_alert
  • │ │ │ │
  • dht_live_nodes_alert │ │ │ │
  • │ │ │ │
  • session_stats_header_alert
  • │ │ │ │
  • dht_sample_infohashes_alert │ │ │ │
  • │ │ │ │
  • block_uploaded_alert
  • │ │ │ │
  • alerts_dropped_alert
  • │ │ │ │
  • socks5_alert
  • │ │ │ │ @@ -609,15 +609,15 @@ │ │ │ │ │ │ │ │
  • entry │ │ │ │
  • │ │ │ │ @@ -628,49 +628,49 @@ │ │ │ │
  • generate_buf() generate()
  • │ │ │ │
  • files()
  • │ │ │ │
  • set_comment()
  • │ │ │ │
  • set_creator()
  • │ │ │ │
  • set_creation_date()
  • │ │ │ │
  • set_hash()
  • │ │ │ │
  • set_hash2()
  • │ │ │ │ -
  • add_http_seed() add_url_seed()
  • │ │ │ │ +
  • add_url_seed() add_http_seed()
  • │ │ │ │
  • add_node()
  • │ │ │ │
  • add_tracker()
  • │ │ │ │
  • set_root_cert()
  • │ │ │ │ -
  • priv() set_priv()
  • │ │ │ │ +
  • set_priv() priv()
  • │ │ │ │
  • num_pieces()
  • │ │ │ │
  • piece_range()
  • │ │ │ │
  • file_range()
  • │ │ │ │
  • file_piece_range()
  • │ │ │ │
  • total_size()
  • │ │ │ │ -
  • piece_size() piece_length()
  • │ │ │ │ +
  • piece_length() piece_size()
  • │ │ │ │
  • add_similar_torrent() add_collection()
  • │ │ │ │ │ │ │ │ │ │ │ │
  • add_files()
  • │ │ │ │
  • set_piece_hashes()
  • │ │ │ │
  • bitfield │ │ │ │
  • │ │ │ │
  • hasher │ │ │ │
  • │ │ │ │
  • hasher256 │ │ │ │
  • │ │ │ │
  • announce_infohash
  • │ │ │ │
  • announce_endpoint
  • │ │ │ │
  • announce_entry │ │ │ │
  • │ │ │ │
  • settings_pack │ │ │ │
  • │ │ │ │
  • generate_fingerprint()
  • │ │ │ │
  • min_memory_usage() high_performance_seed()
  • │ │ │ │ -
  • name_for_setting() setting_by_name()
  • │ │ │ │ +
  • setting_by_name() name_for_setting()
  • │ │ │ │
  • default_settings()
  • │ │ │ │
  • bdecode_node │ │ │ │ @@ -753,16 +753,16 @@ │ │ │ │
  • counters()
  • │ │ │ │ │ │ │ │ │ │ │ │
  • sign_mutable_item()
  • │ │ │ │
  • dht_default_storage_constructor()
  • │ │ │ │
  • announce_flags_t
  • │ │ │ │
  • read_resume_data()
  • │ │ │ │ -
  • write_resume_data_buf() write_resume_data()
  • │ │ │ │ -
  • write_torrent_file() write_torrent_file_buf()
  • │ │ │ │ +
  • write_resume_data() write_resume_data_buf()
  • │ │ │ │ +
  • write_torrent_file_buf() write_torrent_file()
  • │ │ │ │
  • write_torrent_flags_t
  • │ │ │ │
  • ed25519_create_seed()
  • │ │ │ │
  • ed25519_create_keypair()
  • │ │ │ │
  • ed25519_sign()
  • │ │ │ │
  • ed25519_verify()
  • │ │ │ │
  • ed25519_add_scalar()
  • │ │ │ │
  • ed25519_key_exchange()
  • │ │ │ │ @@ -774,16 +774,16 @@ │ │ │ │

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

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

    bool()

    │ │ │ │ @@ -792,16 +792,16 @@ │ │ │ │ │ │ │ │

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

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

    file()

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

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

    │ │ │ │ [report issue]
    │ │ │ │
    ec
    │ │ │ │
    the error that occurred
    │ │ │ │ @@ -2121,18 +2121,18 @@ │ │ │ │ before it's started.

    │ │ │ │
    │ │ │ │  struct session_params
    │ │ │ │  {
    │ │ │ │     session_params (settings_pack&& sp);
    │ │ │ │     session_params (settings_pack const& sp);
    │ │ │ │     session_params ();
    │ │ │ │ -   session_params (settings_pack&& sp
    │ │ │ │ -      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │     session_params (settings_pack const& sp
    │ │ │ │        , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ +   session_params (settings_pack&& sp
    │ │ │ │ +      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │  
    │ │ │ │     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;
    │ │ │ │ @@ -2149,18 +2149,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&& sp
    │ │ │ │ -      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │  session_params (settings_pack const& sp
    │ │ │ │        , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │ +session_params (settings_pack&& sp
    │ │ │ │ +      , std::vector<std::shared_ptr<plugin>> exts);
    │ │ │ │  
    │ │ │ │

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

    │ │ │ │ [report issue]
    │ │ │ │
    settings
    │ │ │ │
    The settings to configure the session with
    │ │ │ │
    │ │ │ │ @@ -2202,33 +2202,33 @@ │ │ │ │ synchronize the completion of the shutdown. The lifetime of this object │ │ │ │ may outlive session, causing the session destructor to not block. The │ │ │ │ session_proxy destructor will block however, until the underlying session │ │ │ │ is done shutting down.

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

    ~session_proxy() operator=() session_proxy()

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

    session_proxy() operator=() ~session_proxy()

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

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

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

    session

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

    session()

    │ │ │ │
    │ │ │ │ @@ -2277,17 +2277,17 @@
    │ │ │ │  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 (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);
    │ │ │ │  
    │ │ │ │

    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.

    │ │ │ │
    │ │ │ │ @@ -2342,74 +2342,74 @@ │ │ │ │ any operation on it will throw a system_error exception, with error code │ │ │ │ invalid_session_handle.

    │ │ │ │
    │ │ │ │  struct session_handle
    │ │ │ │  {
    │ │ │ │     bool is_valid () const;
    │ │ │ │     session_params session_state (save_state_flags_t flags = save_state_flags_t::all()) const;
    │ │ │ │ +   void refresh_torrent_status (std::vector<torrent_status>* ret
    │ │ │ │ +      , status_flags_t flags = {}) const;
    │ │ │ │     std::vector<torrent_status> get_torrent_status (
    │ │ │ │        std::function<bool(torrent_status const&)> const& pred
    │ │ │ │        , status_flags_t flags = {}) const;
    │ │ │ │ -   void refresh_torrent_status (std::vector<torrent_status>* ret
    │ │ │ │ -      , status_flags_t flags = {}) const;
    │ │ │ │     void post_torrent_updates (status_flags_t flags = status_flags_t::all());
    │ │ │ │     void post_session_stats ();
    │ │ │ │     void post_dht_stats ();
    │ │ │ │     void set_dht_state (dht::dht_state&& st);
    │ │ │ │     void set_dht_state (dht::dht_state const& st);
    │ │ │ │     torrent_handle find_torrent (sha1_hash const& info_hash) const;
    │ │ │ │     std::vector<torrent_handle> get_torrents () const;
    │ │ │ │     torrent_handle add_torrent (add_torrent_params&& params);
    │ │ │ │ -   void async_add_torrent (add_torrent_params&& params);
    │ │ │ │ -   torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
    │ │ │ │     torrent_handle add_torrent (add_torrent_params const& params);
    │ │ │ │     torrent_handle add_torrent (add_torrent_params const& params, error_code& ec);
    │ │ │ │     void async_add_torrent (add_torrent_params const& params);
    │ │ │ │ -   void pause ();
    │ │ │ │ -   bool is_paused () const;
    │ │ │ │ +   void async_add_torrent (add_torrent_params&& params);
    │ │ │ │ +   torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
    │ │ │ │     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);
    │ │ │ │     void dht_put_item (std::array<char, 32> key
    │ │ │ │        , std::function<void(entry&, std::array<char, 64>&
    │ │ │ │        , std::int64_t&, std::string const&)> cb
    │ │ │ │        , std::string salt = std::string());
    │ │ │ │ -   void dht_get_peers (sha1_hash const& info_hash);
    │ │ │ │     void dht_announce (sha1_hash const& info_hash, int port = 0, dht::announce_flags_t flags = {});
    │ │ │ │ +   void dht_get_peers (sha1_hash const& info_hash);
    │ │ │ │     void dht_live_nodes (sha1_hash const& nid);
    │ │ │ │     void dht_sample_infohashes (udp::endpoint const& ep, sha1_hash const& target);
    │ │ │ │     void dht_direct_request (udp::endpoint const& ep, entry const& e, client_data_t userdata = {});
    │ │ │ │     void add_extension (std::function<std::shared_ptr<torrent_plugin>(
    │ │ │ │        torrent_handle const&, client_data_t)> ext);
    │ │ │ │     void add_extension (std::shared_ptr<plugin> ext);
    │ │ │ │     ip_filter get_ip_filter () const;
    │ │ │ │     void set_ip_filter (ip_filter f);
    │ │ │ │     void set_port_filter (port_filter const& f);
    │ │ │ │ -   bool is_listening () const;
    │ │ │ │     unsigned short listen_port () const;
    │ │ │ │     unsigned short ssl_listen_port () const;
    │ │ │ │ +   bool is_listening () const;
    │ │ │ │     void set_peer_class_filter (ip_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);
    │ │ │ │     peer_class_info get_peer_class (peer_class_t cid) const;
    │ │ │ │     void set_peer_class (peer_class_t cid, peer_class_info const& pci);
    │ │ │ │     void remove_torrent (const torrent_handle&, remove_flags_t = {});
    │ │ │ │ -   void apply_settings (settings_pack const&);
    │ │ │ │ -   settings_pack get_settings () const;
    │ │ │ │     void apply_settings (settings_pack&&);
    │ │ │ │ -   void set_alert_notify (std::function<void()> const& fun);
    │ │ │ │ +   settings_pack get_settings () const;
    │ │ │ │ +   void apply_settings (settings_pack const&);
    │ │ │ │     alert* wait_for_alert (time_duration max_wait);
    │ │ │ │ +   void set_alert_notify (std::function<void()> const& fun);
    │ │ │ │     void pop_alerts (std::vector<alert*>* alerts);
    │ │ │ │     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;
    │ │ │ │ @@ -2444,24 +2444,24 @@
    │ │ │ │  

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

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

    refresh_torrent_status() get_torrent_status()

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

    get_torrent_status() refresh_torrent_status()

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

    Note

    │ │ │ │

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

    │ │ │ │
    │ │ │ │ @@ -2531,41 +2531,41 @@ │ │ │ │
    │ │ │ │  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]
    │ │ │ │ -
    │ │ │ │ -

    get_torrents() find_torrent()

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

    find_torrent() get_torrents()

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

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

    │ │ │ │

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

    │ │ │ │

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

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

    add_torrent() async_add_torrent()

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

    async_add_torrent() add_torrent()

    │ │ │ │
    │ │ │ │  torrent_handle add_torrent (add_torrent_params&& params);
    │ │ │ │ -void async_add_torrent (add_torrent_params&& params);
    │ │ │ │ -torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
    │ │ │ │  torrent_handle add_torrent (add_torrent_params const& params);
    │ │ │ │  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&& params, error_code& ec);
    │ │ │ │  
    │ │ │ │

    You add torrents through the add_torrent() function where you give an │ │ │ │ object with all the parameters. The add_torrent() overloads will block │ │ │ │ until the torrent has been added (or failed to be added) and returns │ │ │ │ an error code and a torrent_handle. In order to add torrents more │ │ │ │ efficiently, consider using async_add_torrent() which returns │ │ │ │ immediately, without waiting for the torrent to add. Notification of │ │ │ │ @@ -2585,23 +2585,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() pause() resume()

    │ │ │ │
    │ │ │ │ -void pause ();
    │ │ │ │ -bool is_paused () const;
    │ │ │ │  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.

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

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

    dht_announce() dht_get_peers()

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

    dht_get_peers() dht_announce()

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

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

    │ │ │ │

    dht_announce() will issue a DHT announce request to the DHT to the │ │ │ │ specified info-hash, advertising the specified port. If the port is │ │ │ │ left at its default, 0, the port will be implied by the DHT message's │ │ │ │ @@ -2830,34 +2830,34 @@ │ │ │ │

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

    is_listening() listen_port() ssl_listen_port()

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

    ssl_listen_port() listen_port() is_listening()

    │ │ │ │
    │ │ │ │ -bool is_listening () 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()

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

    get_peer_class_filter() set_peer_class_filter()

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

    │ │ │ │ @@ -2933,18 +2933,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()

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

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

    │ │ │ │

    cid must refer to an existing peer class. If it does not, the │ │ │ │ @@ -2992,29 +2992,29 @@ │ │ │ │ advised to remove them from the back of the queue, to minimize the │ │ │ │ shifting.

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

    apply_settings() get_settings()

    │ │ │ │
    │ │ │ │ -void apply_settings (settings_pack const&);
    │ │ │ │ -settings_pack get_settings () const;
    │ │ │ │  void apply_settings (settings_pack&&);
    │ │ │ │ +settings_pack get_settings () const;
    │ │ │ │ +void apply_settings (settings_pack 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]
    │ │ │ │ -
    │ │ │ │ -

    pop_alerts() set_alert_notify() wait_for_alert()

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

    wait_for_alert() pop_alerts() set_alert_notify()

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

    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.

    │ │ │ │ @@ -3141,20 +3141,20 @@ │ │ │ │ [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]
    │ │ │ │
    │ │ │ │ -
    │ │ │ │ -

    read_session_params() write_session_params_buf() write_session_params()

    │ │ │ │ +
    │ │ │ │ +

    write_session_params_buf() read_session_params() write_session_params()

    │ │ │ │

    Declared in "libtorrent/session_params.hpp"

    │ │ │ │
    │ │ │ │  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());
    │ │ │ │  std::vector<char> write_session_params_buf (session_params const& sp
    │ │ │ │ @@ -3292,35 +3292,35 @@
    │ │ │ │  
    │ │ │ │

    torrent_info

    │ │ │ │

    Declared in "libtorrent/torrent_info.hpp"

    │ │ │ │

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

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

    torrent_info()

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

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

    │ │ │ │

    The constructor that takes a bdecode_node will create a torrent_info │ │ │ │ @@ -3412,18 +3412,18 @@ │ │ │ │ [report issue]

    │ │ │ │
    │ │ │ │

    ~torrent_info()

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

    frees all storage associated with this torrent_info object

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

    orig_files() files()

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

    files() orig_files()

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

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

    │ │ │ │

    Remaps the file storage to a new file layout. This can be used to, for │ │ │ │ instance, download all data in a torrent to a single file, or to a │ │ │ │ number of fixed size sector aligned files, regardless of the number │ │ │ │ and sizes of the files in the torrent.

    │ │ │ │

    The new specified file_storage must have the exact same size as │ │ │ │ the current one.

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

    clear_trackers() add_tracker() trackers()

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

    add_tracker() clear_trackers() trackers()

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

    add_tracker() adds a tracker to the announce-list. The tier │ │ │ │ determines the order in which the trackers are to be tried. │ │ │ │ The trackers() function will return a sorted vector of │ │ │ │ announce_entry. Each announce entry contains a string, which is │ │ │ │ @@ -3505,20 +3505,20 @@ │ │ │ │ std::vector<sha1_hash> similar_torrents () const; │ │ │ │

    │ │ │ │

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

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

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

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

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

    │ │ │ │
    │ │ │ │  void add_url_seed (std::string const& url
    │ │ │ │        , std::string const& ext_auth = std::string()
    │ │ │ │        , web_seed_entry::headers_t const& ext_headers = web_seed_entry::headers_t());
    │ │ │ │  std::vector<web_seed_entry> const& web_seeds () const;
    │ │ │ │  void add_http_seed (std::string const& url
    │ │ │ │        , std::string const& extern_auth = std::string()
    │ │ │ │ @@ -3547,63 +3547,63 @@
    │ │ │ │  std::int64_t total_size () const;
    │ │ │ │  
    │ │ │ │

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

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

    num_pieces() piece_length()

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

    piece_length() num_pieces()

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

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

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

    piece_range() last_piece() end_piece()

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

    last_piece() end_piece() piece_range()

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

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

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

    info_hash() info_hashes()

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

    info_hashes() info_hash()

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

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

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

    v1() v2()

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

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

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

    num_files()

    │ │ │ │ @@ -3676,21 +3676,21 @@ │ │ │ │
    │ │ │ │

    piece_size()

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

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

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

    hash_for_piece() hash_for_piece_ptr()

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

    hash_for_piece_ptr() hash_for_piece()

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

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

    │ │ │ │ [report issue]
    │ │ │ │ @@ -4286,20 +4286,20 @@ │ │ │ │

    Note

    │ │ │ │

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

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

    info_hash_t()

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

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

    │ │ │ │

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

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

    has() has_v1() has_v2()

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

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

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

    get()

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

    load_torrent_parsed() load_torrent_file() load_torrent_buffer()

    │ │ │ │ +
    │ │ │ │ +

    load_torrent_file() load_torrent_buffer() load_torrent_parsed()

    │ │ │ │

    Declared in "libtorrent/load_torrent.hpp"

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

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

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

    make_magnet_uri()

    │ │ │ │

    Declared in "libtorrent/magnet_uri.hpp"

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

    Generates a magnet URI from the specified torrent.

    │ │ │ │

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

    │ │ │ │
    │ │ │ │ @@ -4479,17 +4479,17 @@ │ │ │ │ an empty string is returned.

    │ │ │ │

    For more information about magnet links, see magnet links.

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

    parse_magnet_uri()

    │ │ │ │

    Declared in "libtorrent/magnet_uri.hpp"

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

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

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

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

    │ │ │ │
    │ │ │ │  struct torrent_plugin
    │ │ │ │  {
    │ │ │ │     virtual std::shared_ptr<peer_plugin> new_connection (peer_connection_handle const&);
    │ │ │ │ -   virtual void on_piece_failed (piece_index_t);
    │ │ │ │     virtual void on_piece_pass (piece_index_t);
    │ │ │ │ +   virtual void on_piece_failed (piece_index_t);
    │ │ │ │     virtual void tick ();
    │ │ │ │     virtual bool on_pause ();
    │ │ │ │     virtual bool on_resume ();
    │ │ │ │     virtual void on_files_checked ();
    │ │ │ │     virtual void on_state (torrent_status::state_t);
    │ │ │ │     virtual void on_add_peer (tcp::endpoint const&,
    │ │ │ │        peer_source_flags_t, add_peer_flags_t);
    │ │ │ │ @@ -5311,33 +5311,33 @@
    │ │ │ │  to it, use weak_ptr.

    │ │ │ │

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

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

    on_piece_failed() on_piece_pass()

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

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

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

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

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

    │ │ │ │

    type()

    │ │ │ │
    │ │ │ │ @@ -5499,39 +5499,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_choke() on_have_none() on_have_all() on_dont_have() on_have() on_allowed_fast() on_not_interested() on_interested() on_bitfield() on_unchoke()

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

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

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

    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]
    │ │ │ │ @@ -5543,25 +5543,25 @@ │ │ │ │ │ │ │ │

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

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

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

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

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

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

    called after a choke message has been sent to the peer

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

    sent_payload()

    │ │ │ │ @@ -5604,16 +5604,16 @@ │ │ │ │ │ │ │ │

    this is not called for web seeds

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

    on_piece_failed() on_piece_pass()

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

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

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

    tick()

    │ │ │ │
    │ │ │ │ @@ -5633,16 +5633,16 @@
    │ │ │ │  
    │ │ │ │
    │ │ │ │

    crypto_plugin

    │ │ │ │

    Declared in "libtorrent/extensions.hpp"

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

    decrypt()

    │ │ │ │
    │ │ │ │ @@ -5666,50 +5666,50 @@
    │ │ │ │  connection object, to be used by plugins. This is a low level interface that
    │ │ │ │  may not be stable across libtorrent versions

    │ │ │ │
    │ │ │ │  struct peer_connection_handle
    │ │ │ │  {
    │ │ │ │     explicit peer_connection_handle (std::weak_ptr<peer_connection> impl);
    │ │ │ │     connection_type type () const;
    │ │ │ │ -   void add_extension (std::shared_ptr<peer_plugin>);
    │ │ │ │     peer_plugin const* find_plugin (string_view type) const;
    │ │ │ │ +   void add_extension (std::shared_ptr<peer_plugin>);
    │ │ │ │     bool is_seed () const;
    │ │ │ │     bool upload_only () const;
    │ │ │ │ -   peer_id const& pid () const;
    │ │ │ │     bool has_piece (piece_index_t i) const;
    │ │ │ │ +   peer_id const& pid () const;
    │ │ │ │     bool is_interesting () const;
    │ │ │ │     bool is_choked () const;
    │ │ │ │ -   bool has_peer_choked () const;
    │ │ │ │     bool is_peer_interested () const;
    │ │ │ │ -   void maybe_unchoke_this_peer ();
    │ │ │ │ +   bool has_peer_choked () const;
    │ │ │ │     void choke_this_peer ();
    │ │ │ │ +   void maybe_unchoke_this_peer ();
    │ │ │ │     void get_peer_info (peer_info& p) const;
    │ │ │ │     torrent_handle associated_torrent () const;
    │ │ │ │ -   tcp::endpoint const& remote () const;
    │ │ │ │     tcp::endpoint local_endpoint () const;
    │ │ │ │ -   bool is_connecting () const;
    │ │ │ │ +   tcp::endpoint const& remote () const;
    │ │ │ │     bool is_outgoing () const;
    │ │ │ │ +   bool is_disconnecting () const;
    │ │ │ │ +   bool is_connecting () const;
    │ │ │ │     void disconnect (error_code const& ec, operation_t op
    │ │ │ │        , disconnect_severity_t = peer_connection_interface::normal);
    │ │ │ │ -   bool is_disconnecting () const;
    │ │ │ │     bool on_local_network () const;
    │ │ │ │     bool ignore_unchoke_slots () const;
    │ │ │ │     bool failed () const;
    │ │ │ │ -   bool should_log (peer_log_alert::direction_t direction) const;
    │ │ │ │     void peer_log (peer_log_alert::direction_t direction
    │ │ │ │        , char const* event, char const* fmt = "", ...) const TORRENT_FORMAT(4,5);
    │ │ │ │ +   bool 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"

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

    create_ut_pex_plugin()

    │ │ │ │

    Declared in "libtorrent/extensions/ut_pex.hpp"

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

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

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

    add_file_borrow() add_file()

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

    Adds a file to the file storage. The add_file_borrow version │ │ │ │ expects that filename is the file name (without a path) of │ │ │ │ @@ -6026,21 +6026,21 @@ │ │ │ │ [report issue]

    │ │ │ │
    │ │ │ │

    total_size()

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

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

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

    set_num_pieces() num_pieces()

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

    num_pieces() set_num_pieces()

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

    set and get the number of pieces in the torrent

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

    end_piece()

    │ │ │ │
    │ │ │ │  piece_index_t end_piece () const;
    │ │ │ │ @@ -6060,18 +6060,18 @@
    │ │ │ │  

    piece_range()

    │ │ │ │
    │ │ │ │  index_range<piece_index_t> piece_range () const noexcept;
    │ │ │ │  
    │ │ │ │

    returns an implementation-defined type that can be used as the │ │ │ │ container in a range-for loop. Where the values are the indices of all │ │ │ │ pieces in the file_storage.

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

    set_piece_length() piece_length()

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

    piece_length() set_piece_length()

    │ │ │ │
    │ │ │ │  int piece_length () const;
    │ │ │ │  void set_piece_length (int l);
    │ │ │ │  
    │ │ │ │

    set and get the size of each piece in this torrent. It must be a power of two │ │ │ │ and at least 16 kiB.

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

    blocks_in_piece2()

    │ │ │ │
    │ │ │ │  int blocks_in_piece2 (piece_index_t index) const;
    │ │ │ │  
    │ │ │ │

    returns the number of blocks in the specified piece, for v2 torrents.

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

    name() set_name()

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

    set_name() name()

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

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

    │ │ │ │ [report issue]
    │ │ │ │ @@ -6121,36 +6121,36 @@ │ │ │ │

    canonicalize()

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

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

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

    file_num_blocks() file_piece_range() file_num_pieces()

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

    file_num_blocks() file_num_pieces() file_piece_range()

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

    Returns the number of pieces or blocks the file at index spans, │ │ │ │ under the assumption that the file is aligned to the start of a piece. │ │ │ │ This is only meaningful for v2 torrents, where files are guaranteed │ │ │ │ such alignment. │ │ │ │ These numbers are used to size and navigate the merkle hash tree for │ │ │ │ each file.

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

    file_first_piece_node() file_first_block_node()

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

    file_first_block_node() file_first_piece_node()

    │ │ │ │
    │ │ │ │  int file_first_block_node (file_index_t index) const;
    │ │ │ │  int file_first_piece_node (file_index_t index) const;
    │ │ │ │  
    │ │ │ │

    index of first piece node in the merkle tree

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │ @@ -6229,21 +6229,21 @@ │ │ │ │

    file_absolute_path()

    │ │ │ │
    │ │ │ │  bool file_absolute_path (file_index_t index) const;
    │ │ │ │  
    │ │ │ │

    returns true if the file at the specified index has been renamed to │ │ │ │ have an absolute path, i.e. is not anchored in the save path of the │ │ │ │ torrent.

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

    file_index_at_piece() file_index_at_offset()

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

    file_index_at_offset() file_index_at_piece()

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

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

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

    file_index_for_root()

    │ │ │ │
    │ │ │ │  file_index_t file_index_for_root (sha256_hash const& root_hash) const;
    │ │ │ │ @@ -6480,38 +6480,38 @@
    │ │ │ │  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 const*) = delete;
    │ │ │ │ +   client_data_t& operator= (void*) = delete;
    │ │ │ │     operator void const* () const = delete;
    │ │ │ │     operator void* () const = delete;
    │ │ │ │ -   client_data_t& operator= (void*) = 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*() operator=() void*()

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

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

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

    we don't allow type-unsafe operations

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

    add_torrent_params

    │ │ │ │

    Declared in "libtorrent/add_torrent_params.hpp"

    │ │ │ │ @@ -6896,16 +6896,16 @@ │ │ │ │ peer-classes from peers. It is applied after the peer class filter is applied (which │ │ │ │ is based on the peer's IP address).

    │ │ │ │
    │ │ │ │  struct peer_class_type_filter
    │ │ │ │  {
    │ │ │ │     void add (socket_type_t const st, peer_class_t const peer_class);
    │ │ │ │     void remove (socket_type_t const st, peer_class_t const peer_class);
    │ │ │ │ -   void disallow (socket_type_t const st, peer_class_t const peer_class);
    │ │ │ │     void allow (socket_type_t const st, peer_class_t const peer_class);
    │ │ │ │ +   void disallow (socket_type_t const st, peer_class_t const peer_class);
    │ │ │ │     std::uint32_t apply (socket_type_t const st, std::uint32_t peer_class_mask);
    │ │ │ │     friend bool operator== (peer_class_type_filter const& lhs
    │ │ │ │        , peer_class_type_filter const& rhs);
    │ │ │ │  
    │ │ │ │     enum socket_type_t
    │ │ │ │     {
    │ │ │ │        tcp_socket,
    │ │ │ │ @@ -6922,21 +6922,21 @@
    │ │ │ │  

    remove() add()

    │ │ │ │
    │ │ │ │  void add (socket_type_t const st, peer_class_t const peer_class);
    │ │ │ │  void remove (socket_type_t const st, peer_class_t const peer_class);
    │ │ │ │  
    │ │ │ │

    add() and remove() adds and removes a peer class to be added │ │ │ │ to new peers based on socket type.

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

    allow() disallow()

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

    disallow() allow()

    │ │ │ │
    │ │ │ │ -void disallow (socket_type_t const st, peer_class_t const peer_class);
    │ │ │ │  void allow (socket_type_t const st, peer_class_t const peer_class);
    │ │ │ │ +void disallow (socket_type_t const st, peer_class_t const peer_class);
    │ │ │ │  
    │ │ │ │

    disallow() and allow() adds and removes a peer class to be │ │ │ │ removed from new peers based on socket type.

    │ │ │ │

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

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │ @@ -7014,17 +7014,17 @@ │ │ │ │ │ │ │ │ unsigned bytes_progress:15; │ │ │ │ unsigned block_size:15; │ │ │ │ unsigned state:2; │ │ │ │ unsigned num_peers:14; │ │ │ │ }; │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -

    peer() set_peer()

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

    set_peer() peer()

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

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

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

    get_download_queue() returns a vector with information about pieces │ │ │ │ that are partially downloaded or not downloaded but partially │ │ │ │ requested. See partial_piece_info for the fields in the returned │ │ │ │ vector.

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

    clear_piece_deadlines() set_piece_deadline() reset_piece_deadline()

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

    set_piece_deadline() reset_piece_deadline() clear_piece_deadlines()

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

    This function sets or resets the deadline associated with a specific │ │ │ │ piece index (index). libtorrent will attempt to download this │ │ │ │ entire piece before the deadline expires. This is not necessarily │ │ │ │ possible, but pieces with a more recent deadline will always be │ │ │ │ prioritized over pieces with a deadline further ahead in time. The │ │ │ │ deadline (and flags) of a piece can be changed by calling this │ │ │ │ @@ -7401,16 +7401,16 @@ │ │ │ │ priority.

    │ │ │ │

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

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

    file_progress()

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

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

    │ │ │ │

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

    │ │ │ │

    clear_error()

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

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

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

    replace_trackers() add_tracker() trackers()

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

    add_tracker() replace_trackers() trackers()

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

    trackers() will return the list of trackers for this torrent. The │ │ │ │ announce entry contains both a string url which specify the │ │ │ │ announce url for the tracker as well as an int tier, which is │ │ │ │ specifies the order in which this tracker is tried. If you want │ │ │ │ libtorrent to use another list of trackers for this torrent, you can │ │ │ │ @@ -7471,36 +7471,36 @@ │ │ │ │ data will replace the original ones.

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

    remove_url_seed() add_url_seed() url_seeds()

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

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

    │ │ │ │

    See http seeding for more information.

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

    add_http_seed() http_seeds() remove_http_seed()

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

    http_seeds() add_http_seed() remove_http_seed()

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

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

    │ │ │ │

    See http seeding for more information.

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

    add_extension()

    │ │ │ │ @@ -7542,21 +7542,21 @@ │ │ │ │ afterward.

    │ │ │ │

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

    │ │ │ │

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

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

    resume() pause()

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

    pause() resume()

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

    pause(), and resume() will disconnect all peers and reconnect │ │ │ │ all peers respectively. When a torrent is paused, it will however │ │ │ │ remember all share ratios to all peers and remember all potential (not │ │ │ │ connected) peers. Torrents may be paused automatically if there is a │ │ │ │ file error (e.g. disk full) or something similar. See │ │ │ │ file_error_alert.

    │ │ │ │ @@ -7567,24 +7567,24 @@ │ │ │ │
    │ │ │ │

    Note

    │ │ │ │

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

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

    unset_flags() flags() set_flags()

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

    set_flags() flags() unset_flags()

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

    sets and gets the torrent state flags. See torrent_flags_t. │ │ │ │ The set_flags overload that take a mask will affect all │ │ │ │ flags part of the mask, and set their values to what the │ │ │ │ flags argument is set to. This allows clearing and │ │ │ │ setting flags in a single function call. │ │ │ │ The set_flags overload that just takes flags, sets all │ │ │ │ @@ -7735,27 +7735,27 @@ │ │ │ │

    │ │ │ │

    Note

    │ │ │ │

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

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

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

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

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

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

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

    │ │ │ │

    When a torrent is removed or turns into a seed, all torrents with │ │ │ │ greater queue positions have their positions decreased to fill in the │ │ │ │ @@ -7779,21 +7779,21 @@ │ │ │ │ of all other torrents remain intact but their numerical queue position │ │ │ │ shifts to make space for this torrent's new position

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

    set_ssl_certificate_buffer() set_ssl_certificate()

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

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

    │ │ │ │

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

    │ │ │ │

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

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

    │ │ │ │

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

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

    torrent_file() torrent_file_with_hashes()

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

    torrent_file_with_hashes() torrent_file()

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

    torrent_file() returns a pointer to the torrent_info object │ │ │ │ associated with this torrent. The torrent_info object may be a copy │ │ │ │ of the internal object. If the torrent doesn't have metadata, the │ │ │ │ @@ -7868,25 +7868,25 @@ │ │ │ │

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

    │ │ │ │

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

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

    prioritize_pieces() get_piece_priorities() piece_priority()

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

    get_piece_priorities() piece_priority() prioritize_pieces()

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

    These functions are used to set and get the priority of individual │ │ │ │ pieces. By default all pieces have priority 4. That means that the │ │ │ │ random rarest first algorithm is effectively active for all pieces. │ │ │ │ You may however change the priority of individual pieces. There are 8 │ │ │ │ priority levels. 0 means not to download the piece at all. Otherwise, │ │ │ │ lower priority values means less likely to be picked. Piece priority │ │ │ │ @@ -7908,24 +7908,24 @@ │ │ │ │ Invalid entries, where the piece index or priority is out of range, are │ │ │ │ not allowed.

    │ │ │ │

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

    │ │ │ │

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

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

    prioritize_files() file_priority() get_file_priorities()

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

    get_file_priorities() file_priority() prioritize_files()

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

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

    │ │ │ │

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

    │ │ │ │

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

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

    │ │ │ │

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

    │ │ │ │

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

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

    force_dht_announce() force_lsd_announce() force_reannounce()

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

    force_reannounce() force_dht_announce() force_lsd_announce()

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

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

    │ │ │ │

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

    │ │ │ │

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

    │ │ │ │

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

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

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

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

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

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

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

    │ │ │ │

    max_uploads() returns the current settings.

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

    set_max_connections() max_connections()

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

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

    rename_file()

    │ │ │ │
    │ │ │ │  void rename_file (file_index_t index, std::string const& new_name) const;
    │ │ │ │  
    │ │ │ │

    Renames the file with the given index asynchronously. The rename │ │ │ │ operation is complete when either a file_renamed_alert or │ │ │ │ file_rename_failed_alert is posted.

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

    info_hash() info_hashes()

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

    info_hashes() info_hash()

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

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

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

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

    │ │ │ │ +

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

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

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

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

    id()

    │ │ │ │ @@ -8433,18 +8433,18 @@ │ │ │ │

    remove_torrent()

    │ │ │ │
    │ │ │ │  virtual void remove_torrent (storage_index_t) = 0;
    │ │ │ │  
    │ │ │ │

    remove the storage with the specified index. This is not expected to │ │ │ │ delete any files from disk, just to clean up any resources associated │ │ │ │ with the specified storage.

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

    async_write() async_read()

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

    async_read() async_write()

    │ │ │ │
    │ │ │ │  virtual void async_read (storage_index_t storage, peer_request const& r
    │ │ │ │        , std::function<void(disk_buffer_holder, storage_error const&)> handler
    │ │ │ │        , disk_job_flags_t flags = {}) = 0;
    │ │ │ │  virtual bool async_write (storage_index_t storage, peer_request const& r
    │ │ │ │        , char const* buf, std::shared_ptr<disk_observer> o
    │ │ │ │        , std::function<void(storage_error const&)> handler
    │ │ │ │ @@ -8703,22 +8703,22 @@
    │ │ │ │  internal libtorrent torrent object to tie the storage object allocated
    │ │ │ │  for a torrent to the lifetime of the internal torrent object. When a
    │ │ │ │  torrent is removed from the session, this holder is destructed and will
    │ │ │ │  inform the disk object.

    │ │ │ │
    │ │ │ │  struct storage_holder
    │ │ │ │  {
    │ │ │ │ -   ~storage_holder ();
    │ │ │ │ -   storage_holder () = default;
    │ │ │ │     storage_holder (storage_index_t idx, disk_interface& disk_io);
    │ │ │ │ +   storage_holder () = default;
    │ │ │ │ +   ~storage_holder ();
    │ │ │ │     explicit operator bool () const;
    │ │ │ │     operator storage_index_t () const;
    │ │ │ │     void reset ();
    │ │ │ │ -   storage_holder (storage_holder const&) = delete;
    │ │ │ │     storage_holder& operator= (storage_holder const&) = delete;
    │ │ │ │ +   storage_holder (storage_holder const&) = delete;
    │ │ │ │     storage_holder (storage_holder&& rhs) noexcept;
    │ │ │ │     storage_holder& operator= (storage_holder&& rhs) noexcept;
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    disk_observer

    │ │ │ │ @@ -8758,18 +8758,18 @@ │ │ │ │

    The disk buffer holder acts like a unique_ptr that frees a disk buffer │ │ │ │ when it's destructed

    │ │ │ │

    If this buffer holder is moved-from, default constructed or reset, │ │ │ │ data() will return nullptr.

    │ │ │ │
    │ │ │ │  struct disk_buffer_holder
    │ │ │ │  {
    │ │ │ │ -   disk_buffer_holder (disk_buffer_holder&&) noexcept;
    │ │ │ │     disk_buffer_holder& operator= (disk_buffer_holder&&) & noexcept;
    │ │ │ │ -   disk_buffer_holder& operator= (disk_buffer_holder const&) = delete;
    │ │ │ │ +   disk_buffer_holder (disk_buffer_holder&&) noexcept;
    │ │ │ │     disk_buffer_holder (disk_buffer_holder const&) = delete;
    │ │ │ │ +   disk_buffer_holder& operator= (disk_buffer_holder const&) = delete;
    │ │ │ │     disk_buffer_holder (buffer_allocator_interface& alloc
    │ │ │ │        , char* buf, int sz) noexcept;
    │ │ │ │     disk_buffer_holder () noexcept = default;
    │ │ │ │     ~disk_buffer_holder ();
    │ │ │ │     char* data () const noexcept;
    │ │ │ │     void reset ();
    │ │ │ │     void swap (disk_buffer_holder& h) noexcept;
    │ │ │ │ @@ -8844,18 +8844,18 @@
    │ │ │ │  

    settings_interface

    │ │ │ │

    Declared in "libtorrent/settings_pack.hpp"

    │ │ │ │

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

    │ │ │ │
    │ │ │ │  struct settings_interface
    │ │ │ │  {
    │ │ │ │ -   virtual bool has_val (int name) const = 0;
    │ │ │ │ -   virtual void set_str (int name, std::string val) = 0;
    │ │ │ │     virtual void set_bool (int name, bool val) = 0;
    │ │ │ │ +   virtual void set_str (int name, std::string val) = 0;
    │ │ │ │     virtual void set_int (int name, int val) = 0;
    │ │ │ │ +   virtual bool has_val (int name) const = 0;
    │ │ │ │     virtual std::string const& get_str (int name) const = 0;
    │ │ │ │     virtual int get_int (int name) const = 0;
    │ │ │ │     virtual bool get_bool (int name) const = 0;
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │ @@ -9954,26 +9954,26 @@ │ │ │ │ torrent_handle::move_storage. This is useful to synchronize with the │ │ │ │ actual disk. The storage_path() member return the new path of the │ │ │ │ storage.

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

    storage_path() old_path()

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

    old_path() storage_path()

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

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

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

    storage_moved_failed_alert

    │ │ │ │

    Declared in "libtorrent/alert_types.hpp"

    │ │ │ │ @@ -11618,17 +11618,17 @@ │ │ │ │ std::vector<std::pair<sha1_hash, udp::endpoint>> nodes () const; │ │ │ │ int num_nodes () const; │ │ │ │ │ │ │ │ static constexpr alert_category_t static_category = alert_category::dht; │ │ │ │ sha1_hash node_id; │ │ │ │ }; │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -

    nodes() num_nodes()

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

    num_nodes() nodes()

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

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

    │ │ │ │ [report issue]
    │ │ │ │
    node_id
    │ │ │ │ @@ -11672,17 +11672,17 @@ │ │ │ │ static constexpr alert_category_t static_category = alert_category::dht_operation; │ │ │ │ sha1_hash node_id; │ │ │ │ aux::noexcept_movable<udp::endpoint> endpoint; │ │ │ │ time_duration const interval; │ │ │ │ int const num_infohashes; │ │ │ │ }; │ │ │ │ │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -

    num_samples() samples()

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

    samples() num_samples()

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

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

    │ │ │ │ @@ -11746,16 +11746,16 @@ │ │ │ │

    this alert is posted to indicate to the client that some alerts were │ │ │ │ dropped. Dropped meaning that the alert failed to be delivered to the │ │ │ │ client. The most common cause of such failure is that the internal alert │ │ │ │ queue grew too big (controlled by alert_queue_size).

    │ │ │ │
    │ │ │ │  struct alerts_dropped_alert final : alert
    │ │ │ │  {
    │ │ │ │ -   static_assert (num_alert_types <= abi_alert_count, "need to increase bitset. This is an ABI break");
    │ │ │ │     std::string message () const override;
    │ │ │ │ +   static_assert (num_alert_types <= abi_alert_count, "need to increase bitset. This is an ABI break");
    │ │ │ │  
    │ │ │ │     static constexpr alert_category_t static_category  = alert_category::error;
    │ │ │ │     std::bitset<abi_alert_count> dropped_alerts;
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ [report issue]
    │ │ │ │
    dropped_alerts
    │ │ │ │ @@ -11871,16 +11871,16 @@ │ │ │ │ and re-add it using this metadata │ │ │ │
    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    alert_cast()

    │ │ │ │

    Declared in "libtorrent/alert.hpp"

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

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

    │ │ │ │
    │ │ │ │

    Note

    │ │ │ │

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

    │ │ │ │ @@ -12361,20 +12361,20 @@ │ │ │ │ a single rule that allows all addresses (0.0.0.0 - 255.255.255.255 for │ │ │ │ the IPv4 range, and the equivalent range covering all addresses for the │ │ │ │ IPv6 range).

    │ │ │ │

    A default constructed ip_filter does not filter any address.

    │ │ │ │
    │ │ │ │  struct ip_filter
    │ │ │ │  {
    │ │ │ │ -   ~ip_filter ();
    │ │ │ │ -   ip_filter& operator= (ip_filter const&);
    │ │ │ │     ip_filter ();
    │ │ │ │ -   ip_filter (ip_filter&&);
    │ │ │ │ -   ip_filter& operator= (ip_filter&&);
    │ │ │ │ +   ip_filter& operator= (ip_filter const&);
    │ │ │ │     ip_filter (ip_filter const&);
    │ │ │ │ +   ip_filter& operator= (ip_filter&&);
    │ │ │ │ +   ip_filter (ip_filter&&);
    │ │ │ │ +   ~ip_filter ();
    │ │ │ │     bool empty () const;
    │ │ │ │     void add_rule (address const& first, address const& last, std::uint32_t flags);
    │ │ │ │     std::uint32_t access (address const& addr) const;
    │ │ │ │     filter_tuple_t export_filter () const;
    │ │ │ │  
    │ │ │ │     enum access_flags
    │ │ │ │     {
    │ │ │ │ @@ -12458,20 +12458,20 @@
    │ │ │ │  

    the port filter maps non-overlapping port ranges to flags. This │ │ │ │ is primarily used to indicate whether a range of ports should │ │ │ │ be connected to or not. The default is to have the full port │ │ │ │ range (0-65535) set to flag 0.

    │ │ │ │
    │ │ │ │  class port_filter
    │ │ │ │  {
    │ │ │ │ +   port_filter& operator= (port_filter const&);
    │ │ │ │ +   port_filter (port_filter&&);
    │ │ │ │ +   port_filter (port_filter const&);
    │ │ │ │     ~port_filter ();
    │ │ │ │ -   port_filter ();
    │ │ │ │     port_filter& operator= (port_filter&&);
    │ │ │ │ -   port_filter (port_filter const&);
    │ │ │ │ -   port_filter (port_filter&&);
    │ │ │ │ -   port_filter& operator= (port_filter const&);
    │ │ │ │ +   port_filter ();
    │ │ │ │     void add_rule (std::uint16_t first, std::uint16_t last, std::uint32_t flags);
    │ │ │ │     std::uint32_t access (std::uint16_t port) const;
    │ │ │ │  
    │ │ │ │     enum access_flags
    │ │ │ │     {
    │ │ │ │        blocked,
    │ │ │ │     };
    │ │ │ │ @@ -12547,38 +12547,38 @@
    │ │ │ │     entry (preformatted_type);
    │ │ │ │     entry (dictionary_type);
    │ │ │ │     entry (list_type);
    │ │ │ │     entry (integer_type);
    │ │ │ │     entry (U v);
    │ │ │ │     entry (data_type t);
    │ │ │ │     entry (bdecode_node const& n);
    │ │ │ │ -   entry& operator= (entry const&) &;
    │ │ │ │ -   entry& operator= (dictionary_type) &;
    │ │ │ │ -   entry& operator= (bdecode_node const&) &;
    │ │ │ │ -   entry& operator= (list_type) &;
    │ │ │ │ -   entry& operator= (preformatted_type) &;
    │ │ │ │     entry& operator= (entry&&) & noexcept;
    │ │ │ │ +   entry& operator= (bdecode_node const&) &;
    │ │ │ │     entry& operator= (integer_type) &;
    │ │ │ │ +   entry& operator= (preformatted_type) &;
    │ │ │ │     entry& operator= (span<char const>) &;
    │ │ │ │ +   entry& operator= (dictionary_type) &;
    │ │ │ │ +   entry& operator= (list_type) &;
    │ │ │ │ +   entry& operator= (entry const&) &;
    │ │ │ │     entry& operator= (U v) &;
    │ │ │ │ -   dictionary_type const& dict () const;
    │ │ │ │ +   preformatted_type const& preformatted () const;
    │ │ │ │ +   list_type const& list () const;
    │ │ │ │     integer_type const& integer () const;
    │ │ │ │ -   string_type& string ();
    │ │ │ │ -   list_type& list ();
    │ │ │ │     preformatted_type& preformatted ();
    │ │ │ │ -   string_type const& string () const;
    │ │ │ │     dictionary_type& dict ();
    │ │ │ │ +   dictionary_type const& dict () const;
    │ │ │ │ +   string_type const& string () const;
    │ │ │ │     integer_type& integer ();
    │ │ │ │ -   preformatted_type const& preformatted () const;
    │ │ │ │ -   list_type const& list () const;
    │ │ │ │ +   string_type& string ();
    │ │ │ │ +   list_type& list ();
    │ │ │ │     void swap (entry& e);
    │ │ │ │     entry const& operator[] (string_view key) const;
    │ │ │ │     entry& operator[] (string_view key);
    │ │ │ │ -   entry* find_key (string_view key);
    │ │ │ │     entry const* find_key (string_view key) const;
    │ │ │ │ +   entry* find_key (string_view key);
    │ │ │ │     std::string to_string (bool single_line = false) const;
    │ │ │ │  
    │ │ │ │     enum data_type
    │ │ │ │     {
    │ │ │ │        int_t,
    │ │ │ │        string_t,
    │ │ │ │        list_t,
    │ │ │ │ @@ -12622,43 +12622,43 @@
    │ │ │ │  entry (bdecode_node const& n);
    │ │ │ │  
    │ │ │ │

    construct from bdecode_node parsed form (see bdecode())

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

    operator=()

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

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

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

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

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

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

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

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

    │ │ │ │

    If you want to create an entry you give it the type you want it to │ │ │ │ @@ -12718,16 +12718,16 @@ │ │ │ │

    The const version of operator[] will only return a reference to an │ │ │ │ existing element at the given key. If the key is not found, it will │ │ │ │ throw system_error.

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

    find_key()

    │ │ │ │
    │ │ │ │ -entry* find_key (string_view key);
    │ │ │ │  entry const* find_key (string_view key) const;
    │ │ │ │ +entry* find_key (string_view key);
    │ │ │ │  
    │ │ │ │

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

    │ │ │ │

    They will look for an element at the given key in the dictionary, if │ │ │ │ the element cannot be found, they will return nullptr. If an element │ │ │ │ with the given key is found, the return a pointer to it.

    │ │ │ │ [report issue]
    │ │ │ │ @@ -12860,42 +12860,42 @@ │ │ │ │ .torrent file using bencode().

    │ │ │ │
    │ │ │ │  struct create_torrent
    │ │ │ │  {
    │ │ │ │     explicit create_torrent (torrent_info const& ti);
    │ │ │ │     explicit create_torrent (file_storage& fs, int piece_size = 0
    │ │ │ │        , create_flags_t flags = {});
    │ │ │ │ -   std::vector<char> generate_buf () const;
    │ │ │ │     entry generate () const;
    │ │ │ │ +   std::vector<char> generate_buf () const;
    │ │ │ │     file_storage const& files () const;
    │ │ │ │     void set_comment (char const* str);
    │ │ │ │     void set_creator (char const* str);
    │ │ │ │     void set_creation_date (std::time_t timestamp);
    │ │ │ │     void set_hash (piece_index_t index, sha1_hash const& h);
    │ │ │ │     void set_hash2 (file_index_t file, piece_index_t::diff_type piece, sha256_hash const& h);
    │ │ │ │     void add_http_seed (string_view url);
    │ │ │ │     void add_url_seed (string_view url);
    │ │ │ │     void add_node (std::pair<std::string, int> node);
    │ │ │ │     void add_tracker (string_view url, int tier = 0);
    │ │ │ │     void set_root_cert (string_view cert);
    │ │ │ │ -   void set_priv (bool p);
    │ │ │ │     bool priv () const;
    │ │ │ │ -   bool is_v2_only () const;
    │ │ │ │ +   void set_priv (bool p);
    │ │ │ │     bool is_v1_only () const;
    │ │ │ │ +   bool is_v2_only () const;
    │ │ │ │     int num_pieces () const;
    │ │ │ │     piece_index_t end_piece () const;
    │ │ │ │     index_range<piece_index_t> piece_range () const noexcept;
    │ │ │ │     file_index_t end_file () const;
    │ │ │ │     index_range<file_index_t> file_range () const noexcept;
    │ │ │ │     index_range<piece_index_t::diff_type> file_piece_range (file_index_t f);
    │ │ │ │     std::int64_t total_size () const;
    │ │ │ │     int piece_length () const;
    │ │ │ │     int piece_size (piece_index_t i) const;
    │ │ │ │ -   void add_similar_torrent (sha1_hash ih);
    │ │ │ │     void add_collection (string_view c);
    │ │ │ │ +   void add_similar_torrent (sha1_hash ih);
    │ │ │ │  
    │ │ │ │     static constexpr create_flags_t modification_time  = 2_bit;
    │ │ │ │     static constexpr create_flags_t symlinks  = 3_bit;
    │ │ │ │     static constexpr create_flags_t v2_only  = 5_bit;
    │ │ │ │     static constexpr create_flags_t v1_only  = 6_bit;
    │ │ │ │     static constexpr create_flags_t canonical_files  = 7_bit;
    │ │ │ │     static constexpr create_flags_t no_attributes  = 8_bit;
    │ │ │ │ @@ -12930,16 +12930,16 @@
    │ │ │ │  entire duration of the create_torrent object.

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

    generate_buf() generate()

    │ │ │ │
    │ │ │ │ -std::vector<char> generate_buf () const;
    │ │ │ │  entry generate () const;
    │ │ │ │ +std::vector<char> generate_buf () const;
    │ │ │ │  
    │ │ │ │

    This function will generate the .torrent file as a bencode tree, or a │ │ │ │ bencoded into a buffer. │ │ │ │ In order to encode the entry into a flat file, use the bencode() function.

    │ │ │ │

    The function returning an entry may be useful to add custom entries │ │ │ │ to the torrent file before bencoding it and saving it to disk.

    │ │ │ │

    Whether the resulting torrent object is v1, v2 or hybrid depends on │ │ │ │ @@ -13022,18 +13022,18 @@ │ │ │ │ 16 kiB blocks. Note that piece sizes must be powers-of-2, so all │ │ │ │ per-piece merkle trees are complete. │ │ │ │ A SHA-256 hash of all zeros is internally used to indicate a hash │ │ │ │ that has not been set. Setting such hash will not be considered set │ │ │ │ when calling generate(). │ │ │ │ This function will throw std::system_error if it is called on an │ │ │ │ object constructed with the v1_only flag.

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

    add_http_seed() add_url_seed()

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

    add_url_seed() add_http_seed()

    │ │ │ │
    │ │ │ │  void add_http_seed (string_view url);
    │ │ │ │  void add_url_seed (string_view url);
    │ │ │ │  
    │ │ │ │

    This adds a url seed to the torrent. You can have any number of url seeds. For a │ │ │ │ single file torrent, this should be an HTTP url, pointing to a file with identical │ │ │ │ content as the file of the torrent. For a multi-file torrent, it should point to │ │ │ │ @@ -13070,21 +13070,21 @@ │ │ │ │ │ │ │ │

    This function sets an X.509 certificate in PEM format to the torrent. This makes the │ │ │ │ torrent an SSL torrent. An SSL torrent requires that each peer has a valid certificate │ │ │ │ signed by this root certificate. For SSL torrents, all peers are connecting over SSL │ │ │ │ connections. For more information, see the section on ssl torrents.

    │ │ │ │

    The string is not the path to the cert, it's the actual content of the │ │ │ │ certificate.

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

    priv() set_priv()

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

    set_priv() priv()

    │ │ │ │
    │ │ │ │ -void set_priv (bool p);
    │ │ │ │  bool priv () const;
    │ │ │ │ +void set_priv (bool p);
    │ │ │ │  
    │ │ │ │

    Sets and queries the private flag of the torrent. │ │ │ │ Torrents with the private flag set ask the client to not use any other │ │ │ │ sources than the tracker for peers, and to not use DHT to advertise itself publicly, │ │ │ │ only the tracker.

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │ @@ -13119,32 +13119,32 @@ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │

    total_size()

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

    the total number of bytes of all files and pad files

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

    piece_size() piece_length()

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

    piece_length() piece_size()

    │ │ │ │
    │ │ │ │  int piece_length () const;
    │ │ │ │  int piece_size (piece_index_t i) const;
    │ │ │ │  
    │ │ │ │

    piece_length() returns the piece size of all pieces but the │ │ │ │ last one. piece_size() returns the size of the specified piece. │ │ │ │ these functions are just forwarding to the associated file_storage.

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

    add_similar_torrent() add_collection()

    │ │ │ │
    │ │ │ │ -void add_similar_torrent (sha1_hash ih);
    │ │ │ │  void add_collection (string_view c);
    │ │ │ │ +void add_similar_torrent (sha1_hash ih);
    │ │ │ │  
    │ │ │ │

    Add similar torrents (by info-hash) or collections of similar torrents. │ │ │ │ Similar torrents are expected to share some files with this torrent. │ │ │ │ Torrents sharing a collection name with this torrent are also expected │ │ │ │ to share files with this torrent. A torrent may have more than one │ │ │ │ collection and more than one similar torrents. For more information, │ │ │ │ see BEP 38.

    │ │ │ │ @@ -13209,17 +13209,17 @@ │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │
    │ │ │ │

    add_files()

    │ │ │ │

    Declared in "libtorrent/create_torrent.hpp"

    │ │ │ │
    │ │ │ │  void add_files (file_storage& fs, std::string const& file
    │ │ │ │ -   , create_flags_t flags = {});
    │ │ │ │ -void add_files (file_storage& fs, std::string const& file
    │ │ │ │     , std::function<bool(std::string)> p, create_flags_t flags = {});
    │ │ │ │ +void add_files (file_storage& fs, std::string const& file
    │ │ │ │ +   , create_flags_t flags = {});
    │ │ │ │  
    │ │ │ │

    Adds the file specified by path to the file_storage object. In case path │ │ │ │ refers to a directory, files will be added recursively from the directory.

    │ │ │ │

    If specified, the predicate p is called once for every file and directory that │ │ │ │ is encountered. Files for which p returns true are added, and directories for │ │ │ │ which p returns true are traversed. p must have the following signature:

    │ │ │ │
    │ │ │ │ @@ -13232,29 +13232,29 @@
    │ │ │ │  

    The flags argument should be the same as the flags passed to the create_torrent │ │ │ │ constructor.

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

    set_piece_hashes()

    │ │ │ │

    Declared in "libtorrent/create_torrent.hpp"

    │ │ │ │
    │ │ │ │ -inline void set_piece_hashes (create_torrent& t, std::string const& p
    │ │ │ │ -   , std::function<void(piece_index_t)> const& f);
    │ │ │ │  void set_piece_hashes (create_torrent& t, std::string const& p
    │ │ │ │     , settings_interface const& settings
    │ │ │ │     , std::function<void(piece_index_t)> const& f, error_code& ec);
    │ │ │ │ +inline void set_piece_hashes (create_torrent& t, std::string const& p);
    │ │ │ │  void set_piece_hashes (create_torrent& t, std::string const& p
    │ │ │ │     , std::function<void(piece_index_t)> const& f, error_code& ec);
    │ │ │ │ -void set_piece_hashes (create_torrent& t, std::string const& p
    │ │ │ │ -   , settings_interface const& settings, disk_io_constructor_type disk_io
    │ │ │ │ -   , std::function<void(piece_index_t)> const& f, error_code& ec);
    │ │ │ │  inline void set_piece_hashes (create_torrent& t, std::string const& p
    │ │ │ │ -   , settings_interface const& settings
    │ │ │ │     , std::function<void(piece_index_t)> const& f);
    │ │ │ │ -inline void set_piece_hashes (create_torrent& t, std::string const& p);
    │ │ │ │  inline void set_piece_hashes (create_torrent& t, std::string const& p, error_code& ec);
    │ │ │ │ +inline void set_piece_hashes (create_torrent& t, std::string const& p
    │ │ │ │ +   , settings_interface const& settings
    │ │ │ │ +   , std::function<void(piece_index_t)> const& f);
    │ │ │ │ +void set_piece_hashes (create_torrent& t, std::string const& p
    │ │ │ │ +   , settings_interface const& settings, disk_io_constructor_type disk_io
    │ │ │ │ +   , std::function<void(piece_index_t)> const& f, error_code& ec);
    │ │ │ │  
    │ │ │ │

    This function will assume that the files added to the torrent file exists at path │ │ │ │ p, read those files and hash the content and set the hashes in the create_torrent │ │ │ │ object. The optional function f is called in between every hash that is set. f │ │ │ │ must have the following signature:

    │ │ │ │
    │ │ │ │  void Fun(piece_index_t);
    │ │ │ │ @@ -13268,46 +13268,46 @@
    │ │ │ │  

    bitfield

    │ │ │ │

    Declared in "libtorrent/bitfield.hpp"

    │ │ │ │

    The bitfield type stores any number of bits as a bitfield │ │ │ │ in a heap allocated array.

    │ │ │ │
    │ │ │ │  struct bitfield
    │ │ │ │  {
    │ │ │ │ -   bitfield () noexcept = default;
    │ │ │ │     bitfield (int bits, bool val);
    │ │ │ │ -   bitfield (bitfield&& rhs) noexcept = default;
    │ │ │ │ -   explicit bitfield (int bits);
    │ │ │ │     bitfield (char const* b, int bits);
    │ │ │ │ +   explicit bitfield (int bits);
    │ │ │ │ +   bitfield (bitfield&& rhs) noexcept = default;
    │ │ │ │ +   bitfield () noexcept = default;
    │ │ │ │     bitfield (bitfield const& rhs);
    │ │ │ │     void assign (char const* b, int const bits);
    │ │ │ │     bool operator[] (int index) const noexcept;
    │ │ │ │     bool get_bit (int index) const noexcept;
    │ │ │ │     void clear_bit (int index) noexcept;
    │ │ │ │     void set_bit (int index) noexcept;
    │ │ │ │     bool all_set () const noexcept;
    │ │ │ │     bool none_set () const noexcept;
    │ │ │ │     int size () const noexcept;
    │ │ │ │     int num_words () const noexcept;
    │ │ │ │     bool empty () const noexcept;
    │ │ │ │ -   char* data () noexcept;
    │ │ │ │     char const* data () const noexcept;
    │ │ │ │ +   char* data () noexcept;
    │ │ │ │     void swap (bitfield& rhs) noexcept;
    │ │ │ │     int count () const noexcept;
    │ │ │ │     int find_first_set () const noexcept;
    │ │ │ │     int find_last_clear () const noexcept;
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ [report issue]
    │ │ │ │

    bitfield()

    │ │ │ │
    │ │ │ │ -bitfield () noexcept = default;
    │ │ │ │  bitfield (int bits, bool val);
    │ │ │ │ -bitfield (bitfield&& rhs) noexcept = default;
    │ │ │ │ -explicit bitfield (int bits);
    │ │ │ │  bitfield (char const* b, int bits);
    │ │ │ │ +explicit bitfield (int bits);
    │ │ │ │ +bitfield (bitfield&& rhs) noexcept = default;
    │ │ │ │ +bitfield () noexcept = default;
    │ │ │ │  bitfield (bitfield const& rhs);
    │ │ │ │  
    │ │ │ │

    constructs a new bitfield. The default constructor creates an empty │ │ │ │ bitfield. bits is the size of the bitfield (specified in bits). │ │ │ │ val is the value to initialize the bits to. If not specified │ │ │ │ all bits are initialized to 0.

    │ │ │ │

    The constructor taking a pointer b and bits copies a bitfield │ │ │ │ @@ -13317,27 +13317,27 @@ │ │ │ │

    │ │ │ │

    assign()

    │ │ │ │
    │ │ │ │  void assign (char const* b, int const bits);
    │ │ │ │  
    │ │ │ │

    copy bitfield from buffer b of bits number of bits, rounded up to │ │ │ │ the nearest byte boundary.

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

    get_bit() operator[]()

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

    operator[]() get_bit()

    │ │ │ │
    │ │ │ │  bool operator[] (int index) const noexcept;
    │ │ │ │  bool get_bit (int index) const noexcept;
    │ │ │ │  
    │ │ │ │

    query bit at index. Returns true if bit is 1, otherwise false.

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

    clear_bit() set_bit()

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

    set_bit() clear_bit()

    │ │ │ │
    │ │ │ │  void clear_bit (int index) noexcept;
    │ │ │ │  void set_bit (int index) noexcept;
    │ │ │ │  
    │ │ │ │

    set bit at index to 0 (clear_bit) or 1 (set_bit).

    │ │ │ │ [report issue]
    │ │ │ │
    │ │ │ │ @@ -13375,16 +13375,16 @@ │ │ │ │ bool empty () const noexcept; │ │ │ │
    │ │ │ │

    returns true if the bitfield has zero size.

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

    data()

    │ │ │ │
    │ │ │ │ -char* data () noexcept;
    │ │ │ │  char const* data () const noexcept;
    │ │ │ │ +char* data () noexcept;
    │ │ │ │  
    │ │ │ │

    returns a pointer to the internal buffer of the bitfield, or │ │ │ │ nullptr if it's empty.

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

    swap()

    │ │ │ │
    │ │ │ │ @@ -13430,41 +13430,41 @@
    │ │ │ │  

    The built-in software version of sha1-algorithm was implemented │ │ │ │ by Steve Reid and released as public domain. │ │ │ │ For more info, see src/sha1.cpp.

    │ │ │ │
    │ │ │ │  class hasher
    │ │ │ │  {
    │ │ │ │     hasher ();
    │ │ │ │ -   explicit hasher (span<char const> data);
    │ │ │ │     hasher (char const* data, int len);
    │ │ │ │ -   hasher& operator= (hasher const&) &;
    │ │ │ │     hasher (hasher const&);
    │ │ │ │ -   hasher& update (span<char const> data);
    │ │ │ │ +   explicit hasher (span<char const> data);
    │ │ │ │ +   hasher& operator= (hasher const&) &;
    │ │ │ │     hasher& update (char const* data, int len);
    │ │ │ │ +   hasher& update (span<char const> data);
    │ │ │ │     sha1_hash final ();
    │ │ │ │     void reset ();
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ - │ │ │ │ -[report issue]
    │ │ │ │ -

    hasher() operator=()

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

    operator=() hasher()

    │ │ │ │
    │ │ │ │ -explicit hasher (span<char const> data);
    │ │ │ │  hasher (char const* data, int len);
    │ │ │ │ -hasher& operator= (hasher const&) &;
    │ │ │ │  hasher (hasher const&);
    │ │ │ │ +explicit hasher (span<char const> data);
    │ │ │ │ +hasher& operator= (hasher const&) &;
    │ │ │ │  
    │ │ │ │

    this is the same as default constructing followed by a call to │ │ │ │ update(data, len).

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

    update()

    │ │ │ │
    │ │ │ │ -hasher& update (span<char const> data);
    │ │ │ │  hasher& update (char const* data, int len);
    │ │ │ │ +hasher& update (span<char const> data);
    │ │ │ │  
    │ │ │ │

    append the following bytes to what is being hashed

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

    final()

    │ │ │ │
    │ │ │ │  sha1_hash final ();
    │ │ │ │ @@ -13484,42 +13484,42 @@
    │ │ │ │  
    │ │ │ │

    hasher256

    │ │ │ │

    Declared in "libtorrent/hasher.hpp"

    │ │ │ │
    │ │ │ │  class hasher256
    │ │ │ │  {
    │ │ │ │     hasher256 ();
    │ │ │ │ +   hasher256 (char const* data, int len);
    │ │ │ │     explicit hasher256 (span<char const> data);
    │ │ │ │     hasher256& operator= (hasher256 const&) &;
    │ │ │ │     hasher256 (hasher256 const&);
    │ │ │ │ -   hasher256 (char const* data, int len);
    │ │ │ │ -   hasher256& update (char const* data, int len);
    │ │ │ │     hasher256& update (span<char const> data);
    │ │ │ │ +   hasher256& update (char const* data, int len);
    │ │ │ │     sha256_hash final ();
    │ │ │ │     void reset ();
    │ │ │ │     ~hasher256 ();
    │ │ │ │  };
    │ │ │ │  
    │ │ │ │ │ │ │ │ [report issue]
    │ │ │ │

    hasher256() operator=()

    │ │ │ │
    │ │ │ │ +hasher256 (char const* data, int len);
    │ │ │ │  explicit hasher256 (span<char const> data);
    │ │ │ │  hasher256& operator= (hasher256 const&) &;
    │ │ │ │  hasher256 (hasher256 const&);
    │ │ │ │ -hasher256 (char const* data, int len);
    │ │ │ │  
    │ │ │ │

    this is the same as default constructing followed by a call to │ │ │ │ update(data, len).

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

    update()

    │ │ │ │
    │ │ │ │ -hasher256& update (char const* data, int len);
    │ │ │ │  hasher256& update (span<char const> data);
    │ │ │ │ +hasher256& update (char const* data, int len);
    │ │ │ │  
    │ │ │ │

    append the following bytes to what is being hashed

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

    final()

    │ │ │ │
    │ │ │ │  sha256_hash final ();
    │ │ │ │ @@ -14203,18 +14203,18 @@
    │ │ │ │  

    announce_entry

    │ │ │ │

    Declared in "libtorrent/announce_entry.hpp"

    │ │ │ │

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

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

    operator=() ~announce_entry() announce_entry()

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

    ~announce_entry() operator=() announce_entry()

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

    constructs a tracker announce entry with u as the URL.

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

    enum tracker_source

    │ │ │ │

    Declared in "libtorrent/announce_entry.hpp"

    │ │ │ │ @@ -18770,18 +18770,18 @@ │ │ │ │ operations. This file size limit is specified in 16 kiB blocks.

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

    set_bool() set_str() set_int()

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

    set_str() set_bool() set_int()

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

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

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

    has_val()

    │ │ │ │ @@ -18895,18 +18895,18 @@ │ │ │ │
    │ │ │ │

    clear()

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

    clear a specific setting from the pack

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

    get_str() get_bool() get_int()

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

    get_str() get_int() get_bool()

    │ │ │ │
    │ │ │ │  std::string const& get_str (int name) const override;
    │ │ │ │  bool get_bool (int name) const override;
    │ │ │ │  int get_int (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 │ │ │ │ @@ -19337,16 +19337,16 @@ │ │ │ │ identify the version of your client.

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

    min_memory_usage() high_performance_seed()

    │ │ │ │

    Declared in "libtorrent/session.hpp"

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

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

    │ │ │ │

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

    │ │ │ │

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

    │ │ │ │

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

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

    name_for_setting() setting_by_name()

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

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

    non_owning()

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

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

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

    data_section() data_offset()

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

    data_offset() data_section()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    │ │ │ │ @@ -19558,25 +19558,25 @@ │ │ │ │
    │ │ │ │

    int_value()

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

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

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

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

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

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

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

    these functions are only valid if type() == string_t. They return │ │ │ │ the string values. Note that string_ptr() is not 0-terminated. │ │ │ │ string_length() returns the number of bytes in the string. │ │ │ │ string_offset() returns the byte offset from the start of the parsed │ │ │ │ bencoded buffer this string can be found.

    │ │ │ │ [report issue]
    │ │ │ │ @@ -19675,19 +19675,19 @@ │ │ │ │ that's returned.

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

    bdecode()

    │ │ │ │

    Declared in "libtorrent/bdecode.hpp"

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

    This function decodes/parses bdecoded data (for example a .torrent file). │ │ │ │ The data structure is returned in the ret argument. the buffer to parse │ │ │ │ is specified by the start of the buffer as well as the end, i.e. one │ │ │ │ byte past the end. If the buffer fails to parse, the function returns a │ │ │ │ @@ -20037,35 +20037,35 @@ │ │ │ │

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

    │ │ │ │

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

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

    write_resume_data_buf() write_resume_data()

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

    write_resume_data() write_resume_data_buf()

    │ │ │ │

    Declared in "libtorrent/write_resume_data.hpp"

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

    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, 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);
    │ │ │ │ -entry write_torrent_file (add_torrent_params const& atp);
    │ │ │ │ -entry write_torrent_file (add_torrent_params const& atp, write_torrent_flags_t flags);
    │ │ │ │  
    │ │ │ │

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

    │ │ │ │
      │ │ │ │
    • The add_torrent_params object passed to this function does not contain the │ │ │ │ info dictionary (the ti field)
    • │ │ │ │
    • The piece layers are not complete for all files that need them
    • │ │ │ │ ├── html2text {} │ │ │ │ │ @@ -27,86 +27,86 @@ │ │ │ │ │ * enum_socks_error_code │ │ │ │ │ * enum_pcp_errors │ │ │ │ │ * enum_error_code_enum │ │ │ │ │ * session_params │ │ │ │ │ o session_params() │ │ │ │ │ o session_params() │ │ │ │ │ * session_proxy │ │ │ │ │ - o ~session_proxy()_operator=()_session_proxy() │ │ │ │ │ + o session_proxy()_operator=()_~session_proxy() │ │ │ │ │ * session │ │ │ │ │ o session() │ │ │ │ │ o session() │ │ │ │ │ o ~session() │ │ │ │ │ o abort() │ │ │ │ │ * session_handle │ │ │ │ │ o is_valid() │ │ │ │ │ o session_state() │ │ │ │ │ - o refresh_torrent_status()_get_torrent_status() │ │ │ │ │ + o get_torrent_status()_refresh_torrent_status() │ │ │ │ │ o post_torrent_updates() │ │ │ │ │ o post_session_stats() │ │ │ │ │ o post_dht_stats() │ │ │ │ │ o set_dht_state() │ │ │ │ │ - o get_torrents()_find_torrent() │ │ │ │ │ - o add_torrent()_async_add_torrent() │ │ │ │ │ - o resume()_is_paused()_pause() │ │ │ │ │ + o find_torrent()_get_torrents() │ │ │ │ │ + o async_add_torrent()_add_torrent() │ │ │ │ │ + o is_paused()_pause()_resume() │ │ │ │ │ o is_dht_running() │ │ │ │ │ o set_dht_storage() │ │ │ │ │ o add_dht_node() │ │ │ │ │ o dht_get_item() │ │ │ │ │ o dht_get_item() │ │ │ │ │ o dht_put_item() │ │ │ │ │ o dht_put_item() │ │ │ │ │ - o dht_announce()_dht_get_peers() │ │ │ │ │ + o dht_get_peers()_dht_announce() │ │ │ │ │ o dht_live_nodes() │ │ │ │ │ o dht_sample_infohashes() │ │ │ │ │ o dht_direct_request() │ │ │ │ │ o add_extension() │ │ │ │ │ o set_ip_filter()_get_ip_filter() │ │ │ │ │ o set_port_filter() │ │ │ │ │ - o is_listening()_listen_port()_ssl_listen_port() │ │ │ │ │ - o set_peer_class_filter()_get_peer_class_filter() │ │ │ │ │ + o ssl_listen_port()_listen_port()_is_listening() │ │ │ │ │ + o get_peer_class_filter()_set_peer_class_filter() │ │ │ │ │ o set_peer_class_type_filter()_get_peer_class_type_filter() │ │ │ │ │ o create_peer_class() │ │ │ │ │ o delete_peer_class() │ │ │ │ │ - o get_peer_class()_set_peer_class() │ │ │ │ │ + o set_peer_class()_get_peer_class() │ │ │ │ │ o remove_torrent() │ │ │ │ │ o apply_settings()_get_settings() │ │ │ │ │ - o pop_alerts()_set_alert_notify()_wait_for_alert() │ │ │ │ │ + o wait_for_alert()_pop_alerts()_set_alert_notify() │ │ │ │ │ o delete_port_mapping()_add_port_mapping() │ │ │ │ │ o reopen_network_sockets() │ │ │ │ │ o native_handle() │ │ │ │ │ - * read_session_params()_write_session_params_buf()_write_session_params() │ │ │ │ │ + * write_session_params_buf()_read_session_params()_write_session_params() │ │ │ │ │ * web_seed_entry │ │ │ │ │ o operator==() │ │ │ │ │ o operator<() │ │ │ │ │ o enum_type_t │ │ │ │ │ * load_torrent_limits │ │ │ │ │ * torrent_info │ │ │ │ │ o torrent_info() │ │ │ │ │ o ~torrent_info() │ │ │ │ │ - o orig_files()_files() │ │ │ │ │ + o files()_orig_files() │ │ │ │ │ o rename_file() │ │ │ │ │ o remap_files() │ │ │ │ │ - o clear_trackers()_add_tracker()_trackers() │ │ │ │ │ + o add_tracker()_clear_trackers()_trackers() │ │ │ │ │ o collections()_similar_torrents() │ │ │ │ │ - o add_http_seed()_set_web_seeds()_add_url_seed()_web_seeds() │ │ │ │ │ + o set_web_seeds()_add_url_seed()_add_http_seed()_web_seeds() │ │ │ │ │ o total_size() │ │ │ │ │ - o num_pieces()_piece_length() │ │ │ │ │ - o piece_range()_last_piece()_end_piece() │ │ │ │ │ - o info_hash()_info_hashes() │ │ │ │ │ + o piece_length()_num_pieces() │ │ │ │ │ + o last_piece()_end_piece()_piece_range() │ │ │ │ │ + o info_hashes()_info_hash() │ │ │ │ │ o v1()_v2() │ │ │ │ │ o num_files() │ │ │ │ │ o map_block() │ │ │ │ │ o map_file() │ │ │ │ │ o ssl_cert() │ │ │ │ │ o is_valid() │ │ │ │ │ o priv() │ │ │ │ │ o is_i2p() │ │ │ │ │ o piece_size() │ │ │ │ │ - o hash_for_piece()_hash_for_piece_ptr() │ │ │ │ │ + o hash_for_piece_ptr()_hash_for_piece() │ │ │ │ │ o name() │ │ │ │ │ o creation_date() │ │ │ │ │ o creator() │ │ │ │ │ o comment() │ │ │ │ │ o nodes() │ │ │ │ │ o add_node() │ │ │ │ │ o parse_info_section() │ │ │ │ │ @@ -120,15 +120,15 @@ │ │ │ │ │ o has()_has_v1()_has_v2() │ │ │ │ │ o get() │ │ │ │ │ o get_best() │ │ │ │ │ o for_each() │ │ │ │ │ * piece_block │ │ │ │ │ * peer_request │ │ │ │ │ o operator==() │ │ │ │ │ - * load_torrent_parsed()_load_torrent_file()_load_torrent_buffer() │ │ │ │ │ + * load_torrent_file()_load_torrent_buffer()_load_torrent_parsed() │ │ │ │ │ * make_magnet_uri() │ │ │ │ │ * parse_magnet_uri() │ │ │ │ │ * truncate_files() │ │ │ │ │ * version() │ │ │ │ │ * enum_socket_type_t │ │ │ │ │ * enum_protocol_version │ │ │ │ │ * enum_portmap_transport │ │ │ │ │ @@ -155,31 +155,31 @@ │ │ │ │ │ o on_tick() │ │ │ │ │ o get_unchoke_priority() │ │ │ │ │ o load_state() │ │ │ │ │ * torrent_plugin │ │ │ │ │ o new_connection() │ │ │ │ │ o on_piece_failed()_on_piece_pass() │ │ │ │ │ o tick() │ │ │ │ │ - o on_resume()_on_pause() │ │ │ │ │ + o on_pause()_on_resume() │ │ │ │ │ o on_files_checked() │ │ │ │ │ o on_state() │ │ │ │ │ o on_add_peer() │ │ │ │ │ * peer_plugin │ │ │ │ │ o type() │ │ │ │ │ o add_handshake() │ │ │ │ │ o on_disconnect() │ │ │ │ │ o on_connected() │ │ │ │ │ o on_handshake() │ │ │ │ │ o on_extension_handshake() │ │ │ │ │ - o on_request()_on_choke()_on_have_none()_on_have_all()_on_dont_have() │ │ │ │ │ - on_have()_on_allowed_fast()_on_not_interested()_on_interested() │ │ │ │ │ + o on_have_all()_on_allowed_fast()_on_request()_on_choke()_on_have() │ │ │ │ │ + on_interested()_on_have_none()_on_not_interested()_on_dont_have() │ │ │ │ │ on_bitfield()_on_unchoke() │ │ │ │ │ o on_piece() │ │ │ │ │ - o sent_have()_sent_unchoke()_sent_piece()_sent_not_interested() │ │ │ │ │ - sent_interested() │ │ │ │ │ + o sent_piece()_sent_interested()_sent_not_interested()_sent_unchoke() │ │ │ │ │ + sent_have() │ │ │ │ │ o sent_payload() │ │ │ │ │ o can_disconnect() │ │ │ │ │ o on_extended() │ │ │ │ │ o on_unknown_message() │ │ │ │ │ o on_piece_failed()_on_piece_pass() │ │ │ │ │ o tick() │ │ │ │ │ o write_request() │ │ │ │ │ @@ -198,115 +198,115 @@ │ │ │ │ │ o rename_file() │ │ │ │ │ o map_block() │ │ │ │ │ o map_file() │ │ │ │ │ o num_files() │ │ │ │ │ o end_file() │ │ │ │ │ o file_range() │ │ │ │ │ o total_size() │ │ │ │ │ - o set_num_pieces()_num_pieces() │ │ │ │ │ + o num_pieces()_set_num_pieces() │ │ │ │ │ o end_piece() │ │ │ │ │ o last_piece() │ │ │ │ │ o piece_range() │ │ │ │ │ - o set_piece_length()_piece_length() │ │ │ │ │ + o piece_length()_set_piece_length() │ │ │ │ │ o piece_size() │ │ │ │ │ o piece_size2() │ │ │ │ │ o blocks_in_piece2() │ │ │ │ │ - o name()_set_name() │ │ │ │ │ + o set_name()_name() │ │ │ │ │ o swap() │ │ │ │ │ o canonicalize() │ │ │ │ │ - o file_offset()_hash()_symlink()_root()_pad_file_at()_file_path() │ │ │ │ │ - file_size()_mtime()_file_name()_root_ptr() │ │ │ │ │ - o file_num_blocks()_file_piece_range()_file_num_pieces() │ │ │ │ │ - o file_first_piece_node()_file_first_block_node() │ │ │ │ │ + o file_offset()_file_path()_pad_file_at()_file_name()_symlink() │ │ │ │ │ + file_size()_mtime()_root()_root_ptr()_hash() │ │ │ │ │ + o file_num_blocks()_file_num_pieces()_file_piece_range() │ │ │ │ │ + o file_first_block_node()_file_first_piece_node() │ │ │ │ │ o file_path_hash() │ │ │ │ │ o all_path_hashes() │ │ │ │ │ o file_flags() │ │ │ │ │ o file_absolute_path() │ │ │ │ │ - o file_index_at_piece()_file_index_at_offset() │ │ │ │ │ + o file_index_at_offset()_file_index_at_piece() │ │ │ │ │ o file_index_for_root() │ │ │ │ │ o piece_index_at_file() │ │ │ │ │ o sanitize_symlinks() │ │ │ │ │ o v2() │ │ │ │ │ * storage_params │ │ │ │ │ * disabled_disk_io_constructor() │ │ │ │ │ * mmap_disk_io_constructor() │ │ │ │ │ * posix_disk_io_constructor() │ │ │ │ │ * default_disk_io_constructor() │ │ │ │ │ * enum_storage_mode_t │ │ │ │ │ * enum_status_t │ │ │ │ │ * enum_move_flags_t │ │ │ │ │ * client_data_t │ │ │ │ │ o client_data_t() │ │ │ │ │ - o const*()_operator=()_void*() │ │ │ │ │ + o void*()_operator=()_const*() │ │ │ │ │ * add_torrent_params │ │ │ │ │ * peer_class_info │ │ │ │ │ * peer_class_type_filter │ │ │ │ │ o remove()_add() │ │ │ │ │ - o allow()_disallow() │ │ │ │ │ + o disallow()_allow() │ │ │ │ │ o apply() │ │ │ │ │ o enum_socket_type_t │ │ │ │ │ * block_info │ │ │ │ │ - o peer()_set_peer() │ │ │ │ │ + o set_peer()_peer() │ │ │ │ │ o enum_block_state_t │ │ │ │ │ * partial_piece_info │ │ │ │ │ * torrent_handle │ │ │ │ │ o torrent_handle() │ │ │ │ │ o add_piece() │ │ │ │ │ o read_piece() │ │ │ │ │ o have_piece() │ │ │ │ │ o get_peer_info() │ │ │ │ │ o status() │ │ │ │ │ o get_download_queue() │ │ │ │ │ - o clear_piece_deadlines()_set_piece_deadline()_reset_piece_deadline() │ │ │ │ │ + o set_piece_deadline()_reset_piece_deadline()_clear_piece_deadlines() │ │ │ │ │ o file_progress() │ │ │ │ │ o file_status() │ │ │ │ │ o clear_error() │ │ │ │ │ - o replace_trackers()_add_tracker()_trackers() │ │ │ │ │ + o add_tracker()_replace_trackers()_trackers() │ │ │ │ │ o remove_url_seed()_add_url_seed()_url_seeds() │ │ │ │ │ - o add_http_seed()_http_seeds()_remove_http_seed() │ │ │ │ │ + o http_seeds()_add_http_seed()_remove_http_seed() │ │ │ │ │ o add_extension() │ │ │ │ │ o set_metadata() │ │ │ │ │ o is_valid() │ │ │ │ │ - o resume()_pause() │ │ │ │ │ - o unset_flags()_flags()_set_flags() │ │ │ │ │ + o pause()_resume() │ │ │ │ │ + o set_flags()_flags()_unset_flags() │ │ │ │ │ o flush_cache() │ │ │ │ │ o force_recheck() │ │ │ │ │ o save_resume_data() │ │ │ │ │ o need_save_resume_data() │ │ │ │ │ - o queue_position()_queue_position_down()_queue_position_top() │ │ │ │ │ - queue_position_up()_queue_position_bottom() │ │ │ │ │ + o queue_position_top()_queue_position_bottom()_queue_position_down() │ │ │ │ │ + queue_position_up()_queue_position() │ │ │ │ │ o queue_position_set() │ │ │ │ │ o set_ssl_certificate_buffer()_set_ssl_certificate() │ │ │ │ │ - o torrent_file()_torrent_file_with_hashes() │ │ │ │ │ + o torrent_file_with_hashes()_torrent_file() │ │ │ │ │ o piece_layers() │ │ │ │ │ o piece_availability() │ │ │ │ │ - o prioritize_pieces()_get_piece_priorities()_piece_priority() │ │ │ │ │ - o prioritize_files()_file_priority()_get_file_priorities() │ │ │ │ │ - o force_dht_announce()_force_lsd_announce()_force_reannounce() │ │ │ │ │ + o get_piece_priorities()_piece_priority()_prioritize_pieces() │ │ │ │ │ + o get_file_priorities()_file_priority()_prioritize_files() │ │ │ │ │ + o force_reannounce()_force_dht_announce()_force_lsd_announce() │ │ │ │ │ o scrape_tracker() │ │ │ │ │ - o download_limit()_set_download_limit()_set_upload_limit() │ │ │ │ │ - upload_limit() │ │ │ │ │ + o upload_limit()_set_upload_limit()_set_download_limit() │ │ │ │ │ + download_limit() │ │ │ │ │ o connect_peer() │ │ │ │ │ o clear_peers() │ │ │ │ │ o set_max_uploads()_max_uploads() │ │ │ │ │ o set_max_connections()_max_connections() │ │ │ │ │ o move_storage() │ │ │ │ │ o rename_file() │ │ │ │ │ - o info_hash()_info_hashes() │ │ │ │ │ - o operator<()_operator==()_operator!=() │ │ │ │ │ + o info_hashes()_info_hash() │ │ │ │ │ + o operator<()_operator!=()_operator==() │ │ │ │ │ o id() │ │ │ │ │ o native_handle() │ │ │ │ │ o userdata() │ │ │ │ │ o in_session() │ │ │ │ │ * hash_value() │ │ │ │ │ * open_file_state │ │ │ │ │ * disk_interface │ │ │ │ │ o new_torrent() │ │ │ │ │ o remove_torrent() │ │ │ │ │ - o async_write()_async_read() │ │ │ │ │ + o async_read()_async_write() │ │ │ │ │ o async_hash() │ │ │ │ │ o async_hash2() │ │ │ │ │ o async_move_storage() │ │ │ │ │ o async_release_files() │ │ │ │ │ o async_check_files() │ │ │ │ │ o async_stop_torrent() │ │ │ │ │ o async_rename_file() │ │ │ │ │ @@ -377,15 +377,15 @@ │ │ │ │ │ * piece_finished_alert │ │ │ │ │ * request_dropped_alert │ │ │ │ │ * block_timeout_alert │ │ │ │ │ * block_finished_alert │ │ │ │ │ * block_downloading_alert │ │ │ │ │ * unwanted_block_alert │ │ │ │ │ * storage_moved_alert │ │ │ │ │ - o storage_path()_old_path() │ │ │ │ │ + o old_path()_storage_path() │ │ │ │ │ * storage_moved_failed_alert │ │ │ │ │ o file_path() │ │ │ │ │ * torrent_deleted_alert │ │ │ │ │ * torrent_delete_failed_alert │ │ │ │ │ * save_resume_data_alert │ │ │ │ │ * save_resume_data_failed_alert │ │ │ │ │ * torrent_paused_alert │ │ │ │ │ @@ -450,18 +450,18 @@ │ │ │ │ │ o pkt_buf() │ │ │ │ │ o enum_direction_t │ │ │ │ │ * dht_get_peers_reply_alert │ │ │ │ │ * dht_direct_response_alert │ │ │ │ │ * picker_log_alert │ │ │ │ │ * session_error_alert │ │ │ │ │ * dht_live_nodes_alert │ │ │ │ │ - o nodes()_num_nodes() │ │ │ │ │ + o num_nodes()_nodes() │ │ │ │ │ * session_stats_header_alert │ │ │ │ │ * dht_sample_infohashes_alert │ │ │ │ │ - o num_samples()_samples() │ │ │ │ │ + o samples()_num_samples() │ │ │ │ │ o num_nodes() │ │ │ │ │ o nodes() │ │ │ │ │ * block_uploaded_alert │ │ │ │ │ * alerts_dropped_alert │ │ │ │ │ * socks5_alert │ │ │ │ │ * file_prio_alert │ │ │ │ │ * oversized_file_alert │ │ │ │ │ @@ -489,15 +489,15 @@ │ │ │ │ │ o enum_access_flags │ │ │ │ │ * entry │ │ │ │ │ o type() │ │ │ │ │ o entry() │ │ │ │ │ o entry() │ │ │ │ │ o entry() │ │ │ │ │ o operator=() │ │ │ │ │ - o list()_string()_integer()_dict()_preformatted() │ │ │ │ │ + o integer()_preformatted()_dict()_list()_string() │ │ │ │ │ o swap() │ │ │ │ │ o operator[]() │ │ │ │ │ o find_key() │ │ │ │ │ o to_string() │ │ │ │ │ o enum_data_type │ │ │ │ │ * operator<<() │ │ │ │ │ * bencode() │ │ │ │ │ @@ -506,94 +506,94 @@ │ │ │ │ │ o generate_buf()_generate() │ │ │ │ │ o files() │ │ │ │ │ o set_comment() │ │ │ │ │ o set_creator() │ │ │ │ │ o set_creation_date() │ │ │ │ │ o set_hash() │ │ │ │ │ o set_hash2() │ │ │ │ │ - o add_http_seed()_add_url_seed() │ │ │ │ │ + o add_url_seed()_add_http_seed() │ │ │ │ │ o add_node() │ │ │ │ │ o add_tracker() │ │ │ │ │ o set_root_cert() │ │ │ │ │ - o priv()_set_priv() │ │ │ │ │ + o set_priv()_priv() │ │ │ │ │ o num_pieces() │ │ │ │ │ o piece_range() │ │ │ │ │ o file_range() │ │ │ │ │ o file_piece_range() │ │ │ │ │ o total_size() │ │ │ │ │ - o piece_size()_piece_length() │ │ │ │ │ + o piece_length()_piece_size() │ │ │ │ │ o add_similar_torrent()_add_collection() │ │ │ │ │ * add_files() │ │ │ │ │ * set_piece_hashes() │ │ │ │ │ * bitfield │ │ │ │ │ o bitfield() │ │ │ │ │ o assign() │ │ │ │ │ - o get_bit()_operator[]() │ │ │ │ │ - o clear_bit()_set_bit() │ │ │ │ │ + o operator[]()_get_bit() │ │ │ │ │ + o set_bit()_clear_bit() │ │ │ │ │ o all_set() │ │ │ │ │ o none_set() │ │ │ │ │ o size() │ │ │ │ │ o num_words() │ │ │ │ │ o empty() │ │ │ │ │ o data() │ │ │ │ │ o swap() │ │ │ │ │ o count() │ │ │ │ │ o find_first_set() │ │ │ │ │ o find_last_clear() │ │ │ │ │ * hasher │ │ │ │ │ - o hasher()_operator=() │ │ │ │ │ + o operator=()_hasher() │ │ │ │ │ o update() │ │ │ │ │ o final() │ │ │ │ │ o reset() │ │ │ │ │ * hasher256 │ │ │ │ │ o hasher256()_operator=() │ │ │ │ │ o update() │ │ │ │ │ o final() │ │ │ │ │ o reset() │ │ │ │ │ * torrent_status │ │ │ │ │ o operator==() │ │ │ │ │ o enum_state_t │ │ │ │ │ * announce_infohash │ │ │ │ │ * announce_endpoint │ │ │ │ │ * announce_entry │ │ │ │ │ - o operator=()_~announce_entry()_announce_entry() │ │ │ │ │ + o ~announce_entry()_operator=()_announce_entry() │ │ │ │ │ o enum_tracker_source │ │ │ │ │ * settings_pack │ │ │ │ │ - o set_bool()_set_str()_set_int() │ │ │ │ │ + o set_str()_set_bool()_set_int() │ │ │ │ │ o has_val() │ │ │ │ │ o clear() │ │ │ │ │ o clear() │ │ │ │ │ - o get_str()_get_bool()_get_int() │ │ │ │ │ + o get_str()_get_int()_get_bool() │ │ │ │ │ o enum_type_bases │ │ │ │ │ o enum_mmap_write_mode_t │ │ │ │ │ o enum_suggest_mode_t │ │ │ │ │ o enum_choking_algorithm_t │ │ │ │ │ o enum_seed_choking_algorithm_t │ │ │ │ │ o enum_io_buffer_mode_t │ │ │ │ │ o enum_bandwidth_mixed_algo_t │ │ │ │ │ o enum_enc_policy │ │ │ │ │ o enum_enc_level │ │ │ │ │ o enum_proxy_type_t │ │ │ │ │ * generate_fingerprint() │ │ │ │ │ * min_memory_usage()_high_performance_seed() │ │ │ │ │ - * name_for_setting()_setting_by_name() │ │ │ │ │ + * setting_by_name()_name_for_setting() │ │ │ │ │ * default_settings() │ │ │ │ │ * bdecode_node │ │ │ │ │ o bdecode_node() │ │ │ │ │ o bdecode_node()_operator=() │ │ │ │ │ o type() │ │ │ │ │ o bool() │ │ │ │ │ o non_owning() │ │ │ │ │ - o data_section()_data_offset() │ │ │ │ │ - o list_size()_list_int_value_at()_list_at()_list_string_value_at() │ │ │ │ │ - o dict_find_string_value()_dict_at_node()_dict_size() │ │ │ │ │ - dict_find_int_value()_dict_find_string()_dict_find()_dict_find_int │ │ │ │ │ - ()_dict_find_list()_dict_find_dict()_dict_at() │ │ │ │ │ + o data_offset()_data_section() │ │ │ │ │ + o list_size()_list_string_value_at()_list_at()_list_int_value_at() │ │ │ │ │ + o dict_find_int()_dict_find_string_value()_dict_find_dict() │ │ │ │ │ + dict_find_int_value()_dict_find_string()_dict_at()_dict_find_list() │ │ │ │ │ + dict_size()_dict_at_node()_dict_find() │ │ │ │ │ o int_value() │ │ │ │ │ - o string_ptr()_string_length()_string_value()_string_offset() │ │ │ │ │ + o string_length()_string_ptr()_string_offset()_string_value() │ │ │ │ │ o clear() │ │ │ │ │ o swap() │ │ │ │ │ o reserve() │ │ │ │ │ o switch_underlying_buffer() │ │ │ │ │ o has_soft_error() │ │ │ │ │ o enum_type_t │ │ │ │ │ * print_entry() │ │ │ │ │ @@ -613,16 +613,16 @@ │ │ │ │ │ o get_infohashes_sample() │ │ │ │ │ o tick() │ │ │ │ │ o counters() │ │ │ │ │ * sign_mutable_item() │ │ │ │ │ * dht_default_storage_constructor() │ │ │ │ │ * announce_flags_t │ │ │ │ │ * read_resume_data() │ │ │ │ │ - * write_resume_data_buf()_write_resume_data() │ │ │ │ │ - * write_torrent_file()_write_torrent_file_buf() │ │ │ │ │ + * write_resume_data()_write_resume_data_buf() │ │ │ │ │ + * write_torrent_file_buf()_write_torrent_file() │ │ │ │ │ * write_torrent_flags_t │ │ │ │ │ * ed25519_create_seed() │ │ │ │ │ * ed25519_create_keypair() │ │ │ │ │ * ed25519_sign() │ │ │ │ │ * ed25519_verify() │ │ │ │ │ * ed25519_add_scalar() │ │ │ │ │ * ed25519_key_exchange() │ │ │ │ │ @@ -630,29 +630,29 @@ │ │ │ │ │ ****** storage_error ****** │ │ │ │ │ Declared in "libtorrent/error_code.hpp" │ │ │ │ │ used by storage to return errors also includes which underlying file the error │ │ │ │ │ happened on │ │ │ │ │ struct storage_error │ │ │ │ │ { │ │ │ │ │ explicit operator bool () const; │ │ │ │ │ - file_index_t file () const; │ │ │ │ │ void file (file_index_t f); │ │ │ │ │ + file_index_t file () const; │ │ │ │ │ │ │ │ │ │ error_code ec; │ │ │ │ │ operation_t operation; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ***** bool() ***** │ │ │ │ │ explicit operator bool () const; │ │ │ │ │ explicitly converts to true if this object represents an error, and false if it │ │ │ │ │ does not. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** file() ***** │ │ │ │ │ -file_index_t file () const; │ │ │ │ │ void file (file_index_t f); │ │ │ │ │ +file_index_t file () const; │ │ │ │ │ set and query the index (in the torrent) of the file this error occurred on. │ │ │ │ │ This may also have special values defined in torrent_status. │ │ │ │ │ [report_issue] │ │ │ │ │ ec │ │ │ │ │ the error that occurred │ │ │ │ │ [report_issue] │ │ │ │ │ operation │ │ │ │ │ @@ -1234,18 +1234,18 @@ │ │ │ │ │ The session_params is a parameters pack for configuring the session before it's │ │ │ │ │ started. │ │ │ │ │ struct session_params │ │ │ │ │ { │ │ │ │ │ session_params (settings_pack&& sp); │ │ │ │ │ session_params (settings_pack const& sp); │ │ │ │ │ session_params (); │ │ │ │ │ - session_params (settings_pack&& sp │ │ │ │ │ - , std::vector> exts); │ │ │ │ │ session_params (settings_pack const& sp │ │ │ │ │ , std::vector> exts); │ │ │ │ │ + session_params (settings_pack&& sp │ │ │ │ │ + , std::vector> exts); │ │ │ │ │ │ │ │ │ │ settings_pack settings; │ │ │ │ │ std::vector> extensions; │ │ │ │ │ dht::dht_state dht_state; │ │ │ │ │ dht::dht_storage_constructor_type dht_storage_constructor; │ │ │ │ │ disk_io_constructor_type disk_io_constructor; │ │ │ │ │ std::map ext_state; │ │ │ │ │ @@ -1257,18 +1257,18 @@ │ │ │ │ │ session_params (settings_pack const& sp); │ │ │ │ │ session_params (); │ │ │ │ │ This constructor can be used to start with the default plugins (ut_metadata, │ │ │ │ │ ut_pex and smart_ban). Pass a settings_pack to set the initial settings when │ │ │ │ │ the session starts. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** session_params() ***** │ │ │ │ │ -session_params (settings_pack&& sp │ │ │ │ │ - , std::vector> exts); │ │ │ │ │ session_params (settings_pack const& sp │ │ │ │ │ , std::vector> exts); │ │ │ │ │ +session_params (settings_pack&& sp │ │ │ │ │ + , std::vector> exts); │ │ │ │ │ This constructor helps to configure the set of initial plugins to be added to │ │ │ │ │ the session before it's started. │ │ │ │ │ [report_issue] │ │ │ │ │ settings │ │ │ │ │ The settings to configure the session with │ │ │ │ │ [report_issue] │ │ │ │ │ extensions │ │ │ │ │ @@ -1299,29 +1299,29 @@ │ │ │ │ │ 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 const&) &; │ │ │ │ │ - ~session_proxy (); │ │ │ │ │ - session_proxy (); │ │ │ │ │ session_proxy (session_proxy&&) noexcept; │ │ │ │ │ - session_proxy& operator= (session_proxy&&) & noexcept; │ │ │ │ │ + ~session_proxy (); │ │ │ │ │ + session_proxy& operator= (session_proxy const&) &; │ │ │ │ │ session_proxy (session_proxy const&); │ │ │ │ │ + session_proxy& operator= (session_proxy&&) & noexcept; │ │ │ │ │ + session_proxy (); │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ -***** ~session_proxy() operator=() session_proxy() ***** │ │ │ │ │ -session_proxy& operator= (session_proxy const&) &; │ │ │ │ │ -~session_proxy (); │ │ │ │ │ -session_proxy (); │ │ │ │ │ +***** session_proxy() operator=() ~session_proxy() ***** │ │ │ │ │ session_proxy (session_proxy&&) noexcept; │ │ │ │ │ -session_proxy& operator= (session_proxy&&) & noexcept; │ │ │ │ │ +~session_proxy (); │ │ │ │ │ +session_proxy& operator= (session_proxy const&) &; │ │ │ │ │ session_proxy (session_proxy const&); │ │ │ │ │ +session_proxy& operator= (session_proxy&&) & noexcept; │ │ │ │ │ +session_proxy (); │ │ │ │ │ default constructor, does not refer to any session implementation object. │ │ │ │ │ [report_issue] │ │ │ │ │ ****** session ****** │ │ │ │ │ Declared in "libtorrent/session.hpp" │ │ │ │ │ The session holds all state that spans multiple torrents. Among other things it │ │ │ │ │ runs the network loop and manages all torrents. Once it's created, the session │ │ │ │ │ object will spawn the main thread that will do all the work. The main thread │ │ │ │ │ @@ -1335,17 +1335,17 @@ │ │ │ │ │ { │ │ │ │ │ explicit session (session_params const& params); │ │ │ │ │ session (session_params&& params, session_flags_t flags); │ │ │ │ │ session (); │ │ │ │ │ explicit session (session_params&& params); │ │ │ │ │ session (session_params const& params, session_flags_t flags); │ │ │ │ │ session (session_params const& params, io_context& ios); │ │ │ │ │ - session (session_params const& params, io_context& ios, session_flags_t); │ │ │ │ │ session (session_params&& params, io_context& ios, session_flags_t); │ │ │ │ │ session (session_params&& params, io_context& ios); │ │ │ │ │ + session (session_params const& params, io_context& ios, session_flags_t); │ │ │ │ │ ~session (); │ │ │ │ │ session_proxy abort (); │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ***** session() ***** │ │ │ │ │ explicit session (session_params const& params); │ │ │ │ │ session (session_params&& params, session_flags_t flags); │ │ │ │ │ @@ -1359,17 +1359,17 @@ │ │ │ │ │ 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 (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); │ │ │ │ │ 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. │ │ │ │ │ Warning │ │ │ │ │ The session object does not cleanly terminate with an external io_context. The │ │ │ │ │ @@ -1409,78 +1409,78 @@ │ │ │ │ │ operation on it will throw a system_error exception, with error code │ │ │ │ │ invalid_session_handle. │ │ │ │ │ struct session_handle │ │ │ │ │ { │ │ │ │ │ bool is_valid () const; │ │ │ │ │ session_params session_state (save_state_flags_t flags = │ │ │ │ │ save_state_flags_t::all()) const; │ │ │ │ │ + void refresh_torrent_status (std::vector* ret │ │ │ │ │ + , status_flags_t flags = {}) const; │ │ │ │ │ std::vector get_torrent_status ( │ │ │ │ │ std::function const& pred │ │ │ │ │ , status_flags_t flags = {}) const; │ │ │ │ │ - void refresh_torrent_status (std::vector* ret │ │ │ │ │ - , status_flags_t flags = {}) const; │ │ │ │ │ void post_torrent_updates (status_flags_t flags = status_flags_t::all()); │ │ │ │ │ void post_session_stats (); │ │ │ │ │ void post_dht_stats (); │ │ │ │ │ void set_dht_state (dht::dht_state&& st); │ │ │ │ │ void set_dht_state (dht::dht_state const& st); │ │ │ │ │ torrent_handle find_torrent (sha1_hash const& info_hash) const; │ │ │ │ │ std::vector get_torrents () const; │ │ │ │ │ torrent_handle add_torrent (add_torrent_params&& params); │ │ │ │ │ - void async_add_torrent (add_torrent_params&& params); │ │ │ │ │ - torrent_handle add_torrent (add_torrent_params&& params, error_code& ec); │ │ │ │ │ torrent_handle add_torrent (add_torrent_params const& params); │ │ │ │ │ torrent_handle add_torrent (add_torrent_params const& params, error_code& │ │ │ │ │ ec); │ │ │ │ │ void async_add_torrent (add_torrent_params const& params); │ │ │ │ │ - void pause (); │ │ │ │ │ - bool is_paused () const; │ │ │ │ │ + void async_add_torrent (add_torrent_params&& params); │ │ │ │ │ + torrent_handle add_torrent (add_torrent_params&& params, error_code& ec); │ │ │ │ │ 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 const& node); │ │ │ │ │ void dht_get_item (sha1_hash const& target); │ │ │ │ │ void dht_get_item (std::array key │ │ │ │ │ , std::string salt = std::string()); │ │ │ │ │ sha1_hash dht_put_item (entry data); │ │ │ │ │ void dht_put_item (std::array key │ │ │ │ │ , std::function& │ │ │ │ │ , std::int64_t&, std::string const&)> cb │ │ │ │ │ , std::string salt = std::string()); │ │ │ │ │ - void dht_get_peers (sha1_hash const& info_hash); │ │ │ │ │ void dht_announce (sha1_hash const& info_hash, int port = 0, dht:: │ │ │ │ │ announce_flags_t flags = {}); │ │ │ │ │ + void dht_get_peers (sha1_hash const& info_hash); │ │ │ │ │ void dht_live_nodes (sha1_hash const& nid); │ │ │ │ │ void dht_sample_infohashes (udp::endpoint const& ep, sha1_hash const& │ │ │ │ │ target); │ │ │ │ │ void dht_direct_request (udp::endpoint const& ep, entry const& e, │ │ │ │ │ client_data_t userdata = {}); │ │ │ │ │ void add_extension (std::function( │ │ │ │ │ torrent_handle const&, client_data_t)> ext); │ │ │ │ │ void add_extension (std::shared_ptr ext); │ │ │ │ │ ip_filter get_ip_filter () const; │ │ │ │ │ void set_ip_filter (ip_filter f); │ │ │ │ │ void set_port_filter (port_filter const& f); │ │ │ │ │ - bool is_listening () const; │ │ │ │ │ unsigned short listen_port () const; │ │ │ │ │ unsigned short ssl_listen_port () const; │ │ │ │ │ + bool is_listening () const; │ │ │ │ │ void set_peer_class_filter (ip_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); │ │ │ │ │ peer_class_info get_peer_class (peer_class_t cid) const; │ │ │ │ │ void set_peer_class (peer_class_t cid, peer_class_info const& pci); │ │ │ │ │ void remove_torrent (const torrent_handle&, remove_flags_t = {}); │ │ │ │ │ - void apply_settings (settings_pack const&); │ │ │ │ │ - settings_pack get_settings () const; │ │ │ │ │ void apply_settings (settings_pack&&); │ │ │ │ │ - void set_alert_notify (std::function const& fun); │ │ │ │ │ + settings_pack get_settings () const; │ │ │ │ │ + void apply_settings (settings_pack const&); │ │ │ │ │ alert* wait_for_alert (time_duration max_wait); │ │ │ │ │ + void set_alert_notify (std::function const& fun); │ │ │ │ │ void pop_alerts (std::vector* alerts); │ │ │ │ │ std::vector 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 native_handle () const; │ │ │ │ │ @@ -1510,20 +1510,20 @@ │ │ │ │ │ all()) const; │ │ │ │ │ returns the current session state. This can be passed to write_session_params() │ │ │ │ │ to save the state to disk and restored using read_session_params() when │ │ │ │ │ constructing a new session. The kind of state that's included is all settings, │ │ │ │ │ the DHT routing table, possibly plugin-specific state. the flags parameter can │ │ │ │ │ be used to only save certain parts of the session state │ │ │ │ │ [report_issue] │ │ │ │ │ -***** refresh_torrent_status() get_torrent_status() ***** │ │ │ │ │ +***** get_torrent_status() refresh_torrent_status() ***** │ │ │ │ │ +void refresh_torrent_status (std::vector* ret │ │ │ │ │ + , status_flags_t flags = {}) const; │ │ │ │ │ std::vector get_torrent_status ( │ │ │ │ │ std::function const& pred │ │ │ │ │ , status_flags_t flags = {}) const; │ │ │ │ │ -void refresh_torrent_status (std::vector* ret │ │ │ │ │ - , status_flags_t flags = {}) const; │ │ │ │ │ Note │ │ │ │ │ these calls are potentially expensive and won't scale well with lots of │ │ │ │ │ torrents. If you're concerned about performance, consider using │ │ │ │ │ post_torrent_updates() instead. │ │ │ │ │ get_torrent_status returns a vector of the torrent_status for every torrent │ │ │ │ │ which satisfies pred, which is a predicate function which determines if a │ │ │ │ │ torrent should be included in the returned set or not. Returning true means it │ │ │ │ │ @@ -1574,31 +1574,31 @@ │ │ │ │ │ ***** set_dht_state() ***** │ │ │ │ │ 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] │ │ │ │ │ -***** get_torrents() find_torrent() ***** │ │ │ │ │ +***** find_torrent() get_torrents() ***** │ │ │ │ │ torrent_handle find_torrent (sha1_hash const& info_hash) const; │ │ │ │ │ std::vector get_torrents () const; │ │ │ │ │ find_torrent() looks for a torrent with the given info-hash. In case there is │ │ │ │ │ such a torrent in the session, a torrent_handle to that torrent is returned. In │ │ │ │ │ case the torrent cannot be found, an invalid torrent_handle is returned. │ │ │ │ │ See torrent_handle::is_valid() to know if the torrent was found or not. │ │ │ │ │ get_torrents() returns a vector of torrent_handles to all the torrents │ │ │ │ │ currently in the session. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** add_torrent() async_add_torrent() ***** │ │ │ │ │ +***** async_add_torrent() add_torrent() ***** │ │ │ │ │ torrent_handle add_torrent (add_torrent_params&& params); │ │ │ │ │ -void async_add_torrent (add_torrent_params&& params); │ │ │ │ │ -torrent_handle add_torrent (add_torrent_params&& params, error_code& ec); │ │ │ │ │ torrent_handle add_torrent (add_torrent_params const& params); │ │ │ │ │ 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&& params, error_code& ec); │ │ │ │ │ You add torrents through the add_torrent() function where you give an object │ │ │ │ │ with all the parameters. The add_torrent() overloads will block until the │ │ │ │ │ torrent has been added (or failed to be added) and returns an error code and a │ │ │ │ │ torrent_handle. In order to add torrents more efficiently, consider using │ │ │ │ │ async_add_torrent() which returns immediately, without waiting for the torrent │ │ │ │ │ to add. Notification of the torrent being added is sent as add_torrent_alert. │ │ │ │ │ The overload that does not take an error_code throws an exception on error and │ │ │ │ │ @@ -1615,18 +1615,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 BitTorrent_v2_torrents. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** resume() is_paused() pause() ***** │ │ │ │ │ -void pause (); │ │ │ │ │ -bool is_paused () const; │ │ │ │ │ +***** is_paused() pause() resume() ***** │ │ │ │ │ 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. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** is_dht_running() ***** │ │ │ │ │ @@ -1702,18 +1702,18 @@ │ │ │ │ │ and make the function entirely self-contained. The only reason data blob's │ │ │ │ │ value is computed via a function instead of just passing in the new value is to │ │ │ │ │ avoid race conditions. If you want to update the value in the DHT, you must │ │ │ │ │ first retrieve it, then modify it, then write it back. The way the DHT works, │ │ │ │ │ it is natural to always do a lookup before storing and calling the callback in │ │ │ │ │ between is convenient. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** dht_announce() dht_get_peers() ***** │ │ │ │ │ -void dht_get_peers (sha1_hash const& info_hash); │ │ │ │ │ +***** dht_get_peers() dht_announce() ***** │ │ │ │ │ void dht_announce (sha1_hash const& info_hash, int port = 0, dht:: │ │ │ │ │ announce_flags_t flags = {}); │ │ │ │ │ +void dht_get_peers (sha1_hash const& info_hash); │ │ │ │ │ dht_get_peers() will issue a DHT get_peer request to the DHT for the specified │ │ │ │ │ info-hash. The response (the peers) will be posted back in a │ │ │ │ │ dht_get_peers_reply_alert. │ │ │ │ │ dht_announce() will issue a DHT announce request to the DHT to the specified │ │ │ │ │ info-hash, advertising the specified port. If the port is left at its default, │ │ │ │ │ 0, the port will be implied by the DHT message's source port (which may improve │ │ │ │ │ connectivity through a NAT). │ │ │ │ │ @@ -1787,25 +1787,25 @@ │ │ │ │ │ ***** set_port_filter() ***** │ │ │ │ │ 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] │ │ │ │ │ -***** is_listening() listen_port() ssl_listen_port() ***** │ │ │ │ │ -bool is_listening () const; │ │ │ │ │ +***** ssl_listen_port() listen_port() is_listening() ***** │ │ │ │ │ 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() ***** │ │ │ │ │ +***** get_peer_class_filter() set_peer_class_filter() ***** │ │ │ │ │ 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 │ │ │ │ │ @@ -1862,15 +1862,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 session object destructs. │ │ │ │ │ For more information on peer classes, see peer_classes. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** get_peer_class() set_peer_class() ***** │ │ │ │ │ +***** set_peer_class() get_peer_class() ***** │ │ │ │ │ peer_class_info get_peer_class (peer_class_t cid) const; │ │ │ │ │ void set_peer_class (peer_class_t cid, peer_class_info const& pci); │ │ │ │ │ These functions queries information from a peer class and updates the │ │ │ │ │ configuration of a peer class, respectively. │ │ │ │ │ cid must refer to an existing peer class. If it does not, the return value of │ │ │ │ │ get_peer_class() is undefined. │ │ │ │ │ set_peer_class() sets all the information in the peer_class_info object in the │ │ │ │ │ @@ -1903,24 +1903,24 @@ │ │ │ │ │ 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() ***** │ │ │ │ │ -void apply_settings (settings_pack const&); │ │ │ │ │ -settings_pack get_settings () const; │ │ │ │ │ void apply_settings (settings_pack&&); │ │ │ │ │ +settings_pack get_settings () const; │ │ │ │ │ +void apply_settings (settings_pack 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] │ │ │ │ │ -***** pop_alerts() set_alert_notify() wait_for_alert() ***** │ │ │ │ │ -void set_alert_notify (std::function const& fun); │ │ │ │ │ +***** wait_for_alert() pop_alerts() set_alert_notify() ***** │ │ │ │ │ alert* wait_for_alert (time_duration max_wait); │ │ │ │ │ +void set_alert_notify (std::function const& fun); │ │ │ │ │ void pop_alerts (std::vector* alerts); │ │ │ │ │ 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 long as the │ │ │ │ │ alerts themselves are not accessed once another thread calls pop_alerts. Doing │ │ │ │ │ @@ -2017,15 +2017,15 @@ │ │ │ │ │ protocols used by add_port_mapping() │ │ │ │ │ [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] │ │ │ │ │ -****** read_session_params() write_session_params_buf() write_session_params() │ │ │ │ │ +****** write_session_params_buf() read_session_params() write_session_params() │ │ │ │ │ ****** │ │ │ │ │ Declared in "libtorrent/session_params.hpp" │ │ │ │ │ entry write_session_params (session_params const& sp │ │ │ │ │ , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ session_params read_session_params (span buf │ │ │ │ │ , save_state_flags_t flags = save_state_flags_t::all()); │ │ │ │ │ std::vector write_session_params_buf (session_params const& sp │ │ │ │ │ @@ -2117,37 +2117,37 @@ │ │ │ │ │ the max number of bdecode tokens │ │ │ │ │ [report_issue] │ │ │ │ │ ****** torrent_info ****** │ │ │ │ │ Declared in "libtorrent/torrent_info.hpp" │ │ │ │ │ the torrent_info class holds the information found in a .torrent file. │ │ │ │ │ class torrent_info │ │ │ │ │ { │ │ │ │ │ + torrent_info (std::string const& filename, load_torrent_limits const& cfg); │ │ │ │ │ + torrent_info (bdecode_node const& torrent_file, load_torrent_limits const& │ │ │ │ │ +cfg); │ │ │ │ │ + torrent_info (span buffer, error_code& ec, from_span_t); │ │ │ │ │ + torrent_info (std::string const& filename, error_code& ec); │ │ │ │ │ torrent_info (span buffer, load_torrent_limits const& cfg, │ │ │ │ │ from_span_t); │ │ │ │ │ torrent_info (bdecode_node const& torrent_file, error_code& ec); │ │ │ │ │ - torrent_info (span buffer, error_code& ec, from_span_t); │ │ │ │ │ - explicit torrent_info (info_hash_t const& info_hash); │ │ │ │ │ explicit torrent_info (std::string const& filename); │ │ │ │ │ - torrent_info (char const* buffer, int size); │ │ │ │ │ torrent_info (char const* buffer, int size, error_code& ec); │ │ │ │ │ - torrent_info (bdecode_node const& torrent_file, load_torrent_limits const& │ │ │ │ │ -cfg); │ │ │ │ │ - explicit torrent_info (span buffer, from_span_t); │ │ │ │ │ + torrent_info (char const* buffer, int size); │ │ │ │ │ + explicit torrent_info (info_hash_t const& info_hash); │ │ │ │ │ torrent_info (torrent_info const& t); │ │ │ │ │ - torrent_info (std::string const& filename, error_code& ec); │ │ │ │ │ - torrent_info (std::string const& filename, load_torrent_limits const& cfg); │ │ │ │ │ explicit torrent_info (bdecode_node const& torrent_file); │ │ │ │ │ + explicit torrent_info (span buffer, from_span_t); │ │ │ │ │ ~torrent_info (); │ │ │ │ │ file_storage const& orig_files () const; │ │ │ │ │ file_storage const& files () const; │ │ │ │ │ void rename_file (file_index_t index, std::string const& new_filename); │ │ │ │ │ void remap_files (file_storage const& f); │ │ │ │ │ + void clear_trackers (); │ │ │ │ │ void add_tracker (std::string const& url, int tier │ │ │ │ │ , announce_entry::tracker_source source); │ │ │ │ │ - void clear_trackers (); │ │ │ │ │ void add_tracker (std::string const& url, int tier = 0); │ │ │ │ │ std::vector const& trackers () const; │ │ │ │ │ std::vector collections () const; │ │ │ │ │ std::vector similar_torrents () const; │ │ │ │ │ void add_url_seed (std::string const& url │ │ │ │ │ , std::string const& ext_auth = std::string() │ │ │ │ │ , web_seed_entry::headers_t const& ext_headers = web_seed_entry:: │ │ │ │ │ @@ -2157,33 +2157,33 @@ │ │ │ │ │ , std::string const& extern_auth = std::string() │ │ │ │ │ , web_seed_entry::headers_t const& extra_headers = web_seed_entry:: │ │ │ │ │ headers_t()); │ │ │ │ │ void set_web_seeds (std::vector seeds); │ │ │ │ │ std::int64_t total_size () const; │ │ │ │ │ int piece_length () const; │ │ │ │ │ int num_pieces () const; │ │ │ │ │ + piece_index_t last_piece () const; │ │ │ │ │ index_range piece_range () const; │ │ │ │ │ piece_index_t end_piece () const; │ │ │ │ │ - piece_index_t last_piece () const; │ │ │ │ │ sha1_hash info_hash () const noexcept; │ │ │ │ │ info_hash_t const& info_hashes () const; │ │ │ │ │ - bool v2 () const; │ │ │ │ │ bool v1 () const; │ │ │ │ │ + bool v2 () const; │ │ │ │ │ int num_files () const; │ │ │ │ │ std::vector map_block (piece_index_t const piece │ │ │ │ │ , std::int64_t offset, int size) const; │ │ │ │ │ peer_request map_file (file_index_t const file, std::int64_t offset, int │ │ │ │ │ size) const; │ │ │ │ │ string_view ssl_cert () const; │ │ │ │ │ bool is_valid () const; │ │ │ │ │ bool priv () const; │ │ │ │ │ bool is_i2p () const; │ │ │ │ │ int piece_size (piece_index_t index) const; │ │ │ │ │ - sha1_hash hash_for_piece (piece_index_t index) const; │ │ │ │ │ char const* hash_for_piece_ptr (piece_index_t const index) const; │ │ │ │ │ + sha1_hash hash_for_piece (piece_index_t index) const; │ │ │ │ │ bool is_loaded () const; │ │ │ │ │ const std::string& name () const; │ │ │ │ │ std::time_t creation_date () const; │ │ │ │ │ const std::string& creator () const; │ │ │ │ │ const std::string& comment () const; │ │ │ │ │ std::vector> const& nodes () const; │ │ │ │ │ void add_node (std::pair const& node); │ │ │ │ │ @@ -2192,29 +2192,29 @@ │ │ │ │ │ bdecode_node info (char const* key) const; │ │ │ │ │ span info_section () const; │ │ │ │ │ span piece_layer (file_index_t) const; │ │ │ │ │ void free_piece_layers (); │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ***** torrent_info() ***** │ │ │ │ │ +torrent_info (std::string const& filename, load_torrent_limits const& cfg); │ │ │ │ │ +torrent_info (bdecode_node const& torrent_file, load_torrent_limits const& │ │ │ │ │ +cfg); │ │ │ │ │ +torrent_info (span buffer, error_code& ec, from_span_t); │ │ │ │ │ +torrent_info (std::string const& filename, error_code& ec); │ │ │ │ │ torrent_info (span buffer, load_torrent_limits const& cfg, │ │ │ │ │ from_span_t); │ │ │ │ │ torrent_info (bdecode_node const& torrent_file, error_code& ec); │ │ │ │ │ -torrent_info (span buffer, error_code& ec, from_span_t); │ │ │ │ │ -explicit torrent_info (info_hash_t const& info_hash); │ │ │ │ │ explicit torrent_info (std::string const& filename); │ │ │ │ │ -torrent_info (char const* buffer, int size); │ │ │ │ │ torrent_info (char const* buffer, int size, error_code& ec); │ │ │ │ │ -torrent_info (bdecode_node const& torrent_file, load_torrent_limits const& │ │ │ │ │ -cfg); │ │ │ │ │ -explicit torrent_info (span buffer, from_span_t); │ │ │ │ │ +torrent_info (char const* buffer, int size); │ │ │ │ │ +explicit torrent_info (info_hash_t const& info_hash); │ │ │ │ │ torrent_info (torrent_info const& t); │ │ │ │ │ -torrent_info (std::string const& filename, error_code& ec); │ │ │ │ │ -torrent_info (std::string const& filename, load_torrent_limits const& cfg); │ │ │ │ │ explicit torrent_info (bdecode_node const& torrent_file); │ │ │ │ │ +explicit torrent_info (span buffer, from_span_t); │ │ │ │ │ The constructor that takes an info-hash will initialize the info-hash to the │ │ │ │ │ given value, but leave all other fields empty. This is used internally when │ │ │ │ │ downloading torrents without the metadata. The metadata will be created by │ │ │ │ │ libtorrent as soon as it has been downloaded from the swarm. │ │ │ │ │ The constructor that takes a bdecode_node will create a torrent_info object │ │ │ │ │ from the information found in the given torrent_file. The bdecode_node │ │ │ │ │ represents a tree node in an bencoded file. To load an ordinary .torrent file │ │ │ │ │ @@ -2237,15 +2237,15 @@ │ │ │ │ │ from_span_t to disambiguate the std::string overload for string literals. There │ │ │ │ │ is an object in the libtorrent namespace of this type called from_span. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** ~torrent_info() ***** │ │ │ │ │ ~torrent_info (); │ │ │ │ │ frees all storage associated with this torrent_info object │ │ │ │ │ [report_issue] │ │ │ │ │ -***** orig_files() files() ***** │ │ │ │ │ +***** files() orig_files() ***** │ │ │ │ │ file_storage const& orig_files () const; │ │ │ │ │ file_storage const& files () const; │ │ │ │ │ The file_storage object contains the information on how to map the pieces to │ │ │ │ │ files. It is separated from the torrent_info object because when creating │ │ │ │ │ torrents a storage object needs to be created without having a torrent file. │ │ │ │ │ When renaming files in a storage, the storage needs to make its own copy of the │ │ │ │ │ file_storage in order to make its mapping differ from the one in the torrent │ │ │ │ │ @@ -2280,18 +2280,18 @@ │ │ │ │ │ Remaps the file storage to a new file layout. This can be used to, for │ │ │ │ │ instance, download all data in a torrent to a single file, or to a number of │ │ │ │ │ fixed size sector aligned files, regardless of the number and sizes of the │ │ │ │ │ files in the torrent. │ │ │ │ │ The new specified file_storage must have the exact same size as the current │ │ │ │ │ one. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** clear_trackers() add_tracker() trackers() ***** │ │ │ │ │ +***** add_tracker() clear_trackers() trackers() ***** │ │ │ │ │ +void clear_trackers (); │ │ │ │ │ void add_tracker (std::string const& url, int tier │ │ │ │ │ , announce_entry::tracker_source source); │ │ │ │ │ -void clear_trackers (); │ │ │ │ │ void add_tracker (std::string const& url, int tier = 0); │ │ │ │ │ std::vector const& trackers () const; │ │ │ │ │ add_tracker() adds a tracker to the announce-list. The tier determines the │ │ │ │ │ order in which the trackers are to be tried. The trackers() function will │ │ │ │ │ return a sorted vector of announce_entry. Each announce entry contains a │ │ │ │ │ string, which is the tracker url, and a tier index. The tier index is the high- │ │ │ │ │ level priority. No matter which trackers that works or not, the ones with lower │ │ │ │ │ @@ -2304,15 +2304,15 @@ │ │ │ │ │ std::vector collections () const; │ │ │ │ │ std::vector similar_torrents () const; │ │ │ │ │ These two functions are related to BEP_38 (mutable torrents). The vectors │ │ │ │ │ returned from these correspond to the "similar" and "collections" keys in the │ │ │ │ │ .torrent file. Both info-hashes and collections from within the info-dict and │ │ │ │ │ from outside of it are included. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** add_http_seed() set_web_seeds() add_url_seed() web_seeds() ***** │ │ │ │ │ +***** set_web_seeds() add_url_seed() add_http_seed() web_seeds() ***** │ │ │ │ │ void add_url_seed (std::string const& url │ │ │ │ │ , std::string const& ext_auth = std::string() │ │ │ │ │ , web_seed_entry::headers_t const& ext_headers = web_seed_entry:: │ │ │ │ │ headers_t()); │ │ │ │ │ std::vector const& web_seeds () const; │ │ │ │ │ void add_http_seed (std::string const& url │ │ │ │ │ , std::string const& extern_auth = std::string() │ │ │ │ │ @@ -2335,42 +2335,42 @@ │ │ │ │ │ ***** total_size() ***** │ │ │ │ │ std::int64_t total_size () const; │ │ │ │ │ total_size() returns the total number of bytes the torrent-file represents. │ │ │ │ │ Note that this is the number of pieces times the piece size (modulo the last │ │ │ │ │ piece possibly being smaller). With pad files, the total size will be larger │ │ │ │ │ than the sum of all (regular) file sizes. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** num_pieces() piece_length() ***** │ │ │ │ │ +***** piece_length() num_pieces() ***** │ │ │ │ │ int piece_length () const; │ │ │ │ │ int num_pieces () const; │ │ │ │ │ piece_length() and num_pieces() returns the number of byte for each piece and │ │ │ │ │ the total number of pieces, respectively. The difference between piece_size() │ │ │ │ │ and piece_length() is that piece_size() takes the piece index as argument and │ │ │ │ │ gives you the exact size of that piece. It will always be the same as │ │ │ │ │ piece_length() except in the case of the last piece, which may be smaller. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** piece_range() last_piece() end_piece() ***** │ │ │ │ │ +***** last_piece() end_piece() piece_range() ***** │ │ │ │ │ +piece_index_t last_piece () const; │ │ │ │ │ index_range piece_range () const; │ │ │ │ │ piece_index_t end_piece () const; │ │ │ │ │ -piece_index_t last_piece () const; │ │ │ │ │ last_piece() returns the index to the last piece in the torrent and end_piece() │ │ │ │ │ returns the index to the one-past-end piece in the torrent piece_range() │ │ │ │ │ returns an implementation-defined type that can be used as the container in a │ │ │ │ │ range-for loop. Where the values are the indices of all pieces in the │ │ │ │ │ file_storage. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** info_hash() info_hashes() ***** │ │ │ │ │ +***** info_hashes() info_hash() ***** │ │ │ │ │ sha1_hash info_hash () const noexcept; │ │ │ │ │ info_hash_t const& info_hashes () const; │ │ │ │ │ returns the info-hash of the torrent. For BitTorrent v2 support, use │ │ │ │ │ info_hashes() to get an object that may hold both a v1 and v2 info-hash │ │ │ │ │ [report_issue] │ │ │ │ │ ***** v1() v2() ***** │ │ │ │ │ -bool v2 () const; │ │ │ │ │ bool v1 () const; │ │ │ │ │ +bool v2 () const; │ │ │ │ │ returns whether this torrent has v1 and/or v2 metadata, respectively. Hybrid │ │ │ │ │ torrents have both. These are shortcuts for info_hashes().has_v1() and │ │ │ │ │ info_hashes().has_v2() calls. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** num_files() ***** │ │ │ │ │ int num_files () const; │ │ │ │ │ If you need index-access to files you can use the num_files() along with the │ │ │ │ │ @@ -2418,17 +2418,17 @@ │ │ │ │ │ than the i2p network. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** piece_size() ***** │ │ │ │ │ int piece_size (piece_index_t index) const; │ │ │ │ │ returns the piece size of file with index. This will be the same as │ │ │ │ │ piece_length(), except for the last piece, which may be shorter. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** hash_for_piece() hash_for_piece_ptr() ***** │ │ │ │ │ -sha1_hash hash_for_piece (piece_index_t index) const; │ │ │ │ │ +***** hash_for_piece_ptr() hash_for_piece() ***** │ │ │ │ │ char const* hash_for_piece_ptr (piece_index_t const index) const; │ │ │ │ │ +sha1_hash hash_for_piece (piece_index_t index) const; │ │ │ │ │ hash_for_piece() takes a piece-index and returns the 20-bytes sha1-hash for │ │ │ │ │ that piece and info_hash() returns the 20-bytes sha1-hash for the info-section │ │ │ │ │ of the torrent file. hash_for_piece_ptr() returns a pointer to the 20 byte sha1 │ │ │ │ │ digest for the piece. Note that the string is not 0-terminated. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** name() ***** │ │ │ │ │ const std::string& name () const; │ │ │ │ │ @@ -2869,20 +2869,20 @@ │ │ │ │ │ Declared in "libtorrent/info_hash.hpp" │ │ │ │ │ class holding the info-hash of a torrent. It can hold a v1 info-hash (SHA-1) or │ │ │ │ │ a v2 info-hash (SHA-256) or both. │ │ │ │ │ Note │ │ │ │ │ If has_v2() is false then the v1 hash might actually be a truncated v2 hash │ │ │ │ │ struct info_hash_t │ │ │ │ │ { │ │ │ │ │ - explicit info_hash_t (sha256_hash h2) noexcept; │ │ │ │ │ - info_hash_t () noexcept = default; │ │ │ │ │ explicit info_hash_t (sha1_hash h1) noexcept; │ │ │ │ │ + info_hash_t () noexcept = default; │ │ │ │ │ info_hash_t (sha1_hash h1, sha256_hash h2) noexcept; │ │ │ │ │ - bool has (protocol_version v) const; │ │ │ │ │ + explicit info_hash_t (sha256_hash h2) noexcept; │ │ │ │ │ bool has_v2 () const; │ │ │ │ │ + bool has (protocol_version v) const; │ │ │ │ │ bool has_v1 () const; │ │ │ │ │ sha1_hash get (protocol_version v) const; │ │ │ │ │ sha1_hash get_best () const; │ │ │ │ │ friend bool operator!= (info_hash_t const& lhs, info_hash_t const& rhs); │ │ │ │ │ friend bool operator== (info_hash_t const& lhs, info_hash_t const& rhs) │ │ │ │ │ noexcept; │ │ │ │ │ template void for_each (F f) const; │ │ │ │ │ @@ -2890,26 +2890,26 @@ │ │ │ │ │ friend std::ostream& operator<< (std::ostream& os, info_hash_t const& ih); │ │ │ │ │ │ │ │ │ │ sha1_hash v1; │ │ │ │ │ sha256_hash v2; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ***** info_hash_t() ***** │ │ │ │ │ -explicit info_hash_t (sha256_hash h2) noexcept; │ │ │ │ │ -info_hash_t () noexcept = default; │ │ │ │ │ explicit info_hash_t (sha1_hash h1) noexcept; │ │ │ │ │ +info_hash_t () noexcept = default; │ │ │ │ │ info_hash_t (sha1_hash h1, sha256_hash h2) noexcept; │ │ │ │ │ +explicit info_hash_t (sha256_hash h2) noexcept; │ │ │ │ │ The default constructor creates an object that has neither a v1 or v2 hash. │ │ │ │ │ For backwards compatibility, make it possible to construct directly from a v1 │ │ │ │ │ hash. This constructor allows implicit conversion from a v1 hash, but the │ │ │ │ │ implicitness is deprecated. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** has() has_v1() has_v2() ***** │ │ │ │ │ -bool has (protocol_version v) const; │ │ │ │ │ bool has_v2 () const; │ │ │ │ │ +bool has (protocol_version v) const; │ │ │ │ │ bool has_v1 () const; │ │ │ │ │ returns true if the corresponding info hash is present in this object. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** get() ***** │ │ │ │ │ sha1_hash get (protocol_version v) const; │ │ │ │ │ returns the has for the specified protocol version │ │ │ │ │ [report_issue] │ │ │ │ │ @@ -2962,40 +2962,40 @@ │ │ │ │ │ [report_issue] │ │ │ │ │ start │ │ │ │ │ The byte offset within that piece where the range starts. │ │ │ │ │ [report_issue] │ │ │ │ │ length │ │ │ │ │ The size of the range, in bytes. │ │ │ │ │ [report_issue] │ │ │ │ │ -****** load_torrent_parsed() load_torrent_file() load_torrent_buffer() ****** │ │ │ │ │ +****** load_torrent_file() load_torrent_buffer() load_torrent_parsed() ****** │ │ │ │ │ Declared in "libtorrent/load_torrent.hpp" │ │ │ │ │ -add_torrent_params load_torrent_parsed ( │ │ │ │ │ - bdecode_node const& torrent_file, load_torrent_limits const& cfg); │ │ │ │ │ -add_torrent_params load_torrent_buffer ( │ │ │ │ │ - span buffer, load_torrent_limits const& cfg); │ │ │ │ │ add_torrent_params load_torrent_file ( │ │ │ │ │ std::string const& filename, load_torrent_limits const& cfg); │ │ │ │ │ +add_torrent_params load_torrent_buffer ( │ │ │ │ │ + span buffer, load_torrent_limits const& cfg); │ │ │ │ │ +add_torrent_params load_torrent_parsed ( │ │ │ │ │ + bdecode_node const& torrent_file, load_torrent_limits const& cfg); │ │ │ │ │ +add_torrent_params load_torrent_parsed ( │ │ │ │ │ + bdecode_node const& torrent_file); │ │ │ │ │ add_torrent_params load_torrent_file ( │ │ │ │ │ std::string const& filename); │ │ │ │ │ add_torrent_params load_torrent_buffer ( │ │ │ │ │ span buffer); │ │ │ │ │ -add_torrent_params load_torrent_parsed ( │ │ │ │ │ - bdecode_node const& torrent_file); │ │ │ │ │ These functions load the content of a .torrent file into an add_torrent_params │ │ │ │ │ object. The immutable part of a torrent file (the info-dictionary) is stored in │ │ │ │ │ the ti field in the add_torrent_params object (as a torrent_info object). The │ │ │ │ │ returned object is suitable to be: │ │ │ │ │ * added to a session via add_torrent() or async_add_torrent() │ │ │ │ │ * saved as a .torrent_file via write_torrent_file() │ │ │ │ │ * turned into a magnet link via make_magnet_uri() │ │ │ │ │ [report_issue] │ │ │ │ │ ****** make_magnet_uri() ****** │ │ │ │ │ Declared in "libtorrent/magnet_uri.hpp" │ │ │ │ │ -std::string make_magnet_uri (torrent_handle const& handle); │ │ │ │ │ std::string make_magnet_uri (torrent_info const& info); │ │ │ │ │ +std::string make_magnet_uri (torrent_handle const& handle); │ │ │ │ │ std::string make_magnet_uri (add_torrent_params const& atp); │ │ │ │ │ Generates a magnet URI from the specified torrent. │ │ │ │ │ Several fields from the add_torrent_params objects are recorded in the magnet │ │ │ │ │ link. In order to not include them, they have to be cleared before calling │ │ │ │ │ make_magnet_uri(). These fields are used: │ │ │ │ │ ti, info_hashes, url_seeds, dht_nodes, file_priorities, trackers, │ │ │ │ │ name, peers. │ │ │ │ │ @@ -3011,17 +3011,17 @@ │ │ │ │ │ The overload that takes a torrent_handle will make blocking calls to query │ │ │ │ │ information about the torrent. If the torrent handle is invalid, an empty │ │ │ │ │ string is returned. │ │ │ │ │ For more information about magnet links, see magnet_links. │ │ │ │ │ [report_issue] │ │ │ │ │ ****** parse_magnet_uri() ****** │ │ │ │ │ Declared in "libtorrent/magnet_uri.hpp" │ │ │ │ │ +void parse_magnet_uri (string_view uri, add_torrent_params& p, error_code& ec); │ │ │ │ │ add_torrent_params parse_magnet_uri (string_view uri); │ │ │ │ │ add_torrent_params parse_magnet_uri (string_view uri, error_code& ec); │ │ │ │ │ -void parse_magnet_uri (string_view uri, add_torrent_params& p, error_code& ec); │ │ │ │ │ This function parses out information from the magnet link and populates the │ │ │ │ │ add_torrent_params object. The overload that does not take an error_code │ │ │ │ │ reference will throw a system_error on error The overload taking an │ │ │ │ │ add_torrent_params reference will fill in the fields specified in the magnet │ │ │ │ │ URI. │ │ │ │ │ [report_issue] │ │ │ │ │ ****** truncate_files() ****** │ │ │ │ │ @@ -3502,16 +3502,16 @@ │ │ │ │ │ Torrent plugins are associated with a single torrent and have a number of │ │ │ │ │ functions called at certain events. Many of its functions have the ability to │ │ │ │ │ change or override the default libtorrent behavior. │ │ │ │ │ struct torrent_plugin │ │ │ │ │ { │ │ │ │ │ virtual std::shared_ptr new_connection (peer_connection_handle │ │ │ │ │ const&); │ │ │ │ │ - virtual void on_piece_failed (piece_index_t); │ │ │ │ │ virtual void on_piece_pass (piece_index_t); │ │ │ │ │ + virtual void on_piece_failed (piece_index_t); │ │ │ │ │ virtual void tick (); │ │ │ │ │ virtual bool on_pause (); │ │ │ │ │ virtual bool on_resume (); │ │ │ │ │ virtual void on_files_checked (); │ │ │ │ │ virtual void on_state (torrent_status::state_t); │ │ │ │ │ virtual void on_add_peer (tcp::endpoint const&, │ │ │ │ │ peer_source_flags_t, add_peer_flags_t); │ │ │ │ │ @@ -3532,27 +3532,27 @@ │ │ │ │ │ The peer_connection_handle will be valid as long as the shared_ptr is being │ │ │ │ │ held by the torrent object. So, it is generally a good idea to not keep a │ │ │ │ │ shared_ptr to your own peer_plugin. If you want to keep references to it, use │ │ │ │ │ weak_ptr. │ │ │ │ │ If this function throws an exception, the connection will be closed. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** on_piece_failed() on_piece_pass() ***** │ │ │ │ │ -virtual void on_piece_failed (piece_index_t); │ │ │ │ │ virtual void on_piece_pass (piece_index_t); │ │ │ │ │ +virtual void on_piece_failed (piece_index_t); │ │ │ │ │ These hooks are called when a piece passes the hash check or fails the hash │ │ │ │ │ check, respectively. The index is the piece index that was downloaded. It is │ │ │ │ │ possible to access the list of peers that participated in sending the piece │ │ │ │ │ through the torrent and the piece_picker. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** 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() ***** │ │ │ │ │ +***** on_pause() on_resume() ***** │ │ │ │ │ virtual bool on_pause (); │ │ │ │ │ virtual bool on_resume (); │ │ │ │ │ These hooks are called when the torrent is paused and resumed respectively. The │ │ │ │ │ return value indicates if the event was handled. A return value of true │ │ │ │ │ indicates that it was handled, and no other plugin after this one will have │ │ │ │ │ this hook function called, and the standard handler will also not be invoked. │ │ │ │ │ So, returning true effectively overrides the standard behavior of pause or │ │ │ │ │ @@ -3600,51 +3600,51 @@ │ │ │ │ │ { │ │ │ │ │ virtual string_view type () const; │ │ │ │ │ virtual void add_handshake (entry&); │ │ │ │ │ virtual void on_disconnect (error_code const&); │ │ │ │ │ virtual void on_connected (); │ │ │ │ │ virtual bool on_handshake (span); │ │ │ │ │ virtual bool on_extension_handshake (bdecode_node const&); │ │ │ │ │ - virtual bool on_have_all (); │ │ │ │ │ - virtual bool on_unchoke (); │ │ │ │ │ - virtual bool on_choke (); │ │ │ │ │ - virtual bool on_interested (); │ │ │ │ │ - virtual bool on_request (peer_request const&); │ │ │ │ │ - virtual bool on_bitfield (bitfield const& /*bitfield*/); │ │ │ │ │ virtual bool on_not_interested (); │ │ │ │ │ - virtual bool on_have (piece_index_t); │ │ │ │ │ + virtual bool on_have_none (); │ │ │ │ │ virtual bool on_dont_have (piece_index_t); │ │ │ │ │ + virtual bool on_have (piece_index_t); │ │ │ │ │ virtual bool on_allowed_fast (piece_index_t); │ │ │ │ │ - virtual bool on_have_none (); │ │ │ │ │ + virtual bool on_interested (); │ │ │ │ │ + virtual bool on_bitfield (bitfield const& /*bitfield*/); │ │ │ │ │ + virtual bool on_choke (); │ │ │ │ │ + virtual bool on_request (peer_request const&); │ │ │ │ │ + virtual bool on_have_all (); │ │ │ │ │ + virtual bool on_unchoke (); │ │ │ │ │ virtual bool on_piece (peer_request const& /*piece*/ │ │ │ │ │ , span /*buf*/); │ │ │ │ │ - virtual bool on_cancel (peer_request const&); │ │ │ │ │ - virtual bool on_reject (peer_request const&); │ │ │ │ │ virtual bool on_suggest (piece_index_t); │ │ │ │ │ - virtual void sent_cancel (peer_request const&); │ │ │ │ │ - virtual void sent_have_all (); │ │ │ │ │ + virtual bool on_reject (peer_request const&); │ │ │ │ │ + virtual bool on_cancel (peer_request const&); │ │ │ │ │ virtual void sent_suggest (piece_index_t); │ │ │ │ │ + virtual void sent_reject_request (peer_request const&); │ │ │ │ │ + virtual void sent_request (peer_request const&); │ │ │ │ │ + virtual void sent_have_all (); │ │ │ │ │ + virtual void sent_cancel (peer_request const&); │ │ │ │ │ virtual void sent_choke (); │ │ │ │ │ virtual void sent_have_none (); │ │ │ │ │ virtual void sent_allow_fast (piece_index_t); │ │ │ │ │ - virtual void sent_reject_request (peer_request const&); │ │ │ │ │ - virtual void sent_request (peer_request const&); │ │ │ │ │ - virtual void sent_not_interested (); │ │ │ │ │ virtual void sent_unchoke (); │ │ │ │ │ virtual void sent_interested (); │ │ │ │ │ + virtual void sent_not_interested (); │ │ │ │ │ virtual void sent_have (piece_index_t); │ │ │ │ │ virtual void sent_piece (peer_request const&); │ │ │ │ │ virtual void sent_payload (int /* bytes */); │ │ │ │ │ virtual bool can_disconnect (error_code const& /*ec*/); │ │ │ │ │ virtual bool on_extended (int /*length*/, int /*msg*/, │ │ │ │ │ span /*body*/); │ │ │ │ │ virtual bool on_unknown_message (int /*length*/, int /*msg*/, │ │ │ │ │ span /*body*/); │ │ │ │ │ - virtual void on_piece_failed (piece_index_t); │ │ │ │ │ virtual void on_piece_pass (piece_index_t); │ │ │ │ │ + virtual void on_piece_failed (piece_index_t); │ │ │ │ │ virtual void tick (); │ │ │ │ │ virtual bool write_request (peer_request const&); │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ***** type() ***** │ │ │ │ │ virtual string_view type () const; │ │ │ │ │ This function is expected to return the name of the plugin. │ │ │ │ │ @@ -3672,46 +3672,46 @@ │ │ │ │ │ ***** on_extension_handshake() ***** │ │ │ │ │ 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_choke() on_have_none() on_have_all() on_dont_have() │ │ │ │ │ -on_have() on_allowed_fast() on_not_interested() on_interested() on_bitfield() │ │ │ │ │ +***** on_have_all() on_allowed_fast() on_request() on_choke() on_have() │ │ │ │ │ +on_interested() on_have_none() on_not_interested() on_dont_have() on_bitfield() │ │ │ │ │ on_unchoke() ***** │ │ │ │ │ -virtual bool on_have_all (); │ │ │ │ │ -virtual bool on_unchoke (); │ │ │ │ │ -virtual bool on_choke (); │ │ │ │ │ -virtual bool on_interested (); │ │ │ │ │ -virtual bool on_request (peer_request const&); │ │ │ │ │ -virtual bool on_bitfield (bitfield const& /*bitfield*/); │ │ │ │ │ virtual bool on_not_interested (); │ │ │ │ │ -virtual bool on_have (piece_index_t); │ │ │ │ │ +virtual bool on_have_none (); │ │ │ │ │ virtual bool on_dont_have (piece_index_t); │ │ │ │ │ +virtual bool on_have (piece_index_t); │ │ │ │ │ virtual bool on_allowed_fast (piece_index_t); │ │ │ │ │ -virtual bool on_have_none (); │ │ │ │ │ +virtual bool on_interested (); │ │ │ │ │ +virtual bool on_bitfield (bitfield const& /*bitfield*/); │ │ │ │ │ +virtual bool on_choke (); │ │ │ │ │ +virtual bool on_request (peer_request const&); │ │ │ │ │ +virtual bool on_have_all (); │ │ │ │ │ +virtual bool on_unchoke (); │ │ │ │ │ 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] │ │ │ │ │ ***** on_piece() ***** │ │ │ │ │ virtual bool on_piece (peer_request const& /*piece*/ │ │ │ │ │ , span /*buf*/); │ │ │ │ │ This function is called when the peer connection is receiving a piece. buf │ │ │ │ │ points (non-owning pointer) to the data in an internal immutable disk buffer. │ │ │ │ │ The length of the data is specified in the length member of the piece │ │ │ │ │ parameter. returns true to indicate that the piece is handled and the rest of │ │ │ │ │ the logic should be ignored. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** sent_have() sent_unchoke() sent_piece() sent_not_interested() │ │ │ │ │ -sent_interested() ***** │ │ │ │ │ -virtual void sent_not_interested (); │ │ │ │ │ +***** sent_piece() sent_interested() sent_not_interested() sent_unchoke() │ │ │ │ │ +sent_have() ***** │ │ │ │ │ virtual void sent_unchoke (); │ │ │ │ │ virtual void sent_interested (); │ │ │ │ │ +virtual void sent_not_interested (); │ │ │ │ │ virtual void sent_have (piece_index_t); │ │ │ │ │ virtual void sent_piece (peer_request const&); │ │ │ │ │ called after a choke message has been sent to the peer │ │ │ │ │ [report_issue] │ │ │ │ │ ***** sent_payload() ***** │ │ │ │ │ virtual void sent_payload (int /* bytes */); │ │ │ │ │ called after piece data has been sent to the peer this can be used for stats │ │ │ │ │ @@ -3737,16 +3737,16 @@ │ │ │ │ │ [report_issue] │ │ │ │ │ ***** on_unknown_message() ***** │ │ │ │ │ virtual bool on_unknown_message (int /*length*/, int /*msg*/, │ │ │ │ │ span /*body*/); │ │ │ │ │ this is not called for web seeds │ │ │ │ │ [report_issue] │ │ │ │ │ ***** on_piece_failed() on_piece_pass() ***** │ │ │ │ │ -virtual void on_piece_failed (piece_index_t); │ │ │ │ │ virtual void on_piece_pass (piece_index_t); │ │ │ │ │ +virtual void on_piece_failed (piece_index_t); │ │ │ │ │ called when a piece that this peer participated in either fails or passes the │ │ │ │ │ hash_check │ │ │ │ │ [report_issue] │ │ │ │ │ ***** tick() ***** │ │ │ │ │ virtual void tick (); │ │ │ │ │ called approximately once every second │ │ │ │ │ [report_issue] │ │ │ │ │ @@ -3756,16 +3756,16 @@ │ │ │ │ │ original request message won't be sent and no other plugin will have this │ │ │ │ │ function called. │ │ │ │ │ [report_issue] │ │ │ │ │ ****** crypto_plugin ****** │ │ │ │ │ Declared in "libtorrent/extensions.hpp" │ │ │ │ │ struct crypto_plugin │ │ │ │ │ { │ │ │ │ │ - virtual void set_incoming_key (span key) = 0; │ │ │ │ │ virtual void set_outgoing_key (span key) = 0; │ │ │ │ │ + virtual void set_incoming_key (span key) = 0; │ │ │ │ │ encrypt (span> /*send_vec*/) = 0; │ │ │ │ │ virtual std::tuple decrypt (span> /*receive_vec*/ │ │ │ │ │ ) = 0; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ***** decrypt() ***** │ │ │ │ │ virtual std::tuple decrypt (span> /*receive_vec*/) = │ │ │ │ │ @@ -3784,67 +3784,67 @@ │ │ │ │ │ the peer_connection_handle class provides a handle to the internal peer │ │ │ │ │ connection object, to be used by plugins. This is a low level interface that │ │ │ │ │ may not be stable across libtorrent versions │ │ │ │ │ struct peer_connection_handle │ │ │ │ │ { │ │ │ │ │ explicit peer_connection_handle (std::weak_ptr impl); │ │ │ │ │ connection_type type () const; │ │ │ │ │ - void add_extension (std::shared_ptr); │ │ │ │ │ peer_plugin const* find_plugin (string_view type) const; │ │ │ │ │ + void add_extension (std::shared_ptr); │ │ │ │ │ bool is_seed () const; │ │ │ │ │ bool upload_only () const; │ │ │ │ │ - peer_id const& pid () const; │ │ │ │ │ bool has_piece (piece_index_t i) const; │ │ │ │ │ + peer_id const& pid () const; │ │ │ │ │ bool is_interesting () const; │ │ │ │ │ bool is_choked () const; │ │ │ │ │ - bool has_peer_choked () const; │ │ │ │ │ bool is_peer_interested () const; │ │ │ │ │ - void maybe_unchoke_this_peer (); │ │ │ │ │ + bool has_peer_choked () const; │ │ │ │ │ void choke_this_peer (); │ │ │ │ │ + void maybe_unchoke_this_peer (); │ │ │ │ │ void get_peer_info (peer_info& p) const; │ │ │ │ │ torrent_handle associated_torrent () const; │ │ │ │ │ - tcp::endpoint const& remote () const; │ │ │ │ │ tcp::endpoint local_endpoint () const; │ │ │ │ │ - bool is_connecting () const; │ │ │ │ │ + tcp::endpoint const& remote () const; │ │ │ │ │ bool is_outgoing () const; │ │ │ │ │ + bool is_disconnecting () const; │ │ │ │ │ + bool is_connecting () const; │ │ │ │ │ void disconnect (error_code const& ec, operation_t op │ │ │ │ │ , disconnect_severity_t = peer_connection_interface::normal); │ │ │ │ │ - bool is_disconnecting () const; │ │ │ │ │ bool on_local_network () const; │ │ │ │ │ bool ignore_unchoke_slots () const; │ │ │ │ │ bool failed () const; │ │ │ │ │ - bool should_log (peer_log_alert::direction_t direction) const; │ │ │ │ │ void peer_log (peer_log_alert::direction_t direction │ │ │ │ │ , char const* event, char const* fmt = "", ...) const TORRENT_FORMAT │ │ │ │ │ (4,5); │ │ │ │ │ + bool 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 native_handle () const; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ****** bt_peer_connection_handle ****** │ │ │ │ │ Declared in "libtorrent/peer_connection_handle.hpp" │ │ │ │ │ The bt_peer_connection_handle provides a handle to the internal bittorrent peer │ │ │ │ │ connection object to plugins. It's low level and may not be a stable API across │ │ │ │ │ libtorrent versions. │ │ │ │ │ struct bt_peer_connection_handle : peer_connection_handle │ │ │ │ │ { │ │ │ │ │ explicit bt_peer_connection_handle (peer_connection_handle pc); │ │ │ │ │ bool support_extensions () const; │ │ │ │ │ bool packet_finished () const; │ │ │ │ │ bool supports_encryption () const; │ │ │ │ │ - void switch_send_crypto (std::shared_ptr crypto); │ │ │ │ │ void switch_recv_crypto (std::shared_ptr crypto); │ │ │ │ │ + void switch_send_crypto (std::shared_ptr crypto); │ │ │ │ │ std::shared_ptr native_handle () const; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ****** create_ut_pex_plugin() ****** │ │ │ │ │ Declared in "libtorrent/extensions/ut_pex.hpp" │ │ │ │ │ std::shared_ptr create_ut_pex_plugin (torrent_handle const&, │ │ │ │ │ client_data_t); │ │ │ │ │ @@ -3905,79 +3905,79 @@ │ │ │ │ │ Declared in "libtorrent/file_storage.hpp" │ │ │ │ │ The file_storage class represents a file list and the piece size. Everything │ │ │ │ │ necessary to interpret a regular bittorrent storage file structure. │ │ │ │ │ class file_storage │ │ │ │ │ { │ │ │ │ │ bool is_valid () const; │ │ │ │ │ void reserve (int num_files); │ │ │ │ │ - void add_file (std::string const& path, std::int64_t file_size │ │ │ │ │ - , file_flags_t file_flags = {} │ │ │ │ │ - , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ - , char const* root_hash = nullptr); │ │ │ │ │ void add_file (error_code& ec, std::string const& path, std::int64_t │ │ │ │ │ file_size │ │ │ │ │ , file_flags_t file_flags = {} │ │ │ │ │ , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ - void add_file_borrow (error_code& ec, string_view filename │ │ │ │ │ + void add_file_borrow (string_view filename │ │ │ │ │ , std::string const& path, std::int64_t file_size │ │ │ │ │ , file_flags_t file_flags = {}, char const* filehash = nullptr │ │ │ │ │ , std::int64_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ - void add_file_borrow (string_view filename │ │ │ │ │ + void add_file (std::string const& path, std::int64_t file_size │ │ │ │ │ + , file_flags_t file_flags = {} │ │ │ │ │ + , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ + , char const* root_hash = nullptr); │ │ │ │ │ + void add_file_borrow (error_code& ec, string_view filename │ │ │ │ │ , std::string const& path, std::int64_t file_size │ │ │ │ │ , file_flags_t file_flags = {}, char const* filehash = nullptr │ │ │ │ │ , std::int64_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ void rename_file (file_index_t index, std::string const& new_filename); │ │ │ │ │ std::vector map_block (piece_index_t piece, std::int64_t offset │ │ │ │ │ , std::int64_t size) const; │ │ │ │ │ peer_request map_file (file_index_t file, std::int64_t offset, int size) │ │ │ │ │ const; │ │ │ │ │ int num_files () const noexcept; │ │ │ │ │ file_index_t end_file () const noexcept; │ │ │ │ │ index_range file_range () const noexcept; │ │ │ │ │ std::int64_t total_size () const; │ │ │ │ │ - void set_num_pieces (int n); │ │ │ │ │ int num_pieces () const; │ │ │ │ │ + void set_num_pieces (int n); │ │ │ │ │ piece_index_t end_piece () const; │ │ │ │ │ piece_index_t last_piece () const; │ │ │ │ │ index_range piece_range () const noexcept; │ │ │ │ │ int piece_length () const; │ │ │ │ │ void set_piece_length (int l); │ │ │ │ │ int piece_size (piece_index_t index) const; │ │ │ │ │ int piece_size2 (piece_index_t index) const; │ │ │ │ │ int blocks_in_piece2 (piece_index_t index) const; │ │ │ │ │ std::string const& name () const; │ │ │ │ │ void set_name (std::string const& n); │ │ │ │ │ void swap (file_storage& ti) noexcept; │ │ │ │ │ void canonicalize (); │ │ │ │ │ - sha1_hash hash (file_index_t index) const; │ │ │ │ │ - bool pad_file_at (file_index_t index) const; │ │ │ │ │ sha256_hash root (file_index_t index) const; │ │ │ │ │ char const* root_ptr (file_index_t const index) const; │ │ │ │ │ - std::string symlink (file_index_t index) const; │ │ │ │ │ + string_view file_name (file_index_t index) const; │ │ │ │ │ + std::int64_t file_size (file_index_t index) const; │ │ │ │ │ std::string file_path (file_index_t index, std::string const& save_path = │ │ │ │ │ "") const; │ │ │ │ │ - std::int64_t file_offset (file_index_t index) const; │ │ │ │ │ - std::int64_t file_size (file_index_t index) const; │ │ │ │ │ - string_view file_name (file_index_t index) const; │ │ │ │ │ + std::string symlink (file_index_t index) const; │ │ │ │ │ + sha1_hash hash (file_index_t index) const; │ │ │ │ │ std::time_t mtime (file_index_t index) const; │ │ │ │ │ + std::int64_t file_offset (file_index_t index) const; │ │ │ │ │ + bool pad_file_at (file_index_t index) const; │ │ │ │ │ + int file_num_pieces (file_index_t index) const; │ │ │ │ │ index_range file_piece_range (file_index_t) const; │ │ │ │ │ int file_num_blocks (file_index_t index) const; │ │ │ │ │ - int file_num_pieces (file_index_t index) const; │ │ │ │ │ int file_first_block_node (file_index_t index) const; │ │ │ │ │ int file_first_piece_node (file_index_t index) const; │ │ │ │ │ std::uint32_t file_path_hash (file_index_t index, std::string const& │ │ │ │ │ save_path) const; │ │ │ │ │ void all_path_hashes (std::unordered_set& table) const; │ │ │ │ │ file_flags_t file_flags (file_index_t index) const; │ │ │ │ │ bool file_absolute_path (file_index_t index) const; │ │ │ │ │ - file_index_t file_index_at_offset (std::int64_t offset) const; │ │ │ │ │ file_index_t file_index_at_piece (piece_index_t piece) const; │ │ │ │ │ + file_index_t file_index_at_offset (std::int64_t offset) const; │ │ │ │ │ file_index_t file_index_for_root (sha256_hash const& root_hash) const; │ │ │ │ │ piece_index_t piece_index_at_file (file_index_t f) const; │ │ │ │ │ void sanitize_symlinks (); │ │ │ │ │ bool v2 () const; │ │ │ │ │ │ │ │ │ │ static constexpr file_flags_t flag_pad_file = 0_bit; │ │ │ │ │ static constexpr file_flags_t flag_hidden = 1_bit; │ │ │ │ │ @@ -3994,28 +3994,28 @@ │ │ │ │ │ ***** reserve() ***** │ │ │ │ │ void reserve (int num_files); │ │ │ │ │ allocates space for num_files in the internal file list. This can be used to │ │ │ │ │ avoid reallocating the internal file list when the number of files to be added │ │ │ │ │ is known up-front. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** add_file_borrow() add_file() ***** │ │ │ │ │ -void add_file (std::string const& path, std::int64_t file_size │ │ │ │ │ - , file_flags_t file_flags = {} │ │ │ │ │ - , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ - , char const* root_hash = nullptr); │ │ │ │ │ void add_file (error_code& ec, std::string const& path, std::int64_t file_size │ │ │ │ │ , file_flags_t file_flags = {} │ │ │ │ │ , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ -void add_file_borrow (error_code& ec, string_view filename │ │ │ │ │ +void add_file_borrow (string_view filename │ │ │ │ │ , std::string const& path, std::int64_t file_size │ │ │ │ │ , file_flags_t file_flags = {}, char const* filehash = nullptr │ │ │ │ │ , std::int64_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ -void add_file_borrow (string_view filename │ │ │ │ │ +void add_file (std::string const& path, std::int64_t file_size │ │ │ │ │ + , file_flags_t file_flags = {} │ │ │ │ │ + , std::time_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ + , char const* root_hash = nullptr); │ │ │ │ │ +void add_file_borrow (error_code& ec, string_view filename │ │ │ │ │ , std::string const& path, std::int64_t file_size │ │ │ │ │ , file_flags_t file_flags = {}, char const* filehash = nullptr │ │ │ │ │ , std::int64_t mtime = 0, string_view symlink_path = string_view() │ │ │ │ │ , char const* root_hash = nullptr); │ │ │ │ │ Adds a file to the file storage. The add_file_borrow version expects that │ │ │ │ │ filename is the file name (without a path) of the file that's being added. This │ │ │ │ │ memory is borrowed, i.e. it is the caller's responsibility to make sure it │ │ │ │ │ @@ -4088,17 +4088,17 @@ │ │ │ │ │ range-for loop. Where the values are the indices of all files in the │ │ │ │ │ file_storage. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** total_size() ***** │ │ │ │ │ std::int64_t total_size () const; │ │ │ │ │ returns the total number of bytes all the files in this torrent spans │ │ │ │ │ [report_issue] │ │ │ │ │ -***** set_num_pieces() num_pieces() ***** │ │ │ │ │ -void set_num_pieces (int n); │ │ │ │ │ +***** num_pieces() set_num_pieces() ***** │ │ │ │ │ int num_pieces () const; │ │ │ │ │ +void set_num_pieces (int n); │ │ │ │ │ set and get the number of pieces in the torrent │ │ │ │ │ [report_issue] │ │ │ │ │ ***** end_piece() ***** │ │ │ │ │ piece_index_t end_piece () const; │ │ │ │ │ returns the index of the one-past-end piece in the file storage │ │ │ │ │ [report_issue] │ │ │ │ │ ***** last_piece() ***** │ │ │ │ │ @@ -4109,15 +4109,15 @@ │ │ │ │ │ [report_issue] │ │ │ │ │ ***** piece_range() ***** │ │ │ │ │ index_range piece_range () const noexcept; │ │ │ │ │ returns an implementation-defined type that can be used as the container in a │ │ │ │ │ range-for loop. Where the values are the indices of all pieces in the │ │ │ │ │ file_storage. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** set_piece_length() piece_length() ***** │ │ │ │ │ +***** piece_length() set_piece_length() ***** │ │ │ │ │ int piece_length () const; │ │ │ │ │ void set_piece_length (int l); │ │ │ │ │ set and get the size of each piece in this torrent. It must be a power of two │ │ │ │ │ and at least 16 kiB. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** piece_size() ***** │ │ │ │ │ int piece_size (piece_index_t index) const; │ │ │ │ │ @@ -4131,41 +4131,41 @@ │ │ │ │ │ where all files are piece aligned and padded. i.e. The pad files are not │ │ │ │ │ considered part of the piece for this purpose. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** blocks_in_piece2() ***** │ │ │ │ │ int blocks_in_piece2 (piece_index_t index) const; │ │ │ │ │ returns the number of blocks in the specified piece, for v2 torrents. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** name() set_name() ***** │ │ │ │ │ +***** set_name() name() ***** │ │ │ │ │ std::string const& name () const; │ │ │ │ │ void set_name (std::string const& n); │ │ │ │ │ set and get the name of this torrent. For multi-file torrents, this is also the │ │ │ │ │ name of the root directory all the files are stored in. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** swap() ***** │ │ │ │ │ void swap (file_storage& ti) noexcept; │ │ │ │ │ swap all content of this with ti. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** canonicalize() ***** │ │ │ │ │ void canonicalize (); │ │ │ │ │ arrange files and padding to match the canonical form required by BEP 52 │ │ │ │ │ [report_issue] │ │ │ │ │ -***** file_offset() hash() symlink() root() pad_file_at() file_path() file_size │ │ │ │ │ -() mtime() file_name() root_ptr() ***** │ │ │ │ │ -sha1_hash hash (file_index_t index) const; │ │ │ │ │ -bool pad_file_at (file_index_t index) const; │ │ │ │ │ +***** file_offset() file_path() pad_file_at() file_name() symlink() file_size() │ │ │ │ │ +mtime() root() root_ptr() hash() ***** │ │ │ │ │ sha256_hash root (file_index_t index) const; │ │ │ │ │ char const* root_ptr (file_index_t const index) const; │ │ │ │ │ -std::string symlink (file_index_t index) const; │ │ │ │ │ +string_view file_name (file_index_t index) const; │ │ │ │ │ +std::int64_t file_size (file_index_t index) const; │ │ │ │ │ std::string file_path (file_index_t index, std::string const& save_path = "") │ │ │ │ │ const; │ │ │ │ │ -std::int64_t file_offset (file_index_t index) const; │ │ │ │ │ -std::int64_t file_size (file_index_t index) const; │ │ │ │ │ -string_view file_name (file_index_t index) const; │ │ │ │ │ +std::string symlink (file_index_t index) const; │ │ │ │ │ +sha1_hash hash (file_index_t index) const; │ │ │ │ │ std::time_t mtime (file_index_t index) const; │ │ │ │ │ +std::int64_t file_offset (file_index_t index) const; │ │ │ │ │ +bool pad_file_at (file_index_t index) const; │ │ │ │ │ These functions are used to query attributes of files at a given index. │ │ │ │ │ The hash() is a SHA-1 hash of the file, or 0 if none was provided in the │ │ │ │ │ torrent file. This can potentially be used to join a bittorrent network with │ │ │ │ │ other file sharing networks. │ │ │ │ │ root() returns the SHA-256 merkle tree root of the specified file, in case this │ │ │ │ │ is a v2 torrent. Otherwise returns zeros. root_ptr() returns a pointer to the │ │ │ │ │ SHA-256 merkle tree root hash for the specified file. The pointer points into │ │ │ │ │ @@ -4178,24 +4178,24 @@ │ │ │ │ │ file_size() returns the size of a file. │ │ │ │ │ pad_file_at() returns true if the file at the given index is a pad-file. │ │ │ │ │ file_name() returns just the name of the file, whereas file_path() returns the │ │ │ │ │ path (inside the torrent file) with the filename appended. │ │ │ │ │ file_offset() returns the byte offset within the torrent file where this file │ │ │ │ │ starts. It can be used to map the file to a piece index (given the piece size). │ │ │ │ │ [report_issue] │ │ │ │ │ -***** file_num_blocks() file_piece_range() file_num_pieces() ***** │ │ │ │ │ +***** file_num_blocks() file_num_pieces() file_piece_range() ***** │ │ │ │ │ +int file_num_pieces (file_index_t index) const; │ │ │ │ │ index_range file_piece_range (file_index_t) const; │ │ │ │ │ int file_num_blocks (file_index_t index) const; │ │ │ │ │ -int file_num_pieces (file_index_t index) const; │ │ │ │ │ Returns the number of pieces or blocks the file atindexspans, under the │ │ │ │ │ assumption that the file is aligned to the start of a piece. This is only │ │ │ │ │ meaningful for v2 torrents, where files are guaranteed such alignment. These │ │ │ │ │ numbers are used to size and navigate the merkle hash tree for each file. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** file_first_piece_node() file_first_block_node() ***** │ │ │ │ │ +***** file_first_block_node() file_first_piece_node() ***** │ │ │ │ │ int file_first_block_node (file_index_t index) const; │ │ │ │ │ int file_first_piece_node (file_index_t index) const; │ │ │ │ │ index of first piece node in the merkle tree │ │ │ │ │ [report_issue] │ │ │ │ │ ***** file_path_hash() ***** │ │ │ │ │ std::uint32_t file_path_hash (file_index_t index, std::string const& save_path) │ │ │ │ │ const; │ │ │ │ │ @@ -4214,17 +4214,17 @@ │ │ │ │ │ returns a bitmask of flags from file_flags_t that apply to file at index. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** file_absolute_path() ***** │ │ │ │ │ bool file_absolute_path (file_index_t index) const; │ │ │ │ │ returns true if the file at the specified index has been renamed to have an │ │ │ │ │ absolute path, i.e. is not anchored in the save path of the torrent. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** file_index_at_piece() file_index_at_offset() ***** │ │ │ │ │ -file_index_t file_index_at_offset (std::int64_t offset) const; │ │ │ │ │ +***** file_index_at_offset() file_index_at_piece() ***** │ │ │ │ │ file_index_t file_index_at_piece (piece_index_t piece) const; │ │ │ │ │ +file_index_t file_index_at_offset (std::int64_t offset) const; │ │ │ │ │ returns the index of the file at the given offset in the torrent │ │ │ │ │ [report_issue] │ │ │ │ │ ***** file_index_for_root() ***** │ │ │ │ │ file_index_t file_index_for_root (sha256_hash const& root_hash) const; │ │ │ │ │ finds the file with the given root hash and returns its index if there is no │ │ │ │ │ file with the root hash, file_index_t{-1} is returned │ │ │ │ │ [report_issue] │ │ │ │ │ @@ -4357,32 +4357,32 @@ │ │ │ │ │ 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 const*) = delete; │ │ │ │ │ + client_data_t& operator= (void*) = delete; │ │ │ │ │ operator void const* () const = delete; │ │ │ │ │ operator void* () const = delete; │ │ │ │ │ - client_data_t& operator= (void*) = delete; │ │ │ │ │ + client_data_t& operator= (void const*) = delete; │ │ │ │ │ │ │ │ │ │ template ::value>::type> │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ***** client_data_t() ***** │ │ │ │ │ client_data_t () = default; │ │ │ │ │ construct a nullptr client data │ │ │ │ │ [report_issue] │ │ │ │ │ -***** const*() operator=() void*() ***** │ │ │ │ │ -client_data_t& operator= (void const*) = delete; │ │ │ │ │ +***** void*() operator=() const*() ***** │ │ │ │ │ +client_data_t& operator= (void*) = delete; │ │ │ │ │ operator void const* () const = delete; │ │ │ │ │ operator void* () const = delete; │ │ │ │ │ -client_data_t& operator= (void*) = delete; │ │ │ │ │ +client_data_t& operator= (void const*) = delete; │ │ │ │ │ we don't allow type-unsafe operations │ │ │ │ │ [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: │ │ │ │ │ @@ -4686,16 +4686,16 @@ │ │ │ │ │ peer_class_type_filter is a simple container for rules for adding and │ │ │ │ │ subtracting peer-classes from peers. It is applied after the peer class filter │ │ │ │ │ is applied (which is based on the peer's IP address). │ │ │ │ │ struct peer_class_type_filter │ │ │ │ │ { │ │ │ │ │ void add (socket_type_t const st, peer_class_t const peer_class); │ │ │ │ │ void remove (socket_type_t const st, peer_class_t const peer_class); │ │ │ │ │ - void disallow (socket_type_t const st, peer_class_t const peer_class); │ │ │ │ │ void allow (socket_type_t const st, peer_class_t const peer_class); │ │ │ │ │ + void disallow (socket_type_t const st, peer_class_t const peer_class); │ │ │ │ │ std::uint32_t apply (socket_type_t const st, std::uint32_t peer_class_mask); │ │ │ │ │ friend bool operator== (peer_class_type_filter const& lhs │ │ │ │ │ , peer_class_type_filter const& rhs); │ │ │ │ │ │ │ │ │ │ enum socket_type_t │ │ │ │ │ { │ │ │ │ │ tcp_socket, │ │ │ │ │ @@ -4709,17 +4709,17 @@ │ │ │ │ │ [report_issue] │ │ │ │ │ ***** remove() add() ***** │ │ │ │ │ void add (socket_type_t const st, peer_class_t const peer_class); │ │ │ │ │ void remove (socket_type_t const st, peer_class_t const peer_class); │ │ │ │ │ add() and remove() adds and removes a peer class to be added to new peers based │ │ │ │ │ on socket type. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** allow() disallow() ***** │ │ │ │ │ -void disallow (socket_type_t const st, peer_class_t const peer_class); │ │ │ │ │ +***** disallow() allow() ***** │ │ │ │ │ void allow (socket_type_t const st, peer_class_t const peer_class); │ │ │ │ │ +void disallow (socket_type_t const st, peer_class_t const peer_class); │ │ │ │ │ disallow() and allow() adds and removes a peer class to be removed from new │ │ │ │ │ peers based on socket type. │ │ │ │ │ The peer_class argument cannot be greater than 31. The bitmasks representing │ │ │ │ │ peer classes in the peer_class_type_filter are 32 bits. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** apply() ***** │ │ │ │ │ std::uint32_t apply (socket_type_t const st, std::uint32_t peer_class_mask); │ │ │ │ │ @@ -4757,15 +4757,15 @@ │ │ │ │ │ │ │ │ │ │ unsigned bytes_progress:15; │ │ │ │ │ unsigned block_size:15; │ │ │ │ │ unsigned state:2; │ │ │ │ │ unsigned num_peers:14; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ -***** peer() set_peer() ***** │ │ │ │ │ +***** set_peer() peer() ***** │ │ │ │ │ void set_peer (tcp::endpoint const& ep); │ │ │ │ │ tcp::endpoint peer () const; │ │ │ │ │ The peer is the ip address of the peer this block was downloaded from. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** enum block_state_t ***** │ │ │ │ │ Declared in "libtorrent/torrent_handle.hpp" │ │ │ │ │ ___________________________________________________________________________ │ │ │ │ │ @@ -4864,102 +4864,102 @@ │ │ │ │ │ flags = {}) const; │ │ │ │ │ void read_piece (piece_index_t piece) const; │ │ │ │ │ bool have_piece (piece_index_t piece) const; │ │ │ │ │ void get_peer_info (std::vector& v) const; │ │ │ │ │ torrent_status status (status_flags_t flags = status_flags_t::all()) const; │ │ │ │ │ std::vector get_download_queue () const; │ │ │ │ │ void get_download_queue (std::vector& queue) const; │ │ │ │ │ - void clear_piece_deadlines () const; │ │ │ │ │ - void reset_piece_deadline (piece_index_t index) const; │ │ │ │ │ void set_piece_deadline (piece_index_t index, int deadline, deadline_flags_t │ │ │ │ │ flags = {}) const; │ │ │ │ │ - void file_progress (std::vector& progress, │ │ │ │ │ -file_progress_flags_t flags = {}) const; │ │ │ │ │ + void reset_piece_deadline (piece_index_t index) const; │ │ │ │ │ + void clear_piece_deadlines () const; │ │ │ │ │ std::vector file_progress (file_progress_flags_t flags = {}) │ │ │ │ │ const; │ │ │ │ │ + void file_progress (std::vector& progress, │ │ │ │ │ +file_progress_flags_t flags = {}) const; │ │ │ │ │ std::vector file_status () const; │ │ │ │ │ void clear_error () const; │ │ │ │ │ - void replace_trackers (std::vector const&) const; │ │ │ │ │ void add_tracker (announce_entry const&) const; │ │ │ │ │ + void replace_trackers (std::vector const&) const; │ │ │ │ │ std::vector trackers () const; │ │ │ │ │ - std::set url_seeds () const; │ │ │ │ │ void remove_url_seed (std::string const& url) const; │ │ │ │ │ void add_url_seed (std::string const& url) const; │ │ │ │ │ - void remove_http_seed (std::string const& url) const; │ │ │ │ │ + std::set url_seeds () const; │ │ │ │ │ std::set http_seeds () const; │ │ │ │ │ void add_http_seed (std::string const& url) const; │ │ │ │ │ + void remove_http_seed (std::string const& url) const; │ │ │ │ │ void add_extension ( │ │ │ │ │ std::function(torrent_handle const&, │ │ │ │ │ client_data_t)> const& ext │ │ │ │ │ , client_data_t userdata = client_data_t{}); │ │ │ │ │ bool set_metadata (span metadata) const; │ │ │ │ │ bool is_valid () const; │ │ │ │ │ - void pause (pause_flags_t flags = {}) const; │ │ │ │ │ void resume () const; │ │ │ │ │ + void pause (pause_flags_t flags = {}) const; │ │ │ │ │ void set_flags (torrent_flags_t flags, torrent_flags_t mask) const; │ │ │ │ │ - torrent_flags_t flags () const; │ │ │ │ │ - void set_flags (torrent_flags_t flags) const; │ │ │ │ │ void unset_flags (torrent_flags_t flags) const; │ │ │ │ │ + void set_flags (torrent_flags_t flags) const; │ │ │ │ │ + torrent_flags_t flags () const; │ │ │ │ │ void flush_cache () const; │ │ │ │ │ void force_recheck () const; │ │ │ │ │ void save_resume_data (resume_data_flags_t flags = {}) const; │ │ │ │ │ bool need_save_resume_data () const; │ │ │ │ │ - queue_position_t queue_position () const; │ │ │ │ │ void queue_position_down () const; │ │ │ │ │ + void queue_position_bottom () const; │ │ │ │ │ void queue_position_top () const; │ │ │ │ │ void queue_position_up () const; │ │ │ │ │ - void queue_position_bottom () const; │ │ │ │ │ + queue_position_t queue_position () const; │ │ │ │ │ void queue_position_set (queue_position_t p) const; │ │ │ │ │ - void set_ssl_certificate_buffer (std::string const& certificate │ │ │ │ │ - , std::string const& private_key │ │ │ │ │ - , std::string const& dh_params); │ │ │ │ │ void set_ssl_certificate (std::string const& certificate │ │ │ │ │ , std::string const& private_key │ │ │ │ │ , std::string const& dh_params │ │ │ │ │ , std::string const& passphrase = ""); │ │ │ │ │ + void set_ssl_certificate_buffer (std::string const& certificate │ │ │ │ │ + , std::string const& private_key │ │ │ │ │ + , std::string const& dh_params); │ │ │ │ │ std::shared_ptr torrent_file_with_hashes () const; │ │ │ │ │ std::shared_ptr torrent_file () const; │ │ │ │ │ std::vector> piece_layers () const; │ │ │ │ │ void piece_availability (std::vector& avail) const; │ │ │ │ │ std::vector get_piece_priorities () const; │ │ │ │ │ void piece_priority (piece_index_t index, download_priority_t priority) │ │ │ │ │ const; │ │ │ │ │ void prioritize_pieces (std::vector> const& pieces) const; │ │ │ │ │ - download_priority_t piece_priority (piece_index_t index) const; │ │ │ │ │ void prioritize_pieces (std::vector const& pieces) │ │ │ │ │ const; │ │ │ │ │ - void file_priority (file_index_t index, download_priority_t priority) const; │ │ │ │ │ + download_priority_t piece_priority (piece_index_t index) const; │ │ │ │ │ download_priority_t file_priority (file_index_t index) const; │ │ │ │ │ - std::vector get_file_priorities () const; │ │ │ │ │ void prioritize_files (std::vector const& files) const; │ │ │ │ │ - void force_lsd_announce () const; │ │ │ │ │ + std::vector get_file_priorities () const; │ │ │ │ │ + void file_priority (file_index_t index, download_priority_t priority) const; │ │ │ │ │ void force_reannounce (int seconds = 0, int idx = -1, reannounce_flags_t = │ │ │ │ │ {}) const; │ │ │ │ │ + void force_lsd_announce () const; │ │ │ │ │ void force_dht_announce () const; │ │ │ │ │ void scrape_tracker (int idx = -1) const; │ │ │ │ │ + int upload_limit () const; │ │ │ │ │ void set_download_limit (int limit) const; │ │ │ │ │ int download_limit () const; │ │ │ │ │ - int upload_limit () const; │ │ │ │ │ void set_upload_limit (int limit) const; │ │ │ │ │ void connect_peer (tcp::endpoint const& adr, peer_source_flags_t source = {} │ │ │ │ │ , pex_flags_t flags = pex_encryption | pex_utp | pex_holepunch) const; │ │ │ │ │ void clear_peers (); │ │ │ │ │ void set_max_uploads (int max_uploads) const; │ │ │ │ │ int max_uploads () const; │ │ │ │ │ - int max_connections () const; │ │ │ │ │ void set_max_connections (int max_connections) const; │ │ │ │ │ + int max_connections () const; │ │ │ │ │ void move_storage (std::string const& save_path │ │ │ │ │ , move_flags_t flags = move_flags_t::always_replace_files │ │ │ │ │ ) const; │ │ │ │ │ void rename_file (file_index_t index, std::string const& new_name) const; │ │ │ │ │ - sha1_hash info_hash () const; │ │ │ │ │ info_hash_t info_hashes () const; │ │ │ │ │ - bool operator!= (const torrent_handle& h) const; │ │ │ │ │ + sha1_hash info_hash () const; │ │ │ │ │ bool operator< (const torrent_handle& h) const; │ │ │ │ │ + bool operator!= (const torrent_handle& h) const; │ │ │ │ │ bool operator== (const torrent_handle& h) const; │ │ │ │ │ std::uint32_t id () const; │ │ │ │ │ std::shared_ptr native_handle () const; │ │ │ │ │ client_data_t userdata () const; │ │ │ │ │ bool in_session () const; │ │ │ │ │ │ │ │ │ │ static constexpr add_piece_flags_t overwrite_existing = 0_bit; │ │ │ │ │ @@ -5046,19 +5046,19 @@ │ │ │ │ │ ***** get_download_queue() ***** │ │ │ │ │ std::vector get_download_queue () const; │ │ │ │ │ void get_download_queue (std::vector& queue) const; │ │ │ │ │ get_download_queue() returns a vector with information about pieces that are │ │ │ │ │ partially downloaded or not downloaded but partially requested. See │ │ │ │ │ partial_piece_info for the fields in the returned vector. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** clear_piece_deadlines() set_piece_deadline() reset_piece_deadline() ***** │ │ │ │ │ -void clear_piece_deadlines () const; │ │ │ │ │ -void reset_piece_deadline (piece_index_t index) const; │ │ │ │ │ +***** set_piece_deadline() reset_piece_deadline() clear_piece_deadlines() ***** │ │ │ │ │ void set_piece_deadline (piece_index_t index, int deadline, deadline_flags_t │ │ │ │ │ flags = {}) const; │ │ │ │ │ +void reset_piece_deadline (piece_index_t index) const; │ │ │ │ │ +void clear_piece_deadlines () const; │ │ │ │ │ This function sets or resets the deadline associated with a specific piece │ │ │ │ │ index (index). libtorrent will attempt to download this entire piece before the │ │ │ │ │ deadline expires. This is not necessarily possible, but pieces with a more │ │ │ │ │ recent deadline will always be prioritized over pieces with a deadline further │ │ │ │ │ ahead in time. The deadline (and flags) of a piece can be changed by calling │ │ │ │ │ this function again. │ │ │ │ │ If the piece is already downloaded when this call is made, nothing happens, │ │ │ │ │ @@ -5067,18 +5067,18 @@ │ │ │ │ │ deadline is the number of milliseconds until this piece should be completed. │ │ │ │ │ reset_piece_deadline removes the deadline from the piece. If it hasn't already │ │ │ │ │ been downloaded, it will no longer be considered a priority. │ │ │ │ │ clear_piece_deadlines() removes deadlines on all pieces in the torrent. As if │ │ │ │ │ reset_piece_deadline() was called on all pieces. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** file_progress() ***** │ │ │ │ │ -void file_progress (std::vector& progress, file_progress_flags_t │ │ │ │ │ -flags = {}) const; │ │ │ │ │ std::vector file_progress (file_progress_flags_t flags = {}) │ │ │ │ │ const; │ │ │ │ │ +void file_progress (std::vector& progress, file_progress_flags_t │ │ │ │ │ +flags = {}) const; │ │ │ │ │ This function fills in the supplied vector, or returns a vector, with the │ │ │ │ │ number of bytes downloaded of each file in this torrent. The progress values │ │ │ │ │ are ordered the same as the files in the torrent_info. │ │ │ │ │ This operation is not very cheap. Its complexity is O(n + mj). Where n is the │ │ │ │ │ number of files, m is the number of currently downloading pieces and j is the │ │ │ │ │ number of blocks in a piece. │ │ │ │ │ The flags parameter can be used to specify the granularity of the file │ │ │ │ │ @@ -5099,17 +5099,17 @@ │ │ │ │ │ See open_file_state │ │ │ │ │ [report_issue] │ │ │ │ │ ***** clear_error() ***** │ │ │ │ │ void clear_error () const; │ │ │ │ │ If the torrent is in an error state (i.e. torrent_status::error is non-empty), │ │ │ │ │ this will clear the error and start the torrent again. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** replace_trackers() add_tracker() trackers() ***** │ │ │ │ │ -void replace_trackers (std::vector const&) const; │ │ │ │ │ +***** add_tracker() replace_trackers() trackers() ***** │ │ │ │ │ void add_tracker (announce_entry const&) const; │ │ │ │ │ +void replace_trackers (std::vector const&) const; │ │ │ │ │ std::vector trackers () const; │ │ │ │ │ trackers() will return the list of trackers for this torrent. The announce │ │ │ │ │ entry contains both a string url which specify the announce url for the tracker │ │ │ │ │ as well as an int tier, which is specifies the order in which this tracker is │ │ │ │ │ tried. If you want libtorrent to use another list of trackers for this torrent, │ │ │ │ │ you can use replace_trackers() which takes a list of the same form as the one │ │ │ │ │ returned from trackers() and will replace it. If you want an immediate effect, │ │ │ │ │ @@ -5118,29 +5118,29 @@ │ │ │ │ │ is, it doesn't do anything. If it's not in the current set of trackers, it will │ │ │ │ │ insert it in the tier specified in the announce_entry. │ │ │ │ │ The updated set of trackers will be saved in the resume data, and when a │ │ │ │ │ torrent is started with resume data, the trackers from the resume data will │ │ │ │ │ replace the original ones. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** remove_url_seed() add_url_seed() url_seeds() ***** │ │ │ │ │ -std::set url_seeds () const; │ │ │ │ │ void remove_url_seed (std::string const& url) const; │ │ │ │ │ void add_url_seed (std::string const& url) const; │ │ │ │ │ +std::set url_seeds () const; │ │ │ │ │ add_url_seed() adds another url to the torrent's list of url seeds. If the │ │ │ │ │ given url already exists in that list, the call has no effect. The torrent will │ │ │ │ │ connect to the server and try to download pieces from it, unless it's paused, │ │ │ │ │ queued, checking or seeding. remove_url_seed() removes the given url if it │ │ │ │ │ exists already. url_seeds() return a set of the url seeds currently in this │ │ │ │ │ torrent. Note that URLs that fails may be removed automatically from the list. │ │ │ │ │ See http_seeding for more information. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** add_http_seed() http_seeds() remove_http_seed() ***** │ │ │ │ │ -void remove_http_seed (std::string const& url) const; │ │ │ │ │ +***** http_seeds() add_http_seed() remove_http_seed() ***** │ │ │ │ │ std::set http_seeds () const; │ │ │ │ │ void add_http_seed (std::string const& url) const; │ │ │ │ │ +void remove_http_seed (std::string const& url) const; │ │ │ │ │ These functions are identical as the *_url_seed() variants, but they operate on │ │ │ │ │ BEP_17 web seeds instead of BEP_19. │ │ │ │ │ See http_seeding for more information. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** add_extension() ***** │ │ │ │ │ void add_extension ( │ │ │ │ │ std::function(torrent_handle const&, │ │ │ │ │ @@ -5171,36 +5171,36 @@ │ │ │ │ │ and false afterward. │ │ │ │ │ Clients should only use is_valid() to determine if the result of session:: │ │ │ │ │ find_torrent() was successful. │ │ │ │ │ Unlike other member functions which return a value, is_valid() completes │ │ │ │ │ immediately, without blocking on a result from the network thread. Also unlike │ │ │ │ │ other functions, it never throws the system_error exception. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** resume() pause() ***** │ │ │ │ │ -void pause (pause_flags_t flags = {}) const; │ │ │ │ │ +***** pause() resume() ***** │ │ │ │ │ void resume () const; │ │ │ │ │ +void pause (pause_flags_t flags = {}) const; │ │ │ │ │ pause(), and resume() will disconnect all peers and reconnect all peers │ │ │ │ │ respectively. When a torrent is paused, it will however remember all share │ │ │ │ │ ratios to all peers and remember all potential (not connected) peers. Torrents │ │ │ │ │ may be paused automatically if there is a file error (e.g. disk full) or │ │ │ │ │ something similar. See file_error_alert. │ │ │ │ │ For possible values of the flags parameter, see pause_flags_t. │ │ │ │ │ To know if a torrent is paused or not, call torrent_handle::flags() and check │ │ │ │ │ for the torrent_status::paused flag. │ │ │ │ │ Note │ │ │ │ │ Torrents that are auto-managed may be automatically resumed again. It does not │ │ │ │ │ make sense to pause an auto-managed torrent without making it not auto-managed │ │ │ │ │ first. Torrents are auto-managed by default when added to the session. For more │ │ │ │ │ information, see queuing. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** unset_flags() flags() set_flags() ***** │ │ │ │ │ +***** set_flags() flags() unset_flags() ***** │ │ │ │ │ void set_flags (torrent_flags_t flags, torrent_flags_t mask) const; │ │ │ │ │ -torrent_flags_t flags () const; │ │ │ │ │ -void set_flags (torrent_flags_t flags) const; │ │ │ │ │ void unset_flags (torrent_flags_t flags) const; │ │ │ │ │ +void set_flags (torrent_flags_t flags) const; │ │ │ │ │ +torrent_flags_t flags () const; │ │ │ │ │ sets and gets the torrent state flags. See torrent_flags_t. The set_flags │ │ │ │ │ overload that take a mask will affect all flags part of the mask, and set their │ │ │ │ │ values to what the flags argument is set to. This allows clearing and setting │ │ │ │ │ flags in a single function call. The set_flags overload that just takes flags, │ │ │ │ │ sets all the specified flags and leave any other flags unchanged. unset_flags │ │ │ │ │ clears the specified flags, while leaving any other flags unchanged. │ │ │ │ │ Theseed_modeflag is special, it can only be cleared once the torrent has been │ │ │ │ │ @@ -5320,21 +5320,21 @@ │ │ │ │ │ saving resume data periodically, it makes sense to skip any torrent which │ │ │ │ │ hasn't downloaded anything since the last time. │ │ │ │ │ Note │ │ │ │ │ A torrent's resume data is considered saved as soon as the │ │ │ │ │ save_resume_data_alert is posted. It is important to make sure this alert is │ │ │ │ │ received and handled in order for this function to be meaningful. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** queue_position() queue_position_down() queue_position_top() │ │ │ │ │ -queue_position_up() queue_position_bottom() ***** │ │ │ │ │ -queue_position_t queue_position () const; │ │ │ │ │ +***** queue_position_top() queue_position_bottom() queue_position_down() │ │ │ │ │ +queue_position_up() queue_position() ***** │ │ │ │ │ void queue_position_down () const; │ │ │ │ │ +void queue_position_bottom () const; │ │ │ │ │ void queue_position_top () const; │ │ │ │ │ void queue_position_up () const; │ │ │ │ │ -void queue_position_bottom () const; │ │ │ │ │ +queue_position_t queue_position () const; │ │ │ │ │ Every torrent that is added is assigned a queue position exactly one greater │ │ │ │ │ than the greatest queue position of all existing torrents. Torrents that are │ │ │ │ │ being seeded have -1 as their queue position, since they're no longer in line │ │ │ │ │ to be downloaded. │ │ │ │ │ When a torrent is removed or turns into a seed, all torrents with greater queue │ │ │ │ │ positions have their positions decreased to fill in the space in the sequence. │ │ │ │ │ queue_position() returns the torrent's position in the download queue. The │ │ │ │ │ @@ -5349,21 +5349,21 @@ │ │ │ │ │ ***** queue_position_set() ***** │ │ │ │ │ void queue_position_set (queue_position_t p) const; │ │ │ │ │ updates the position in the queue for this torrent. The relative order of all │ │ │ │ │ other torrents remain intact but their numerical queue position shifts to make │ │ │ │ │ space for this torrent's new position │ │ │ │ │ [report_issue] │ │ │ │ │ ***** set_ssl_certificate_buffer() set_ssl_certificate() ***** │ │ │ │ │ -void set_ssl_certificate_buffer (std::string const& certificate │ │ │ │ │ - , std::string const& private_key │ │ │ │ │ - , std::string const& dh_params); │ │ │ │ │ void set_ssl_certificate (std::string const& certificate │ │ │ │ │ , std::string const& private_key │ │ │ │ │ , std::string const& dh_params │ │ │ │ │ , std::string const& passphrase = ""); │ │ │ │ │ +void set_ssl_certificate_buffer (std::string const& certificate │ │ │ │ │ + , std::string const& private_key │ │ │ │ │ + , std::string const& dh_params); │ │ │ │ │ For SSL torrents, use this to specify a path to a .pem file to use as this │ │ │ │ │ client's certificate. The certificate must be signed by the certificate in the │ │ │ │ │ .torrent file to be valid. │ │ │ │ │ The set_ssl_certificate_buffer() overload takes the actual certificate, private │ │ │ │ │ key and DH params as strings, rather than paths to files. │ │ │ │ │ cert is a path to the (signed) certificate in .pem format corresponding to this │ │ │ │ │ torrent. │ │ │ │ │ @@ -5377,15 +5377,15 @@ │ │ │ │ │ Note that when a torrent first starts up, and it needs a certificate, it will │ │ │ │ │ suspend connecting to any peers until it has one. It's typically desirable to │ │ │ │ │ resume the torrent after setting the SSL certificate. │ │ │ │ │ If you receive a torrent_need_cert_alert, you need to call this to provide a │ │ │ │ │ valid cert. If you don't have a cert you won't be allowed to connect to any │ │ │ │ │ peers. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** torrent_file() torrent_file_with_hashes() ***** │ │ │ │ │ +***** torrent_file_with_hashes() torrent_file() ***** │ │ │ │ │ std::shared_ptr torrent_file_with_hashes () const; │ │ │ │ │ std::shared_ptr torrent_file () const; │ │ │ │ │ torrent_file() returns a pointer to the torrent_info object associated with │ │ │ │ │ this torrent. The torrent_info object may be a copy of the internal object. If │ │ │ │ │ the torrent doesn't have metadata, the pointer will not be initialized (i.e. a │ │ │ │ │ nullptr). The torrent may be in a state without metadata only if it was started │ │ │ │ │ without a .torrent file, e.g. by being added by magnet link. │ │ │ │ │ @@ -5422,21 +5422,21 @@ │ │ │ │ │ Fills the specified std::vector with the availability for each piece in │ │ │ │ │ this torrent. libtorrent does not keep track of availability for seeds, so if │ │ │ │ │ the torrent is seeding the availability for all pieces is reported as 0. │ │ │ │ │ The piece availability is the number of peers that we are connected that has │ │ │ │ │ advertised having a particular piece. This is the information that libtorrent │ │ │ │ │ uses in order to prefer picking rare pieces. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** prioritize_pieces() get_piece_priorities() piece_priority() ***** │ │ │ │ │ +***** get_piece_priorities() piece_priority() prioritize_pieces() ***** │ │ │ │ │ std::vector get_piece_priorities () const; │ │ │ │ │ void piece_priority (piece_index_t index, download_priority_t priority) const; │ │ │ │ │ void prioritize_pieces (std::vector> const& pieces) const; │ │ │ │ │ -download_priority_t piece_priority (piece_index_t index) const; │ │ │ │ │ void prioritize_pieces (std::vector const& pieces) const; │ │ │ │ │ +download_priority_t piece_priority (piece_index_t index) const; │ │ │ │ │ These functions are used to set and get the priority of individual pieces. By │ │ │ │ │ default all pieces have priority 4. That means that the random rarest first │ │ │ │ │ algorithm is effectively active for all pieces. You may however change the │ │ │ │ │ priority of individual pieces. There are 8 priority levels. 0 means not to │ │ │ │ │ download the piece at all. Otherwise, lower priority values means less likely │ │ │ │ │ to be picked. Piece priority takes precedence over piece availability. Every │ │ │ │ │ piece with priority 7 will be attempted to be picked before a priority 6 piece │ │ │ │ │ @@ -5456,19 +5456,19 @@ │ │ │ │ │ where the piece index or priority is out of range, are not allowed. │ │ │ │ │ get_piece_priorities returns a vector with one element for each piece in the │ │ │ │ │ torrent. Each element is the current priority of that piece. │ │ │ │ │ It's possible to cancel the effect of file priorities by setting the priorities │ │ │ │ │ for the affected pieces. Care has to be taken when mixing usage of file- and │ │ │ │ │ piece priorities. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** prioritize_files() file_priority() get_file_priorities() ***** │ │ │ │ │ -void file_priority (file_index_t index, download_priority_t priority) const; │ │ │ │ │ +***** get_file_priorities() file_priority() prioritize_files() ***** │ │ │ │ │ download_priority_t file_priority (file_index_t index) const; │ │ │ │ │ -std::vector get_file_priorities () const; │ │ │ │ │ void prioritize_files (std::vector const& files) const; │ │ │ │ │ +std::vector get_file_priorities () const; │ │ │ │ │ +void file_priority (file_index_t index, download_priority_t priority) const; │ │ │ │ │ index must be in the range [0, number_of_files). │ │ │ │ │ file_priority() queries or sets the priority of file index. │ │ │ │ │ prioritize_files() takes a vector that has at as many elements as there are │ │ │ │ │ files in the torrent. Each entry is the priority of that file. The function │ │ │ │ │ sets the priorities of all the pieces in the torrent based on the vector. │ │ │ │ │ get_file_priorities() returns a vector with the priorities of all files. │ │ │ │ │ The priority values are the same as for piece_priority(). See │ │ │ │ │ @@ -5487,18 +5487,18 @@ │ │ │ │ │ When combining file- and piece priorities, the resume file will record both. │ │ │ │ │ When loading the resume data, the file priorities will be applied first, then │ │ │ │ │ the piece priorities. │ │ │ │ │ Moving data from a file into the part file is currently not supported. If a │ │ │ │ │ file has its priority set to 0 after it has already been created, it will not │ │ │ │ │ be moved into the partfile. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** force_dht_announce() force_lsd_announce() force_reannounce() ***** │ │ │ │ │ -void force_lsd_announce () const; │ │ │ │ │ +***** force_reannounce() force_dht_announce() force_lsd_announce() ***** │ │ │ │ │ void force_reannounce (int seconds = 0, int idx = -1, reannounce_flags_t = {}) │ │ │ │ │ const; │ │ │ │ │ +void force_lsd_announce () const; │ │ │ │ │ void force_dht_announce () const; │ │ │ │ │ force_reannounce() will force this torrent to do another tracker request, to │ │ │ │ │ receive new peers. The seconds argument specifies how many seconds from now to │ │ │ │ │ issue the tracker announces. │ │ │ │ │ If the tracker's min_interval has not passed since the last announce, the │ │ │ │ │ forced announce will be scheduled to happen immediately as the min_interval │ │ │ │ │ expires. This is to honor trackers minimum re-announce interval settings. │ │ │ │ │ @@ -5517,19 +5517,19 @@ │ │ │ │ │ A scrape request queries the tracker for statistics such as total number of │ │ │ │ │ incomplete peers, complete peers, number of downloads etc. │ │ │ │ │ This request will specifically update the num_complete and num_incomplete │ │ │ │ │ fields in the torrent_status struct once it completes. When it completes, it │ │ │ │ │ will generate a scrape_reply_alert. If it fails, it will generate a │ │ │ │ │ scrape_failed_alert. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** download_limit() set_download_limit() set_upload_limit() upload_limit() │ │ │ │ │ +***** upload_limit() set_upload_limit() set_download_limit() download_limit() │ │ │ │ │ ***** │ │ │ │ │ +int upload_limit () const; │ │ │ │ │ void set_download_limit (int limit) const; │ │ │ │ │ int download_limit () const; │ │ │ │ │ -int upload_limit () const; │ │ │ │ │ void set_upload_limit (int limit) const; │ │ │ │ │ set_upload_limit will limit the upload bandwidth used by this particular │ │ │ │ │ torrent to the limit you set. It is given as the number of bytes per second the │ │ │ │ │ torrent is allowed to upload. set_download_limit works the same way but for │ │ │ │ │ download bandwidth instead of upload bandwidth. Note that setting a higher │ │ │ │ │ limit on a torrent then the global limit (settings_pack::upload_rate_limit) │ │ │ │ │ will not override the global rate limit. The torrent can never upload more than │ │ │ │ │ @@ -5563,16 +5563,16 @@ │ │ │ │ │ set_max_uploads() sets the maximum number of peers that's unchoked at the same │ │ │ │ │ time on this torrent. If you set this to -1, there will be no limit. This │ │ │ │ │ defaults to infinite. The primary setting controlling this is the global │ │ │ │ │ unchoke slots limit, set by unchoke_slots_limit in settings_pack. │ │ │ │ │ max_uploads() returns the current settings. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** set_max_connections() max_connections() ***** │ │ │ │ │ -int max_connections () const; │ │ │ │ │ void set_max_connections (int max_connections) const; │ │ │ │ │ +int max_connections () const; │ │ │ │ │ set_max_connections() sets the maximum number of connection this torrent will │ │ │ │ │ open. If all connections are used up, incoming connections may be refused or │ │ │ │ │ poor connections may be closed. This must be at least 2. The default is │ │ │ │ │ unlimited number of connections. If -1 is given to the function, it means │ │ │ │ │ unlimited. There is also a global limit of the number of connections, set by │ │ │ │ │ connections_limit in settings_pack. │ │ │ │ │ max_connections() returns the current settings. │ │ │ │ │ @@ -5622,26 +5622,26 @@ │ │ │ │ │ [report_issue] │ │ │ │ │ ***** rename_file() ***** │ │ │ │ │ void rename_file (file_index_t index, std::string const& new_name) const; │ │ │ │ │ Renames the file with the given index asynchronously. The rename operation is │ │ │ │ │ complete when either a file_renamed_alert or file_rename_failed_alert is │ │ │ │ │ posted. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** info_hash() info_hashes() ***** │ │ │ │ │ -sha1_hash info_hash () const; │ │ │ │ │ +***** info_hashes() info_hash() ***** │ │ │ │ │ info_hash_t info_hashes () const; │ │ │ │ │ +sha1_hash info_hash () const; │ │ │ │ │ returns the info-hash(es) of the torrent. If this handle is to a torrent that │ │ │ │ │ hasn't loaded yet (for instance by being added) by a URL, the returned value is │ │ │ │ │ undefined. The info_hash() returns the SHA-1 info-hash for v1 torrents and a │ │ │ │ │ truncated hash for v2 torrents. For the full v2 info-hash, use info_hashes() │ │ │ │ │ instead. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** operator<() operator==() operator!=() ***** │ │ │ │ │ -bool operator!= (const torrent_handle& h) const; │ │ │ │ │ +***** operator<() operator!=() operator==() ***** │ │ │ │ │ bool operator< (const torrent_handle& h) const; │ │ │ │ │ +bool operator!= (const torrent_handle& h) const; │ │ │ │ │ bool operator== (const torrent_handle& h) const; │ │ │ │ │ comparison operators. The order of the torrents is unspecified but stable. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** id() ***** │ │ │ │ │ std::uint32_t id () const; │ │ │ │ │ returns a unique identifier for this torrent. It's not a dense index. It's not │ │ │ │ │ preserved across sessions. │ │ │ │ │ @@ -5873,15 +5873,15 @@ │ │ │ │ │ [report_issue] │ │ │ │ │ ***** remove_torrent() ***** │ │ │ │ │ virtual void remove_torrent (storage_index_t) = 0; │ │ │ │ │ remove the storage with the specified index. This is not expected to delete any │ │ │ │ │ files from disk, just to clean up any resources associated with the specified │ │ │ │ │ storage. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** async_write() async_read() ***** │ │ │ │ │ +***** async_read() async_write() ***** │ │ │ │ │ virtual void async_read (storage_index_t storage, peer_request const& r │ │ │ │ │ , std::function handler │ │ │ │ │ , disk_job_flags_t flags = {}) = 0; │ │ │ │ │ virtual bool async_write (storage_index_t storage, peer_request const& r │ │ │ │ │ , char const* buf, std::shared_ptr o │ │ │ │ │ , std::function handler │ │ │ │ │ , disk_job_flags_t flags = {}) = 0; │ │ │ │ │ @@ -6075,22 +6075,22 @@ │ │ │ │ │ a unique, owning, reference to the storage of a torrent in a disk io subsystem │ │ │ │ │ (class that implements disk_interface). This is held by the internal libtorrent │ │ │ │ │ torrent object to tie the storage object allocated for a torrent to the │ │ │ │ │ lifetime of the internal torrent object. When a torrent is removed from the │ │ │ │ │ session, this holder is destructed and will inform the disk object. │ │ │ │ │ struct storage_holder │ │ │ │ │ { │ │ │ │ │ - ~storage_holder (); │ │ │ │ │ - storage_holder () = default; │ │ │ │ │ storage_holder (storage_index_t idx, disk_interface& disk_io); │ │ │ │ │ + storage_holder () = default; │ │ │ │ │ + ~storage_holder (); │ │ │ │ │ explicit operator bool () const; │ │ │ │ │ operator storage_index_t () const; │ │ │ │ │ void reset (); │ │ │ │ │ - storage_holder (storage_holder const&) = delete; │ │ │ │ │ storage_holder& operator= (storage_holder const&) = delete; │ │ │ │ │ + storage_holder (storage_holder const&) = delete; │ │ │ │ │ storage_holder (storage_holder&& rhs) noexcept; │ │ │ │ │ storage_holder& operator= (storage_holder&& rhs) noexcept; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ****** disk_observer ****** │ │ │ │ │ Declared in "libtorrent/disk_observer.hpp" │ │ │ │ │ struct disk_observer │ │ │ │ │ @@ -6117,18 +6117,18 @@ │ │ │ │ │ Declared in "libtorrent/disk_buffer_holder.hpp" │ │ │ │ │ The disk buffer holder acts like a unique_ptr that frees a disk buffer when │ │ │ │ │ it's destructed │ │ │ │ │ If this buffer holder is moved-from, default constructed or reset, data() will │ │ │ │ │ return nullptr. │ │ │ │ │ struct disk_buffer_holder │ │ │ │ │ { │ │ │ │ │ - disk_buffer_holder (disk_buffer_holder&&) noexcept; │ │ │ │ │ disk_buffer_holder& operator= (disk_buffer_holder&&) & noexcept; │ │ │ │ │ - disk_buffer_holder& operator= (disk_buffer_holder const&) = delete; │ │ │ │ │ + disk_buffer_holder (disk_buffer_holder&&) noexcept; │ │ │ │ │ disk_buffer_holder (disk_buffer_holder const&) = delete; │ │ │ │ │ + disk_buffer_holder& operator= (disk_buffer_holder const&) = delete; │ │ │ │ │ disk_buffer_holder (buffer_allocator_interface& alloc │ │ │ │ │ , char* buf, int sz) noexcept; │ │ │ │ │ disk_buffer_holder () noexcept = default; │ │ │ │ │ ~disk_buffer_holder (); │ │ │ │ │ char* data () const noexcept; │ │ │ │ │ void reset (); │ │ │ │ │ void swap (disk_buffer_holder& h) noexcept; │ │ │ │ │ @@ -6174,18 +6174,18 @@ │ │ │ │ │ [report_issue] │ │ │ │ │ ****** settings_interface ****** │ │ │ │ │ Declared in "libtorrent/settings_pack.hpp" │ │ │ │ │ the common interface to settings_pack and the internal representation of │ │ │ │ │ settings. │ │ │ │ │ struct settings_interface │ │ │ │ │ { │ │ │ │ │ - virtual bool has_val (int name) const = 0; │ │ │ │ │ - virtual void set_str (int name, std::string val) = 0; │ │ │ │ │ virtual void set_bool (int name, bool val) = 0; │ │ │ │ │ + virtual void set_str (int name, std::string val) = 0; │ │ │ │ │ virtual void set_int (int name, int val) = 0; │ │ │ │ │ + virtual bool has_val (int name) const = 0; │ │ │ │ │ virtual std::string const& get_str (int name) const = 0; │ │ │ │ │ virtual int get_int (int name) const = 0; │ │ │ │ │ virtual bool get_bool (int name) const = 0; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ****** file_open_mode_t ****** │ │ │ │ │ Declared in "libtorrent/disk_interface.hpp" │ │ │ │ │ @@ -7096,24 +7096,24 @@ │ │ │ │ │ The storage_moved_alert is generated when all the disk IO has completed and the │ │ │ │ │ files have been moved, as an effect of a call to torrent_handle::move_storage. │ │ │ │ │ This is useful to synchronize with the actual disk. The storage_path() member │ │ │ │ │ return the new path of the storage. │ │ │ │ │ struct storage_moved_alert final : torrent_alert │ │ │ │ │ { │ │ │ │ │ std::string message () const override; │ │ │ │ │ - char const* old_path () const; │ │ │ │ │ char const* storage_path () const; │ │ │ │ │ + char const* old_path () const; │ │ │ │ │ │ │ │ │ │ static constexpr alert_category_t static_category = alert_category:: │ │ │ │ │ storage; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ -***** storage_path() old_path() ***** │ │ │ │ │ -char const* old_path () const; │ │ │ │ │ +***** old_path() storage_path() ***** │ │ │ │ │ char const* storage_path () const; │ │ │ │ │ +char const* old_path () const; │ │ │ │ │ the path the torrent was moved to and from, respectively. │ │ │ │ │ [report_issue] │ │ │ │ │ ****** storage_moved_failed_alert ****** │ │ │ │ │ Declared in "libtorrent/alert_types.hpp" │ │ │ │ │ The storage_moved_failed_alert is generated when an attempt to move the │ │ │ │ │ storage, via torrent_handle::move_storage(), fails. │ │ │ │ │ struct storage_moved_failed_alert final : torrent_alert │ │ │ │ │ @@ -8356,15 +8356,15 @@ │ │ │ │ │ std::vector> nodes () const; │ │ │ │ │ int num_nodes () const; │ │ │ │ │ │ │ │ │ │ static constexpr alert_category_t static_category = alert_category::dht; │ │ │ │ │ sha1_hash node_id; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ -***** nodes() num_nodes() ***** │ │ │ │ │ +***** num_nodes() nodes() ***** │ │ │ │ │ std::vector> nodes () const; │ │ │ │ │ int num_nodes () const; │ │ │ │ │ the number of nodes in the routing table and the actual nodes. │ │ │ │ │ [report_issue] │ │ │ │ │ node_id │ │ │ │ │ the local DHT node's node-ID this routing table belongs to │ │ │ │ │ [report_issue] │ │ │ │ │ @@ -8400,15 +8400,15 @@ │ │ │ │ │ dht_operation; │ │ │ │ │ sha1_hash node_id; │ │ │ │ │ aux::noexcept_movable endpoint; │ │ │ │ │ time_duration const interval; │ │ │ │ │ int const num_infohashes; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ -***** num_samples() samples() ***** │ │ │ │ │ +***** samples() num_samples() ***** │ │ │ │ │ std::vector samples () const; │ │ │ │ │ int num_samples () const; │ │ │ │ │ returns the number of info-hashes returned by the node, as well as the actual │ │ │ │ │ info-hashes. num_samples() is more efficient than samples().size(). │ │ │ │ │ [report_issue] │ │ │ │ │ ***** num_nodes() ***** │ │ │ │ │ int num_nodes () const; │ │ │ │ │ @@ -8455,17 +8455,17 @@ │ │ │ │ │ Declared in "libtorrent/alert_types.hpp" │ │ │ │ │ this alert is posted to indicate to the client that some alerts were dropped. │ │ │ │ │ Dropped meaning that the alert failed to be delivered to the client. The most │ │ │ │ │ common cause of such failure is that the internal alert queue grew too big │ │ │ │ │ (controlled by alert_queue_size). │ │ │ │ │ struct alerts_dropped_alert final : alert │ │ │ │ │ { │ │ │ │ │ + std::string message () const override; │ │ │ │ │ static_assert (num_alert_types <= abi_alert_count, "need to increase bitset. │ │ │ │ │ This is an ABI break"); │ │ │ │ │ - std::string message () const override; │ │ │ │ │ │ │ │ │ │ static constexpr alert_category_t static_category = alert_category::error; │ │ │ │ │ std::bitset dropped_alerts; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ dropped_alerts │ │ │ │ │ a bitmask indicating which alerts were dropped. Each bit represents the │ │ │ │ │ @@ -8559,16 +8559,16 @@ │ │ │ │ │ metadata │ │ │ │ │ the metadata that was received by one of the torrents in conflict. One │ │ │ │ │ way to resolve the conflict is to remove both failing torrents and re-add │ │ │ │ │ it using this metadata │ │ │ │ │ [report_issue] │ │ │ │ │ ****** alert_cast() ****** │ │ │ │ │ Declared in "libtorrent/alert.hpp" │ │ │ │ │ -template T const* alert_cast (alert const* a); │ │ │ │ │ template T* alert_cast (alert* a); │ │ │ │ │ +template T const* alert_cast (alert const* a); │ │ │ │ │ When you get an alert, you can use alert_cast<> to attempt to cast the pointer │ │ │ │ │ to a specific alert type, in order to query it for more information. │ │ │ │ │ Note │ │ │ │ │ alert_cast<> can only cast to an exact alert type, not a base class │ │ │ │ │ [report_issue] │ │ │ │ │ ****** operation_name() ****** │ │ │ │ │ Declared in "libtorrent/operations.hpp" │ │ │ │ │ @@ -8788,20 +8788,20 @@ │ │ │ │ │ The ip_filter class is a set of rules that uniquely categorizes all ip │ │ │ │ │ addresses as allowed or disallowed. The default constructor creates a single │ │ │ │ │ rule that allows all addresses (0.0.0.0 - 255.255.255.255 for the IPv4 range, │ │ │ │ │ and the equivalent range covering all addresses for the IPv6 range). │ │ │ │ │ A default constructed ip_filter does not filter any address. │ │ │ │ │ struct ip_filter │ │ │ │ │ { │ │ │ │ │ - ~ip_filter (); │ │ │ │ │ - ip_filter& operator= (ip_filter const&); │ │ │ │ │ ip_filter (); │ │ │ │ │ - ip_filter (ip_filter&&); │ │ │ │ │ - ip_filter& operator= (ip_filter&&); │ │ │ │ │ + ip_filter& operator= (ip_filter const&); │ │ │ │ │ ip_filter (ip_filter const&); │ │ │ │ │ + ip_filter& operator= (ip_filter&&); │ │ │ │ │ + ip_filter (ip_filter&&); │ │ │ │ │ + ~ip_filter (); │ │ │ │ │ bool empty () const; │ │ │ │ │ void add_rule (address const& first, address const& last, std::uint32_t │ │ │ │ │ flags); │ │ │ │ │ std::uint32_t access (address const& addr) const; │ │ │ │ │ filter_tuple_t export_filter () const; │ │ │ │ │ │ │ │ │ │ enum access_flags │ │ │ │ │ @@ -8850,20 +8850,20 @@ │ │ │ │ │ ****** port_filter ****** │ │ │ │ │ Declared in "libtorrent/ip_filter.hpp" │ │ │ │ │ the port filter maps non-overlapping port ranges to flags. This is primarily │ │ │ │ │ used to indicate whether a range of ports should be connected to or not. The │ │ │ │ │ default is to have the full port range (0-65535) set to flag 0. │ │ │ │ │ class port_filter │ │ │ │ │ { │ │ │ │ │ + port_filter& operator= (port_filter const&); │ │ │ │ │ + port_filter (port_filter&&); │ │ │ │ │ + port_filter (port_filter const&); │ │ │ │ │ ~port_filter (); │ │ │ │ │ - port_filter (); │ │ │ │ │ port_filter& operator= (port_filter&&); │ │ │ │ │ - port_filter (port_filter const&); │ │ │ │ │ - port_filter (port_filter&&); │ │ │ │ │ - port_filter& operator= (port_filter const&); │ │ │ │ │ + port_filter (); │ │ │ │ │ void add_rule (std::uint16_t first, std::uint16_t last, std::uint32_t │ │ │ │ │ flags); │ │ │ │ │ std::uint32_t access (std::uint16_t port) const; │ │ │ │ │ │ │ │ │ │ enum access_flags │ │ │ │ │ { │ │ │ │ │ blocked, │ │ │ │ │ @@ -8913,38 +8913,38 @@ │ │ │ │ │ entry (preformatted_type); │ │ │ │ │ entry (dictionary_type); │ │ │ │ │ entry (list_type); │ │ │ │ │ entry (integer_type); │ │ │ │ │ entry (U v); │ │ │ │ │ entry (data_type t); │ │ │ │ │ entry (bdecode_node const& n); │ │ │ │ │ - entry& operator= (entry const&) &; │ │ │ │ │ - entry& operator= (dictionary_type) &; │ │ │ │ │ - entry& operator= (bdecode_node const&) &; │ │ │ │ │ - entry& operator= (list_type) &; │ │ │ │ │ - entry& operator= (preformatted_type) &; │ │ │ │ │ entry& operator= (entry&&) & noexcept; │ │ │ │ │ + entry& operator= (bdecode_node const&) &; │ │ │ │ │ entry& operator= (integer_type) &; │ │ │ │ │ + entry& operator= (preformatted_type) &; │ │ │ │ │ entry& operator= (span) &; │ │ │ │ │ + entry& operator= (dictionary_type) &; │ │ │ │ │ + entry& operator= (list_type) &; │ │ │ │ │ + entry& operator= (entry const&) &; │ │ │ │ │ entry& operator= (U v) &; │ │ │ │ │ - dictionary_type const& dict () const; │ │ │ │ │ + preformatted_type const& preformatted () const; │ │ │ │ │ + list_type const& list () const; │ │ │ │ │ integer_type const& integer () const; │ │ │ │ │ - string_type& string (); │ │ │ │ │ - list_type& list (); │ │ │ │ │ preformatted_type& preformatted (); │ │ │ │ │ - string_type const& string () const; │ │ │ │ │ dictionary_type& dict (); │ │ │ │ │ + dictionary_type const& dict () const; │ │ │ │ │ + string_type const& string () const; │ │ │ │ │ integer_type& integer (); │ │ │ │ │ - preformatted_type const& preformatted () const; │ │ │ │ │ - list_type const& list () const; │ │ │ │ │ + string_type& string (); │ │ │ │ │ + list_type& list (); │ │ │ │ │ void swap (entry& e); │ │ │ │ │ entry const& operator[] (string_view key) const; │ │ │ │ │ entry& operator[] (string_view key); │ │ │ │ │ - entry* find_key (string_view key); │ │ │ │ │ entry const* find_key (string_view key) const; │ │ │ │ │ + entry* find_key (string_view key); │ │ │ │ │ std::string to_string (bool single_line = false) const; │ │ │ │ │ │ │ │ │ │ enum data_type │ │ │ │ │ { │ │ │ │ │ int_t, │ │ │ │ │ string_t, │ │ │ │ │ list_t, │ │ │ │ │ @@ -8972,35 +8972,35 @@ │ │ │ │ │ construct an empty entry of the specified type. see data_type enum. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** entry() ***** │ │ │ │ │ entry (bdecode_node const& n); │ │ │ │ │ construct from bdecode_node parsed form (see bdecode()) │ │ │ │ │ [report_issue] │ │ │ │ │ ***** operator=() ***** │ │ │ │ │ -entry& operator= (entry const&) &; │ │ │ │ │ -entry& operator= (dictionary_type) &; │ │ │ │ │ -entry& operator= (bdecode_node const&) &; │ │ │ │ │ -entry& operator= (list_type) &; │ │ │ │ │ -entry& operator= (preformatted_type) &; │ │ │ │ │ entry& operator= (entry&&) & noexcept; │ │ │ │ │ +entry& operator= (bdecode_node const&) &; │ │ │ │ │ entry& operator= (integer_type) &; │ │ │ │ │ +entry& operator= (preformatted_type) &; │ │ │ │ │ entry& operator= (span) &; │ │ │ │ │ +entry& operator= (dictionary_type) &; │ │ │ │ │ +entry& operator= (list_type) &; │ │ │ │ │ +entry& operator= (entry const&) &; │ │ │ │ │ copies the structure of the right hand side into this entry. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** list() string() integer() dict() preformatted() ***** │ │ │ │ │ -dictionary_type const& dict () const; │ │ │ │ │ +***** integer() preformatted() dict() list() string() ***** │ │ │ │ │ +preformatted_type const& preformatted () const; │ │ │ │ │ +list_type const& list () const; │ │ │ │ │ integer_type const& integer () const; │ │ │ │ │ -string_type& string (); │ │ │ │ │ -list_type& list (); │ │ │ │ │ preformatted_type& preformatted (); │ │ │ │ │ -string_type const& string () const; │ │ │ │ │ dictionary_type& dict (); │ │ │ │ │ +dictionary_type const& dict () const; │ │ │ │ │ +string_type const& string () const; │ │ │ │ │ integer_type& integer (); │ │ │ │ │ -preformatted_type const& preformatted () const; │ │ │ │ │ -list_type const& list () const; │ │ │ │ │ +string_type& string (); │ │ │ │ │ +list_type& list (); │ │ │ │ │ The integer(), string(), list() and dict() functions are accessors that return │ │ │ │ │ the respective type. If the entry object isn't of the type you request, the │ │ │ │ │ accessor will throw system_error. You can ask an entry for its type through the │ │ │ │ │ type() function. │ │ │ │ │ If you want to create an entry you give it the type you want it to have in its │ │ │ │ │ constructor, and then use one of the non-const accessors to get a reference │ │ │ │ │ which you then can assign the value you want it to have. │ │ │ │ │ @@ -9042,16 +9042,16 @@ │ │ │ │ │ The non-const versions of the operator[] will return a reference to either the │ │ │ │ │ existing element at the given key or, if there is no element with the given │ │ │ │ │ key, a reference to a newly inserted element at that key. │ │ │ │ │ The const version of operator[] will only return a reference to an existing │ │ │ │ │ element at the given key. If the key is not found, it will throw system_error. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** find_key() ***** │ │ │ │ │ -entry* find_key (string_view key); │ │ │ │ │ entry const* find_key (string_view key) const; │ │ │ │ │ +entry* find_key (string_view key); │ │ │ │ │ These functions requires the entry to be a dictionary, if it isn't they will │ │ │ │ │ throw system_error. │ │ │ │ │ They will look for an element at the given key in the dictionary, if the │ │ │ │ │ element cannot be found, they will return nullptr. If an element with the given │ │ │ │ │ key is found, the return a pointer to it. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** to_string() ***** │ │ │ │ │ @@ -9130,43 +9130,43 @@ │ │ │ │ │ entry that's returned can then be bencoded into a .torrent file using bencode │ │ │ │ │ (). │ │ │ │ │ struct create_torrent │ │ │ │ │ { │ │ │ │ │ explicit create_torrent (torrent_info const& ti); │ │ │ │ │ explicit create_torrent (file_storage& fs, int piece_size = 0 │ │ │ │ │ , create_flags_t flags = {}); │ │ │ │ │ - std::vector generate_buf () const; │ │ │ │ │ entry generate () const; │ │ │ │ │ + std::vector generate_buf () const; │ │ │ │ │ file_storage const& files () const; │ │ │ │ │ void set_comment (char const* str); │ │ │ │ │ void set_creator (char const* str); │ │ │ │ │ void set_creation_date (std::time_t timestamp); │ │ │ │ │ void set_hash (piece_index_t index, sha1_hash const& h); │ │ │ │ │ void set_hash2 (file_index_t file, piece_index_t::diff_type piece, │ │ │ │ │ sha256_hash const& h); │ │ │ │ │ void add_http_seed (string_view url); │ │ │ │ │ void add_url_seed (string_view url); │ │ │ │ │ void add_node (std::pair node); │ │ │ │ │ void add_tracker (string_view url, int tier = 0); │ │ │ │ │ void set_root_cert (string_view cert); │ │ │ │ │ - void set_priv (bool p); │ │ │ │ │ bool priv () const; │ │ │ │ │ - bool is_v2_only () const; │ │ │ │ │ + void set_priv (bool p); │ │ │ │ │ bool is_v1_only () const; │ │ │ │ │ + bool is_v2_only () const; │ │ │ │ │ int num_pieces () const; │ │ │ │ │ piece_index_t end_piece () const; │ │ │ │ │ index_range piece_range () const noexcept; │ │ │ │ │ file_index_t end_file () const; │ │ │ │ │ index_range file_range () const noexcept; │ │ │ │ │ index_range file_piece_range (file_index_t f); │ │ │ │ │ std::int64_t total_size () const; │ │ │ │ │ int piece_length () const; │ │ │ │ │ int piece_size (piece_index_t i) const; │ │ │ │ │ - void add_similar_torrent (sha1_hash ih); │ │ │ │ │ void add_collection (string_view c); │ │ │ │ │ + void add_similar_torrent (sha1_hash ih); │ │ │ │ │ │ │ │ │ │ static constexpr create_flags_t modification_time = 2_bit; │ │ │ │ │ static constexpr create_flags_t symlinks = 3_bit; │ │ │ │ │ static constexpr create_flags_t v2_only = 5_bit; │ │ │ │ │ static constexpr create_flags_t v1_only = 6_bit; │ │ │ │ │ static constexpr create_flags_t canonical_files = 7_bit; │ │ │ │ │ static constexpr create_flags_t no_attributes = 8_bit; │ │ │ │ │ @@ -9192,16 +9192,16 @@ │ │ │ │ │ (such as set_hash()), will have any affect. Instead of using this overload, │ │ │ │ │ consider using write_torrent_file() instead. │ │ │ │ │ Warning │ │ │ │ │ The file_storage and torrent_info objects must stay alive for the entire │ │ │ │ │ duration of the create_torrent object. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** generate_buf() generate() ***** │ │ │ │ │ -std::vector generate_buf () const; │ │ │ │ │ entry generate () const; │ │ │ │ │ +std::vector generate_buf () const; │ │ │ │ │ This function will generate the .torrent file as a bencode tree, or a bencoded │ │ │ │ │ into a buffer. In order to encode the entry into a flat file, use the bencode() │ │ │ │ │ function. │ │ │ │ │ The function returning an entry may be useful to add custom entries to the │ │ │ │ │ torrent file before bencoding it and saving it to disk. │ │ │ │ │ Whether the resulting torrent object is v1, v2 or hybrid depends on whether any │ │ │ │ │ of the v1_only or v2_only flags were set on the constructor. If neither were │ │ │ │ │ @@ -9258,15 +9258,15 @@ │ │ │ │ │ the merkle tree formed by the piece's 16 kiB blocks. Note that piece sizes must │ │ │ │ │ be powers-of-2, so all per-piece merkle trees are complete. A SHA-256 hash of │ │ │ │ │ all zeros is internally used to indicate a hash that has not been set. Setting │ │ │ │ │ such hash will not be considered set when calling generate(). This function │ │ │ │ │ will throw std::system_error if it is called on an object constructed with the │ │ │ │ │ v1_only flag. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** add_http_seed() add_url_seed() ***** │ │ │ │ │ +***** add_url_seed() add_http_seed() ***** │ │ │ │ │ void add_http_seed (string_view url); │ │ │ │ │ void add_url_seed (string_view url); │ │ │ │ │ This adds a url seed to the torrent. You can have any number of url seeds. For │ │ │ │ │ a single file torrent, this should be an HTTP url, pointing to a file with │ │ │ │ │ identical content as the file of the torrent. For a multi-file torrent, it │ │ │ │ │ should point to a directory containing a directory with the same name as this │ │ │ │ │ torrent, and all the files of the torrent in it. │ │ │ │ │ @@ -9295,17 +9295,17 @@ │ │ │ │ │ makes the torrent an SSL torrent. An SSL torrent requires that each peer has a │ │ │ │ │ valid certificate signed by this root certificate. For SSL torrents, all peers │ │ │ │ │ are connecting over SSL connections. For more information, see the section on │ │ │ │ │ ssl_torrents. │ │ │ │ │ The string is not the path to the cert, it's the actual content of the │ │ │ │ │ certificate. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** priv() set_priv() ***** │ │ │ │ │ -void set_priv (bool p); │ │ │ │ │ +***** set_priv() priv() ***** │ │ │ │ │ bool priv () const; │ │ │ │ │ +void set_priv (bool p); │ │ │ │ │ Sets and queries the private flag of the torrent. Torrents with the private │ │ │ │ │ flag set ask the client to not use any other sources than the tracker for │ │ │ │ │ peers, and to not use DHT to advertise itself publicly, only the tracker. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** num_pieces() ***** │ │ │ │ │ int num_pieces () const; │ │ │ │ │ returns the number of pieces in the associated file_storage object. │ │ │ │ │ @@ -9323,24 +9323,24 @@ │ │ │ │ │ for v2 and hybrid torrents only, the pieces in the specified file, specified as │ │ │ │ │ delta from the first piece in the file. i.e. the first index is 0. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** total_size() ***** │ │ │ │ │ std::int64_t total_size () const; │ │ │ │ │ the total number of bytes of all files and pad files │ │ │ │ │ [report_issue] │ │ │ │ │ -***** piece_size() piece_length() ***** │ │ │ │ │ +***** piece_length() piece_size() ***** │ │ │ │ │ int piece_length () const; │ │ │ │ │ int piece_size (piece_index_t i) const; │ │ │ │ │ piece_length() returns the piece size of all pieces but the last one. │ │ │ │ │ piece_size() returns the size of the specified piece. these functions are just │ │ │ │ │ forwarding to the associated file_storage. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** add_similar_torrent() add_collection() ***** │ │ │ │ │ -void add_similar_torrent (sha1_hash ih); │ │ │ │ │ void add_collection (string_view c); │ │ │ │ │ +void add_similar_torrent (sha1_hash ih); │ │ │ │ │ Add similar torrents (by info-hash) or collections of similar torrents. Similar │ │ │ │ │ torrents are expected to share some files with this torrent. Torrents sharing a │ │ │ │ │ collection name with this torrent are also expected to share files with this │ │ │ │ │ torrent. A torrent may have more than one collection and more than one similar │ │ │ │ │ torrents. For more information, see BEP_38. │ │ │ │ │ [report_issue] │ │ │ │ │ modification_time │ │ │ │ │ @@ -9390,17 +9390,17 @@ │ │ │ │ │ behavior deviates from the specification but was the way libtorrent │ │ │ │ │ created torrents in version up to and including 2.0.7. This flag is here │ │ │ │ │ for backwards compatibility. │ │ │ │ │ [report_issue] │ │ │ │ │ ****** add_files() ****** │ │ │ │ │ Declared in "libtorrent/create_torrent.hpp" │ │ │ │ │ void add_files (file_storage& fs, std::string const& file │ │ │ │ │ - , create_flags_t flags = {}); │ │ │ │ │ -void add_files (file_storage& fs, std::string const& file │ │ │ │ │ , std::function p, create_flags_t flags = {}); │ │ │ │ │ +void add_files (file_storage& fs, std::string const& file │ │ │ │ │ + , create_flags_t flags = {}); │ │ │ │ │ Adds the file specified by path to the file_storage object. In case path refers │ │ │ │ │ to a directory, files will be added recursively from the directory. │ │ │ │ │ If specified, the predicate p is called once for every file and directory that │ │ │ │ │ is encountered. Files for which p returns true are added, and directories for │ │ │ │ │ which p returns true are traversed. p must have the following signature: │ │ │ │ │ bool Pred(std::string const& p); │ │ │ │ │ The path that is passed in to the predicate is the full path of the file or │ │ │ │ │ @@ -9408,30 +9408,30 @@ │ │ │ │ │ directories are traversed. │ │ │ │ │ The ".." directory is never traversed. │ │ │ │ │ The flags argument should be the same as the flags passed to the create_torrent │ │ │ │ │ constructor. │ │ │ │ │ [report_issue] │ │ │ │ │ ****** set_piece_hashes() ****** │ │ │ │ │ Declared in "libtorrent/create_torrent.hpp" │ │ │ │ │ -inline void set_piece_hashes (create_torrent& t, std::string const& p │ │ │ │ │ - , std::function const& f); │ │ │ │ │ void set_piece_hashes (create_torrent& t, std::string const& p │ │ │ │ │ , settings_interface const& settings │ │ │ │ │ , std::function const& f, error_code& ec); │ │ │ │ │ +inline void set_piece_hashes (create_torrent& t, std::string const& p); │ │ │ │ │ void set_piece_hashes (create_torrent& t, std::string const& p │ │ │ │ │ , std::function const& f, error_code& ec); │ │ │ │ │ -void set_piece_hashes (create_torrent& t, std::string const& p │ │ │ │ │ - , settings_interface const& settings, disk_io_constructor_type disk_io │ │ │ │ │ - , std::function const& f, error_code& ec); │ │ │ │ │ inline void set_piece_hashes (create_torrent& t, std::string const& p │ │ │ │ │ - , settings_interface const& settings │ │ │ │ │ , std::function const& f); │ │ │ │ │ -inline void set_piece_hashes (create_torrent& t, std::string const& p); │ │ │ │ │ inline void set_piece_hashes (create_torrent& t, std::string const& p, │ │ │ │ │ error_code& ec); │ │ │ │ │ +inline void set_piece_hashes (create_torrent& t, std::string const& p │ │ │ │ │ + , settings_interface const& settings │ │ │ │ │ + , std::function const& f); │ │ │ │ │ +void set_piece_hashes (create_torrent& t, std::string const& p │ │ │ │ │ + , settings_interface const& settings, disk_io_constructor_type disk_io │ │ │ │ │ + , std::function const& f, error_code& ec); │ │ │ │ │ This function will assume that the files added to the torrent file exists at │ │ │ │ │ path p, read those files and hash the content and set the hashes in the │ │ │ │ │ create_torrent object. The optional function f is called in between every hash │ │ │ │ │ that is set. f must have the following signature: │ │ │ │ │ void Fun(piece_index_t); │ │ │ │ │ The overloads taking a settings_pack may be used to configure the underlying │ │ │ │ │ disk access. Such as settings_pack::aio_threads. │ │ │ │ │ @@ -9441,63 +9441,63 @@ │ │ │ │ │ [report_issue] │ │ │ │ │ ****** bitfield ****** │ │ │ │ │ Declared in "libtorrent/bitfield.hpp" │ │ │ │ │ The bitfield type stores any number of bits as a bitfield in a heap allocated │ │ │ │ │ array. │ │ │ │ │ struct bitfield │ │ │ │ │ { │ │ │ │ │ - bitfield () noexcept = default; │ │ │ │ │ bitfield (int bits, bool val); │ │ │ │ │ - bitfield (bitfield&& rhs) noexcept = default; │ │ │ │ │ - explicit bitfield (int bits); │ │ │ │ │ bitfield (char const* b, int bits); │ │ │ │ │ + explicit bitfield (int bits); │ │ │ │ │ + bitfield (bitfield&& rhs) noexcept = default; │ │ │ │ │ + bitfield () noexcept = default; │ │ │ │ │ bitfield (bitfield const& rhs); │ │ │ │ │ void assign (char const* b, int const bits); │ │ │ │ │ bool operator[] (int index) const noexcept; │ │ │ │ │ bool get_bit (int index) const noexcept; │ │ │ │ │ void clear_bit (int index) noexcept; │ │ │ │ │ void set_bit (int index) noexcept; │ │ │ │ │ bool all_set () const noexcept; │ │ │ │ │ bool none_set () const noexcept; │ │ │ │ │ int size () const noexcept; │ │ │ │ │ int num_words () const noexcept; │ │ │ │ │ bool empty () const noexcept; │ │ │ │ │ - char* data () noexcept; │ │ │ │ │ char const* data () const noexcept; │ │ │ │ │ + char* data () noexcept; │ │ │ │ │ void swap (bitfield& rhs) noexcept; │ │ │ │ │ int count () const noexcept; │ │ │ │ │ int find_first_set () const noexcept; │ │ │ │ │ int find_last_clear () const noexcept; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ***** bitfield() ***** │ │ │ │ │ -bitfield () noexcept = default; │ │ │ │ │ bitfield (int bits, bool val); │ │ │ │ │ -bitfield (bitfield&& rhs) noexcept = default; │ │ │ │ │ -explicit bitfield (int bits); │ │ │ │ │ bitfield (char const* b, int bits); │ │ │ │ │ +explicit bitfield (int bits); │ │ │ │ │ +bitfield (bitfield&& rhs) noexcept = default; │ │ │ │ │ +bitfield () noexcept = default; │ │ │ │ │ bitfield (bitfield const& rhs); │ │ │ │ │ constructs a new bitfield. The default constructor creates an empty bitfield. │ │ │ │ │ bits is the size of the bitfield (specified in bits). val is the value to │ │ │ │ │ initialize the bits to. If not specified all bits are initialized to 0. │ │ │ │ │ The constructor taking a pointer b and bits copies a bitfield from the │ │ │ │ │ specified buffer, and bits number of bits (rounded up to the nearest byte │ │ │ │ │ boundary). │ │ │ │ │ [report_issue] │ │ │ │ │ ***** assign() ***** │ │ │ │ │ void assign (char const* b, int const bits); │ │ │ │ │ copy bitfield from buffer b of bits number of bits, rounded up to the nearest │ │ │ │ │ byte boundary. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** get_bit() operator[]() ***** │ │ │ │ │ +***** operator[]() get_bit() ***** │ │ │ │ │ bool operator[] (int index) const noexcept; │ │ │ │ │ bool get_bit (int index) const noexcept; │ │ │ │ │ query bit at index. Returns true if bit is 1, otherwise false. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** clear_bit() set_bit() ***** │ │ │ │ │ +***** set_bit() clear_bit() ***** │ │ │ │ │ void clear_bit (int index) noexcept; │ │ │ │ │ void set_bit (int index) noexcept; │ │ │ │ │ set bit at index to 0 (clear_bit) or 1 (set_bit). │ │ │ │ │ [report_issue] │ │ │ │ │ ***** all_set() ***** │ │ │ │ │ bool all_set () const noexcept; │ │ │ │ │ returns true if all bits in the bitfield are set │ │ │ │ │ @@ -9516,16 +9516,16 @@ │ │ │ │ │ bitfield. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** empty() ***** │ │ │ │ │ bool empty () const noexcept; │ │ │ │ │ returns true if the bitfield has zero size. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** data() ***** │ │ │ │ │ -char* data () noexcept; │ │ │ │ │ char const* data () const noexcept; │ │ │ │ │ +char* data () noexcept; │ │ │ │ │ returns a pointer to the internal buffer of the bitfield, or nullptr if it's │ │ │ │ │ empty. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** swap() ***** │ │ │ │ │ void swap (bitfield& rhs) noexcept; │ │ │ │ │ swaps the bit-fields two variables refer to │ │ │ │ │ [report_issue] │ │ │ │ │ @@ -9554,35 +9554,35 @@ │ │ │ │ │ If you want to reuse the hasher object once you have created a hash, you have │ │ │ │ │ to call reset() to reinitialize it. │ │ │ │ │ The built-in software version of sha1-algorithm was implemented by Steve Reid │ │ │ │ │ and released as public domain. For more info, see src/sha1.cpp. │ │ │ │ │ class hasher │ │ │ │ │ { │ │ │ │ │ hasher (); │ │ │ │ │ - explicit hasher (span data); │ │ │ │ │ hasher (char const* data, int len); │ │ │ │ │ - hasher& operator= (hasher const&) &; │ │ │ │ │ hasher (hasher const&); │ │ │ │ │ - hasher& update (span data); │ │ │ │ │ + explicit hasher (span data); │ │ │ │ │ + hasher& operator= (hasher const&) &; │ │ │ │ │ hasher& update (char const* data, int len); │ │ │ │ │ + hasher& update (span data); │ │ │ │ │ sha1_hash final (); │ │ │ │ │ void reset (); │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ -***** hasher() operator=() ***** │ │ │ │ │ -explicit hasher (span data); │ │ │ │ │ +***** operator=() hasher() ***** │ │ │ │ │ hasher (char const* data, int len); │ │ │ │ │ -hasher& operator= (hasher const&) &; │ │ │ │ │ hasher (hasher const&); │ │ │ │ │ +explicit hasher (span data); │ │ │ │ │ +hasher& operator= (hasher const&) &; │ │ │ │ │ this is the same as default constructing followed by a call to update(data, │ │ │ │ │ len). │ │ │ │ │ [report_issue] │ │ │ │ │ ***** update() ***** │ │ │ │ │ -hasher& update (span data); │ │ │ │ │ hasher& update (char const* data, int len); │ │ │ │ │ +hasher& update (span data); │ │ │ │ │ append the following bytes to what is being hashed │ │ │ │ │ [report_issue] │ │ │ │ │ ***** final() ***** │ │ │ │ │ sha1_hash final (); │ │ │ │ │ returns the SHA-1 digest of the buffers previously passed to update() and the │ │ │ │ │ hasher constructor. │ │ │ │ │ [report_issue] │ │ │ │ │ @@ -9592,36 +9592,36 @@ │ │ │ │ │ constructed. │ │ │ │ │ [report_issue] │ │ │ │ │ ****** hasher256 ****** │ │ │ │ │ Declared in "libtorrent/hasher.hpp" │ │ │ │ │ class hasher256 │ │ │ │ │ { │ │ │ │ │ hasher256 (); │ │ │ │ │ + hasher256 (char const* data, int len); │ │ │ │ │ explicit hasher256 (span data); │ │ │ │ │ hasher256& operator= (hasher256 const&) &; │ │ │ │ │ hasher256 (hasher256 const&); │ │ │ │ │ - hasher256 (char const* data, int len); │ │ │ │ │ - hasher256& update (char const* data, int len); │ │ │ │ │ hasher256& update (span data); │ │ │ │ │ + hasher256& update (char const* data, int len); │ │ │ │ │ sha256_hash final (); │ │ │ │ │ void reset (); │ │ │ │ │ ~hasher256 (); │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ ***** hasher256() operator=() ***** │ │ │ │ │ +hasher256 (char const* data, int len); │ │ │ │ │ explicit hasher256 (span data); │ │ │ │ │ hasher256& operator= (hasher256 const&) &; │ │ │ │ │ hasher256 (hasher256 const&); │ │ │ │ │ -hasher256 (char const* data, int len); │ │ │ │ │ this is the same as default constructing followed by a call to update(data, │ │ │ │ │ len). │ │ │ │ │ [report_issue] │ │ │ │ │ ***** update() ***** │ │ │ │ │ -hasher256& update (char const* data, int len); │ │ │ │ │ hasher256& update (span data); │ │ │ │ │ +hasher256& update (char const* data, int len); │ │ │ │ │ append the following bytes to what is being hashed │ │ │ │ │ [report_issue] │ │ │ │ │ ***** final() ***** │ │ │ │ │ sha256_hash final (); │ │ │ │ │ returns the SHA-1 digest of the buffers previously passed to update() and the │ │ │ │ │ hasher constructor. │ │ │ │ │ [report_issue] │ │ │ │ │ @@ -10176,18 +10176,18 @@ │ │ │ │ │ [report_issue] │ │ │ │ │ ****** announce_entry ****** │ │ │ │ │ Declared in "libtorrent/announce_entry.hpp" │ │ │ │ │ this class holds information about one bittorrent tracker, as it relates to a │ │ │ │ │ specific torrent. │ │ │ │ │ struct announce_entry │ │ │ │ │ { │ │ │ │ │ - explicit announce_entry (string_view u); │ │ │ │ │ announce_entry (announce_entry const&); │ │ │ │ │ ~announce_entry (); │ │ │ │ │ announce_entry (); │ │ │ │ │ + explicit announce_entry (string_view u); │ │ │ │ │ announce_entry& operator= (announce_entry const&) &; │ │ │ │ │ │ │ │ │ │ enum tracker_source │ │ │ │ │ { │ │ │ │ │ source_torrent, │ │ │ │ │ source_client, │ │ │ │ │ source_magnet_link, │ │ │ │ │ @@ -10199,19 +10199,19 @@ │ │ │ │ │ std::vector endpoints; │ │ │ │ │ std::uint8_t tier = 0; │ │ │ │ │ std::uint8_t fail_limit = 0; │ │ │ │ │ std::uint8_t source:4; │ │ │ │ │ bool verified:1; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ -***** operator=() ~announce_entry() announce_entry() ***** │ │ │ │ │ -explicit announce_entry (string_view u); │ │ │ │ │ +***** ~announce_entry() operator=() announce_entry() ***** │ │ │ │ │ announce_entry (announce_entry const&); │ │ │ │ │ ~announce_entry (); │ │ │ │ │ announce_entry (); │ │ │ │ │ +explicit announce_entry (string_view u); │ │ │ │ │ announce_entry& operator= (announce_entry const&) &; │ │ │ │ │ constructs a tracker announce entry with u as the URL. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** enum tracker_source ***** │ │ │ │ │ Declared in "libtorrent/announce_entry.hpp" │ │ │ │ │ ____________________________________________________________________________ │ │ │ │ │ |name______________|value|description________________________________________| │ │ │ │ │ @@ -11641,18 +11641,18 @@ │ │ │ │ │ memory mapped, but will use normal pread/pwrite operations. This file size │ │ │ │ │ limit is specified in 16 kiB blocks. │ │ │ │ │ struct settings_pack final : settings_interface │ │ │ │ │ { │ │ │ │ │ friend void apply_pack_impl (settings_pack const* │ │ │ │ │ , aux::session_settings_single_thread& │ │ │ │ │ , std::vector*); │ │ │ │ │ + void set_str (int name, std::string val) override; │ │ │ │ │ void set_int (int name, int val) override; │ │ │ │ │ - void set_int (int name, flags::bitfield_flag const val); │ │ │ │ │ void set_bool (int name, bool val) override; │ │ │ │ │ - void set_str (int name, std::string val) override; │ │ │ │ │ + void set_int (int name, flags::bitfield_flag const val); │ │ │ │ │ bool has_val (int name) const override; │ │ │ │ │ void clear (); │ │ │ │ │ void clear (int name); │ │ │ │ │ std::string const& get_str (int name) const override; │ │ │ │ │ bool get_bool (int name) const override; │ │ │ │ │ int get_int (int name) const override; │ │ │ │ │ void for_each (Fun&& f) const; │ │ │ │ │ @@ -11729,19 +11729,19 @@ │ │ │ │ │ socks5_pw, │ │ │ │ │ http, │ │ │ │ │ http_pw, │ │ │ │ │ i2p_proxy, │ │ │ │ │ }; │ │ │ │ │ }; │ │ │ │ │ [report_issue] │ │ │ │ │ -***** set_bool() set_str() set_int() ***** │ │ │ │ │ +***** set_str() set_bool() set_int() ***** │ │ │ │ │ +void set_str (int name, std::string val) override; │ │ │ │ │ void set_int (int name, int val) override; │ │ │ │ │ -void set_int (int name, flags::bitfield_flag const val); │ │ │ │ │ void set_bool (int name, bool val) override; │ │ │ │ │ -void set_str (int name, std::string val) override; │ │ │ │ │ +void set_int (int name, flags::bitfield_flag const val); │ │ │ │ │ set a configuration option in the settings_pack. name is one of the enum values │ │ │ │ │ from string_types, int_types or bool_types. They must match the respective type │ │ │ │ │ of the set_* function. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** has_val() ***** │ │ │ │ │ bool has_val (int name) const override; │ │ │ │ │ queries whether the specified configuration option has a value set in this │ │ │ │ │ @@ -11752,15 +11752,15 @@ │ │ │ │ │ void clear (); │ │ │ │ │ clear the settings pack from all settings │ │ │ │ │ [report_issue] │ │ │ │ │ ***** clear() ***** │ │ │ │ │ void clear (int name); │ │ │ │ │ clear a specific setting from the pack │ │ │ │ │ [report_issue] │ │ │ │ │ -***** get_str() get_bool() get_int() ***** │ │ │ │ │ +***** get_str() get_int() get_bool() ***** │ │ │ │ │ std::string const& get_str (int name) const override; │ │ │ │ │ bool get_bool (int name) const override; │ │ │ │ │ int get_int (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. │ │ │ │ │ @@ -11918,16 +11918,16 @@ │ │ │ │ │ |TL______|Tribler_____________| │ │ │ │ │ There's an informal directory of client id's here. │ │ │ │ │ The major, minor, revision and tag parameters are used to identify the version │ │ │ │ │ of your client. │ │ │ │ │ [report_issue] │ │ │ │ │ ****** min_memory_usage() high_performance_seed() ****** │ │ │ │ │ Declared in "libtorrent/session.hpp" │ │ │ │ │ -settings_pack high_performance_seed (); │ │ │ │ │ settings_pack min_memory_usage (); │ │ │ │ │ +settings_pack high_performance_seed (); │ │ │ │ │ The default values of the session settings are set for a regular bittorrent │ │ │ │ │ client running on a desktop system. There are functions that can set the │ │ │ │ │ session settings to pre set settings for other environments. These can be used │ │ │ │ │ for the basis, and should be tweaked to fit your needs better. │ │ │ │ │ min_memory_usage returns settings that will use the minimal amount of RAM, at │ │ │ │ │ the potential expense of upload and download performance. It adjusts the socket │ │ │ │ │ buffer sizes, disables the disk cache, lowers the send buffer watermarks so │ │ │ │ │ @@ -11940,15 +11940,15 @@ │ │ │ │ │ This configuration is intended to be the starting point for embedded devices. │ │ │ │ │ It will significantly reduce memory usage. │ │ │ │ │ high_performance_seed returns settings optimized for a seed box, serving many │ │ │ │ │ peers and that doesn't do any downloading. It has a 128 MB disk cache and has a │ │ │ │ │ limit of 400 files in its file pool. It support fast upload rates by allowing │ │ │ │ │ large send buffers. │ │ │ │ │ [report_issue] │ │ │ │ │ -****** name_for_setting() setting_by_name() ****** │ │ │ │ │ +****** 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() ****** │ │ │ │ │ @@ -11976,31 +11976,31 @@ │ │ │ │ │ span data_section () const noexcept; │ │ │ │ │ std::int64_t list_int_value_at (int i │ │ │ │ │ , std::int64_t default_val = 0) const; │ │ │ │ │ bdecode_node list_at (int i) const; │ │ │ │ │ string_view list_string_value_at (int i │ │ │ │ │ , string_view default_val = string_view()) const; │ │ │ │ │ int list_size () const; │ │ │ │ │ + int dict_size () const; │ │ │ │ │ std::pair dict_at_node (int i) const; │ │ │ │ │ - bdecode_node dict_find_string (string_view key) const; │ │ │ │ │ - std::int64_t dict_find_int_value (string_view key │ │ │ │ │ - , std::int64_t default_val = 0) const; │ │ │ │ │ bdecode_node dict_find_int (string_view key) const; │ │ │ │ │ - bdecode_node dict_find (string_view key) const; │ │ │ │ │ - int dict_size () const; │ │ │ │ │ std::pair dict_at (int i) const; │ │ │ │ │ - bdecode_node dict_find_dict (string_view key) const; │ │ │ │ │ - bdecode_node dict_find_list (string_view key) const; │ │ │ │ │ string_view dict_find_string_value (string_view key │ │ │ │ │ , string_view default_value = string_view()) const; │ │ │ │ │ + bdecode_node dict_find (string_view key) const; │ │ │ │ │ + bdecode_node dict_find_list (string_view key) const; │ │ │ │ │ + std::int64_t dict_find_int_value (string_view key │ │ │ │ │ + , std::int64_t default_val = 0) const; │ │ │ │ │ + bdecode_node dict_find_string (string_view key) const; │ │ │ │ │ + bdecode_node dict_find_dict (string_view key) const; │ │ │ │ │ std::int64_t int_value () const; │ │ │ │ │ - char const* string_ptr () const; │ │ │ │ │ + std::ptrdiff_t string_offset () const; │ │ │ │ │ int string_length () const; │ │ │ │ │ string_view string_value () const; │ │ │ │ │ - std::ptrdiff_t string_offset () const; │ │ │ │ │ + char const* string_ptr () const; │ │ │ │ │ void clear (); │ │ │ │ │ void swap (bdecode_node& n); │ │ │ │ │ void reserve (int tokens); │ │ │ │ │ void switch_underlying_buffer (char const* buf) noexcept; │ │ │ │ │ bool has_soft_error (span error) const; │ │ │ │ │ │ │ │ │ │ enum type_t │ │ │ │ │ @@ -12034,50 +12034,50 @@ │ │ │ │ │ returns true if type() != none_t. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** non_owning() ***** │ │ │ │ │ bdecode_node non_owning () const; │ │ │ │ │ return a non-owning reference to this node. This is useful to refer to the root │ │ │ │ │ node without copying it in assignments. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** data_section() data_offset() ***** │ │ │ │ │ +***** data_offset() data_section() ***** │ │ │ │ │ std::ptrdiff_t data_offset () const noexcept; │ │ │ │ │ span data_section () const noexcept; │ │ │ │ │ returns the buffer and length of the section in the original bencoded buffer │ │ │ │ │ where this node is defined. For a dictionary for instance, this starts with d │ │ │ │ │ and ends with e, and has all the content of the dictionary in between. the │ │ │ │ │ data_offset() function returns the byte-offset to this node in, starting from │ │ │ │ │ the beginning of the buffer that was parsed. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** list_size() list_int_value_at() list_at() list_string_value_at() ***** │ │ │ │ │ +***** list_size() list_string_value_at() list_at() list_int_value_at() ***** │ │ │ │ │ std::int64_t list_int_value_at (int i │ │ │ │ │ , std::int64_t default_val = 0) const; │ │ │ │ │ bdecode_node list_at (int i) const; │ │ │ │ │ string_view list_string_value_at (int i │ │ │ │ │ , string_view default_val = string_view()) const; │ │ │ │ │ int list_size () const; │ │ │ │ │ functions with the list_ prefix operate on lists. These functions are only │ │ │ │ │ valid if type() == list_t. list_at() returns the item in the list at index i. i │ │ │ │ │ may not be greater than or equal to the size of the list. size() returns the │ │ │ │ │ size of the list. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** dict_find_string_value() dict_at_node() dict_size() dict_find_int_value() │ │ │ │ │ -dict_find_string() dict_find() dict_find_int() dict_find_list() dict_find_dict │ │ │ │ │ -() dict_at() ***** │ │ │ │ │ +***** dict_find_int() dict_find_string_value() dict_find_dict() │ │ │ │ │ +dict_find_int_value() dict_find_string() dict_at() dict_find_list() dict_size() │ │ │ │ │ +dict_at_node() dict_find() ***** │ │ │ │ │ +int dict_size () const; │ │ │ │ │ std::pair dict_at_node (int i) const; │ │ │ │ │ -bdecode_node dict_find_string (string_view key) const; │ │ │ │ │ -std::int64_t dict_find_int_value (string_view key │ │ │ │ │ - , std::int64_t default_val = 0) const; │ │ │ │ │ bdecode_node dict_find_int (string_view key) const; │ │ │ │ │ -bdecode_node dict_find (string_view key) const; │ │ │ │ │ -int dict_size () const; │ │ │ │ │ std::pair dict_at (int i) const; │ │ │ │ │ -bdecode_node dict_find_dict (string_view key) const; │ │ │ │ │ -bdecode_node dict_find_list (string_view key) const; │ │ │ │ │ string_view dict_find_string_value (string_view key │ │ │ │ │ , string_view default_value = string_view()) const; │ │ │ │ │ +bdecode_node dict_find (string_view key) const; │ │ │ │ │ +bdecode_node dict_find_list (string_view key) const; │ │ │ │ │ +std::int64_t dict_find_int_value (string_view key │ │ │ │ │ + , std::int64_t default_val = 0) const; │ │ │ │ │ +bdecode_node dict_find_string (string_view key) const; │ │ │ │ │ +bdecode_node dict_find_dict (string_view key) const; │ │ │ │ │ Functions with the dict_ prefix operates on dictionaries. They are only valid │ │ │ │ │ if type() == dict_t. In case a key you're looking up contains a 0 byte, you │ │ │ │ │ cannot use the 0-terminated string overloads, but have to use string_view │ │ │ │ │ instead. dict_find_list will return a valid bdecode_node if the key is found │ │ │ │ │ _and_ it is a list. Otherwise it will return a default-constructed │ │ │ │ │ bdecode_node. │ │ │ │ │ Functions with the _value suffix return the value of the node directly, rather │ │ │ │ │ @@ -12089,19 +12089,19 @@ │ │ │ │ │ string). │ │ │ │ │ [report_issue] │ │ │ │ │ ***** int_value() ***** │ │ │ │ │ std::int64_t int_value () const; │ │ │ │ │ this function is only valid if type() == int_t. It returns the value of the │ │ │ │ │ integer. │ │ │ │ │ [report_issue] │ │ │ │ │ -***** string_ptr() string_length() string_value() string_offset() ***** │ │ │ │ │ -char const* string_ptr () const; │ │ │ │ │ +***** string_length() string_ptr() string_offset() string_value() ***** │ │ │ │ │ +std::ptrdiff_t string_offset () const; │ │ │ │ │ int string_length () const; │ │ │ │ │ string_view string_value () const; │ │ │ │ │ -std::ptrdiff_t string_offset () const; │ │ │ │ │ +char const* string_ptr () const; │ │ │ │ │ these functions are only valid if type() == string_t. They return the string │ │ │ │ │ values. Note that string_ptr() is not 0-terminated. string_length() returns the │ │ │ │ │ number of bytes in the string. string_offset() returns the byte offset from the │ │ │ │ │ start of the parsed bencoded buffer this string can be found. │ │ │ │ │ [report_issue] │ │ │ │ │ ***** clear() ***** │ │ │ │ │ void clear (); │ │ │ │ │ @@ -12146,19 +12146,19 @@ │ │ │ │ │ , bool single_line = false, int indent = 0); │ │ │ │ │ print the bencoded structure in a human-readable format to a string that's │ │ │ │ │ returned. │ │ │ │ │ [report_issue] │ │ │ │ │ ****** bdecode() ****** │ │ │ │ │ Declared in "libtorrent/bdecode.hpp" │ │ │ │ │ bdecode_node bdecode (span buffer │ │ │ │ │ + , int depth_limit = 100, int token_limit = 2000000); │ │ │ │ │ +int bdecode (char const* start, char const* end, bdecode_node& ret │ │ │ │ │ , error_code& ec, int* error_pos = nullptr, int depth_limit = 100 │ │ │ │ │ , int token_limit = 2000000); │ │ │ │ │ bdecode_node bdecode (span buffer │ │ │ │ │ - , int depth_limit = 100, int token_limit = 2000000); │ │ │ │ │ -int bdecode (char const* start, char const* end, bdecode_node& ret │ │ │ │ │ , error_code& ec, int* error_pos = nullptr, int depth_limit = 100 │ │ │ │ │ , int token_limit = 2000000); │ │ │ │ │ This function decodes/parses bdecoded data (for example a .torrent file). The │ │ │ │ │ data structure is returned in the ret argument. the buffer to parse is │ │ │ │ │ specified by the start of the buffer as well as the end, i.e. one byte past the │ │ │ │ │ end. If the buffer fails to parse, the function returns a non-zero value and │ │ │ │ │ fills in ec with the error code. The optional argument error_pos, if set to │ │ │ │ │ @@ -12426,28 +12426,28 @@ │ │ │ │ │ the torrent that may be loaded as part of the resume data, if it contains an │ │ │ │ │ info field. The overloads that take a flat buffer are instead configured with │ │ │ │ │ limits on torrent sizes via load_torrent limits. │ │ │ │ │ In order to support large torrents, it may also be necessary to raise the │ │ │ │ │ settings_pack::max_piece_count setting and pass a higher limit to calls to │ │ │ │ │ torrent_info::parse_info_section(). │ │ │ │ │ [report_issue] │ │ │ │ │ -****** write_resume_data_buf() write_resume_data() ****** │ │ │ │ │ +****** write_resume_data() write_resume_data_buf() ****** │ │ │ │ │ Declared in "libtorrent/write_resume_data.hpp" │ │ │ │ │ std::vector 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() ****** │ │ │ │ │ +****** write_torrent_file_buf() write_torrent_file() ****** │ │ │ │ │ Declared in "libtorrent/write_resume_data.hpp" │ │ │ │ │ -std::vector write_torrent_file_buf (add_torrent_params const& atp │ │ │ │ │ - , write_torrent_flags_t flags); │ │ │ │ │ -entry write_torrent_file (add_torrent_params const& atp); │ │ │ │ │ entry write_torrent_file (add_torrent_params const& atp, write_torrent_flags_t │ │ │ │ │ flags); │ │ │ │ │ +entry write_torrent_file (add_torrent_params const& atp); │ │ │ │ │ +std::vector write_torrent_file_buf (add_torrent_params const& atp │ │ │ │ │ + , write_torrent_flags_t flags); │ │ │ │ │ writes only the fields to create a .torrent file. This function may fail with a │ │ │ │ │ std::system_error exception if: │ │ │ │ │ * The add_torrent_params object passed to this function does not contain │ │ │ │ │ the info dictionary (the ti field) │ │ │ │ │ * The piece layers are not complete for all files that need them │ │ │ │ │ The write_torrent_file_buf() overload returns the torrent file in bencoded │ │ │ │ │ buffer form. This overload may be faster at the expense of lost flexibility to