│ │ │
create_ut_pex_plugin()
│ │ │
Declared in "libtorrent/extensions/ut_pex.hpp"
│ │ │
│ │ │ std::shared_ptr<torrent_plugin> create_ut_pex_plugin (torrent_handle const&, client_data_t);
│ │ │
│ │ │
constructor function for the ut_pex extension. The ut_pex
│ │ │ ├── html2text {}
│ │ │ │ @@ -2,14 +2,16 @@
│ │ │ │ _[_l_i_b_t_o_r_r_e_n_t_ _l_o_g_o_]
│ │ │ │ VVeerrssiioonn:: 2.0.11
│ │ │ │ _h_o_m_e
│ │ │ │ Table of contents
│ │ │ │ * _a_ _w_o_r_d_ _o_f_ _c_a_u_t_i_o_n
│ │ │ │ * _p_l_u_g_i_n_-_i_n_t_e_r_f_a_c_e
│ │ │ │ * _c_u_s_t_o_m_ _a_l_e_r_t_s
│ │ │ │ + * _p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e
│ │ │ │ + * _b_t___p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e
│ │ │ │ * _p_l_u_g_i_n
│ │ │ │ o _i_m_p_l_e_m_e_n_t_e_d___f_e_a_t_u_r_e_s_(_)
│ │ │ │ o _n_e_w___t_o_r_r_e_n_t_(_)
│ │ │ │ o _a_d_d_e_d_(_)
│ │ │ │ o _a_b_o_r_t_(_)
│ │ │ │ o _o_n___d_h_t___r_e_q_u_e_s_t_(_)
│ │ │ │ o _o_n___a_l_e_r_t_(_)
│ │ │ │ @@ -17,42 +19,40 @@
│ │ │ │ o _o_n___t_i_c_k_(_)
│ │ │ │ o _g_e_t___u_n_c_h_o_k_e___p_r_i_o_r_i_t_y_(_)
│ │ │ │ o _l_o_a_d___s_t_a_t_e_(_)
│ │ │ │ * _t_o_r_r_e_n_t___p_l_u_g_i_n
│ │ │ │ o _n_e_w___c_o_n_n_e_c_t_i_o_n_(_)
│ │ │ │ o _o_n___p_i_e_c_e___p_a_s_s_(_)_ _o_n___p_i_e_c_e___f_a_i_l_e_d_(_)
│ │ │ │ o _t_i_c_k_(_)
│ │ │ │ - o _o_n___p_a_u_s_e_(_)_ _o_n___r_e_s_u_m_e_(_)
│ │ │ │ + o _o_n___r_e_s_u_m_e_(_)_ _o_n___p_a_u_s_e_(_)
│ │ │ │ o _o_n___f_i_l_e_s___c_h_e_c_k_e_d_(_)
│ │ │ │ o _o_n___s_t_a_t_e_(_)
│ │ │ │ o _o_n___a_d_d___p_e_e_r_(_)
│ │ │ │ * _p_e_e_r___p_l_u_g_i_n
│ │ │ │ o _t_y_p_e_(_)
│ │ │ │ o _a_d_d___h_a_n_d_s_h_a_k_e_(_)
│ │ │ │ o _o_n___d_i_s_c_o_n_n_e_c_t_(_)
│ │ │ │ o _o_n___c_o_n_n_e_c_t_e_d_(_)
│ │ │ │ o _o_n___h_a_n_d_s_h_a_k_e_(_)
│ │ │ │ o _o_n___e_x_t_e_n_s_i_o_n___h_a_n_d_s_h_a_k_e_(_)
│ │ │ │ - o _o_n___u_n_c_h_o_k_e_(_)_ _o_n___h_a_v_e___n_o_n_e_(_)_ _o_n___n_o_t___i_n_t_e_r_e_s_t_e_d_(_)_ _o_n___r_e_q_u_e_s_t_(_)
│ │ │ │ - _o_n___d_o_n_t___h_a_v_e_(_)_ _o_n___h_a_v_e___a_l_l_(_)_ _o_n___b_i_t_f_i_e_l_d_(_)_ _o_n___h_a_v_e_(_)
│ │ │ │ - _o_n___a_l_l_o_w_e_d___f_a_s_t_(_)_ _o_n___c_h_o_k_e_(_)_ _o_n___i_n_t_e_r_e_s_t_e_d_(_)
│ │ │ │ + o _o_n___d_o_n_t___h_a_v_e_(_)_ _o_n___h_a_v_e_(_)_ _o_n___n_o_t___i_n_t_e_r_e_s_t_e_d_(_)_ _o_n___b_i_t_f_i_e_l_d_(_)
│ │ │ │ + _o_n___r_e_q_u_e_s_t_(_)_ _o_n___c_h_o_k_e_(_)_ _o_n___a_l_l_o_w_e_d___f_a_s_t_(_)_ _o_n___h_a_v_e___n_o_n_e_(_)
│ │ │ │ + _o_n___h_a_v_e___a_l_l_(_)_ _o_n___i_n_t_e_r_e_s_t_e_d_(_)_ _o_n___u_n_c_h_o_k_e_(_)
│ │ │ │ o _o_n___p_i_e_c_e_(_)
│ │ │ │ - o _s_e_n_t___u_n_c_h_o_k_e_(_)_ _s_e_n_t___h_a_v_e_(_)_ _s_e_n_t___n_o_t___i_n_t_e_r_e_s_t_e_d_(_)_ _s_e_n_t___p_i_e_c_e_(_)
│ │ │ │ - _s_e_n_t___i_n_t_e_r_e_s_t_e_d_(_)
│ │ │ │ + o _s_e_n_t___i_n_t_e_r_e_s_t_e_d_(_)_ _s_e_n_t___u_n_c_h_o_k_e_(_)_ _s_e_n_t___h_a_v_e_(_)_ _s_e_n_t___p_i_e_c_e_(_)
│ │ │ │ + _s_e_n_t___n_o_t___i_n_t_e_r_e_s_t_e_d_(_)
│ │ │ │ o _s_e_n_t___p_a_y_l_o_a_d_(_)
│ │ │ │ o _c_a_n___d_i_s_c_o_n_n_e_c_t_(_)
│ │ │ │ o _o_n___e_x_t_e_n_d_e_d_(_)
│ │ │ │ o _o_n___u_n_k_n_o_w_n___m_e_s_s_a_g_e_(_)
│ │ │ │ o _o_n___p_i_e_c_e___p_a_s_s_(_)_ _o_n___p_i_e_c_e___f_a_i_l_e_d_(_)
│ │ │ │ o _t_i_c_k_(_)
│ │ │ │ o _w_r_i_t_e___r_e_q_u_e_s_t_(_)
│ │ │ │ * _c_r_y_p_t_o___p_l_u_g_i_n
│ │ │ │ o _d_e_c_r_y_p_t_(_)
│ │ │ │ - * _p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e
│ │ │ │ - * _b_t___p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e
│ │ │ │ * _c_r_e_a_t_e___u_t___p_e_x___p_l_u_g_i_n_(_)
│ │ │ │ * _c_r_e_a_t_e___s_m_a_r_t___b_a_n___p_l_u_g_i_n_(_)
│ │ │ │ * _c_r_e_a_t_e___u_t___m_e_t_a_d_a_t_a___p_l_u_g_i_n_(_)
│ │ │ │ libtorrent has a _p_l_u_g_i_n interface for implementing extensions to the protocol.
│ │ │ │ These can be general extensions for transferring metadata or peer exchange
│ │ │ │ extensions, or it could be used to provide a way to customize the protocol to
│ │ │ │ fit a particular (closed) network.
│ │ │ │ @@ -131,14 +131,79 @@
│ │ │ │ The static category is required for checking whether or not the category for a
│ │ │ │ specific _a_l_e_r_t is enabled or not, without instantiating the _a_l_e_r_t. The category
│ │ │ │ virtual function is the run-time equivalence.
│ │ │ │ The what() virtual function may simply be a string literal of the class name of
│ │ │ │ your _a_l_e_r_t.
│ │ │ │ For more information, see the _a_l_e_r_t_ _s_e_c_t_i_o_n.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ +************ ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee ************
│ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e_._h_p_p"
│ │ │ │ +the _p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e class provides a handle to the internal peer
│ │ │ │ +connection object, to be used by plugins. This is a low level interface that
│ │ │ │ +may not be stable across libtorrent versions
│ │ │ │ +struct peer_connection_handle
│ │ │ │ +{
│ │ │ │ + explicit ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee (std::weak_ptr impl);
│ │ │ │ + connection_type ttyyppee () const;
│ │ │ │ + void aadddd__eexxtteennssiioonn (std::shared_ptr);
│ │ │ │ + peer_plugin const* ffiinndd__pplluuggiinn (string_view type) const;
│ │ │ │ + bool iiss__sseeeedd () const;
│ │ │ │ + bool uuppllooaadd__oonnllyy () const;
│ │ │ │ + peer_id const& ppiidd () const;
│ │ │ │ + bool hhaass__ppiieeccee (piece_index_t i) const;
│ │ │ │ + bool iiss__cchhookkeedd () const;
│ │ │ │ + bool iiss__iinntteerreessttiinngg () const;
│ │ │ │ + bool hhaass__ppeeeerr__cchhookkeedd () const;
│ │ │ │ + bool iiss__ppeeeerr__iinntteerreesstteedd () const;
│ │ │ │ + void mmaayybbee__uunncchhookkee__tthhiiss__ppeeeerr ();
│ │ │ │ + void cchhookkee__tthhiiss__ppeeeerr ();
│ │ │ │ + void ggeett__ppeeeerr__iinnffoo (peer_info& p) const;
│ │ │ │ + torrent_handle aassssoocciiaatteedd__ttoorrrreenntt () const;
│ │ │ │ + _t_c_p_:_:_e_n_d_p_o_i_n_t const& rreemmoottee () const;
│ │ │ │ + _t_c_p_:_:_e_n_d_p_o_i_n_t llooccaall__eennddppooiinntt () const;
│ │ │ │ + bool iiss__ccoonnnneeccttiinngg () const;
│ │ │ │ + bool iiss__ddiissccoonnnneeccttiinngg () const;
│ │ │ │ + void ddiissccoonnnneecctt (error_code const& ec, operation_t op
│ │ │ │ + , disconnect_severity_t = peer_connection_interface::normal);
│ │ │ │ + bool iiss__oouuttggooiinngg () const;
│ │ │ │ + bool oonn__llooccaall__nneettwwoorrkk () const;
│ │ │ │ + bool iiggnnoorree__uunncchhookkee__sslloottss () const;
│ │ │ │ + bool ffaaiilleedd () const;
│ │ │ │ + void ppeeeerr__lloogg (peer_log_alert::direction_t direction
│ │ │ │ + , char const* event, char const* fmt = "", ...) const TORRENT_FORMAT
│ │ │ │ +(4,5);
│ │ │ │ + bool sshhoouulldd__lloogg (peer_log_alert::direction_t direction) const;
│ │ │ │ + bool ccaann__ddiissccoonnnneecctt (error_code const& ec) const;
│ │ │ │ + bool hhaass__mmeettaaddaattaa () const;
│ │ │ │ + bool iinn__hhaannddsshhaakkee () const;
│ │ │ │ + void sseenndd__bbuuffffeerr (char const* begin, int size);
│ │ │ │ + std::time_t llaasstt__sseeeenn__ccoommpplleettee () const;
│ │ │ │ + time_point ttiimmee__ooff__llaasstt__uunncchhookkee () const;
│ │ │ │ + bool ooppeerraattoorr<< (peer_connection_handle const& o) const;
│ │ │ │ + bool ooppeerraattoorr!!== (peer_connection_handle const& o) const;
│ │ │ │ + bool ooppeerraattoorr==== (peer_connection_handle const& o) const;
│ │ │ │ + std::shared_ptr nnaattiivvee__hhaannddllee () const;
│ │ │ │ +};
│ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ +************ bbtt__ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee ************
│ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e_._h_p_p"
│ │ │ │ +The _b_t___p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e provides a handle to the internal bittorrent peer
│ │ │ │ +connection object to plugins. It's low level and may not be a stable API across
│ │ │ │ +libtorrent versions.
│ │ │ │ +struct bt_peer_connection_handle : peer_connection_handle
│ │ │ │ +{
│ │ │ │ + explicit bbtt__ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee (peer_connection_handle pc);
│ │ │ │ + bool ppaacckkeett__ffiinniisshheedd () const;
│ │ │ │ + bool ssuuppppoorrtt__eexxtteennssiioonnss () const;
│ │ │ │ + bool ssuuppppoorrttss__eennccrryyppttiioonn () const;
│ │ │ │ + void sswwiittcchh__sseenndd__ccrryyppttoo (std::shared_ptr crypto);
│ │ │ │ + void sswwiittcchh__rreeccvv__ccrryyppttoo (std::shared_ptr crypto);
│ │ │ │ + std::shared_ptr nnaattiivvee__hhaannddllee () const;
│ │ │ │ +};
│ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ************ pplluuggiinn ************
│ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_._h_p_p"
│ │ │ │ this is the base class for a _s_e_s_s_i_o_n _p_l_u_g_i_n. One primary feature is that it is
│ │ │ │ notified of all torrents that are added to the _s_e_s_s_i_o_n, and can add its own
│ │ │ │ torrent_plugins.
│ │ │ │ struct plugin
│ │ │ │ {
│ │ │ │ @@ -256,16 +321,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 nneeww__ccoonnnneeccttiioonn (peer_connection_handle
│ │ │ │ const&);
│ │ │ │ - virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t);
│ │ │ │ virtual void oonn__ppiieeccee__ppaassss (piece_index_t);
│ │ │ │ + virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t);
│ │ │ │ virtual void ttiicckk ();
│ │ │ │ virtual bool oonn__rreessuummee ();
│ │ │ │ virtual bool oonn__ppaauussee ();
│ │ │ │ virtual void oonn__ffiilleess__cchheecckkeedd ();
│ │ │ │ virtual void oonn__ssttaattee (torrent_status::state_t);
│ │ │ │ virtual void oonn__aadddd__ppeeeerr (tcp::endpoint const&,
│ │ │ │ peer_source_flags_t, add_peer_flags_t);
│ │ │ │ @@ -286,27 +351,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 _p_e_e_r___p_l_u_g_i_n. If you want to keep references to it, use
│ │ │ │ weak_ptr.
│ │ │ │ If this function throws an exception, the connection will be closed.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** oonn__ppiieeccee__ppaassss(()) oonn__ppiieeccee__ffaaiilleedd(()) **********
│ │ │ │ -virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t);
│ │ │ │ virtual void oonn__ppiieeccee__ppaassss (piece_index_t);
│ │ │ │ +virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t);
│ │ │ │ These hooks are called when a piece passes the hash check or fails the hash
│ │ │ │ check, respectively. The index is the piece index that was downloaded. It is
│ │ │ │ possible to access the list of peers that participated in sending the piece
│ │ │ │ through the torrent and the piece_picker.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** ttiicckk(()) **********
│ │ │ │ virtual void ttiicckk ();
│ │ │ │ This hook is called approximately once per second. It is a way of making it
│ │ │ │ easy for plugins to do timed events, for sending messages or whatever.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** oonn__ppaauussee(()) oonn__rreessuummee(()) **********
│ │ │ │ +********** oonn__rreessuummee(()) oonn__ppaauussee(()) **********
│ │ │ │ virtual bool oonn__rreessuummee ();
│ │ │ │ virtual bool oonn__ppaauussee ();
│ │ │ │ These hooks are called when the torrent is paused and resumed respectively. The
│ │ │ │ return value indicates if the event was handled. A return value of true
│ │ │ │ indicates that it was handled, and no other _p_l_u_g_i_n after this one will have
│ │ │ │ this hook function called, and the standard handler will also not be invoked.
│ │ │ │ So, returning true effectively overrides the standard behavior of pause or
│ │ │ │ @@ -354,51 +419,51 @@
│ │ │ │ {
│ │ │ │ virtual string_view ttyyppee () const;
│ │ │ │ virtual void aadddd__hhaannddsshhaakkee (entry&);
│ │ │ │ virtual void oonn__ddiissccoonnnneecctt (error_code const&);
│ │ │ │ virtual void oonn__ccoonnnneecctteedd ();
│ │ │ │ virtual bool oonn__hhaannddsshhaakkee (span);
│ │ │ │ virtual bool oonn__eexxtteennssiioonn__hhaannddsshhaakkee (bdecode_node const&);
│ │ │ │ - virtual bool oonn__hhaavvee__nnoonnee ();
│ │ │ │ - virtual bool oonn__hhaavvee (piece_index_t);
│ │ │ │ - virtual bool oonn__rreeqquueesstt (peer_request const&);
│ │ │ │ virtual bool oonn__nnoott__iinntteerreesstteedd ();
│ │ │ │ - virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t);
│ │ │ │ - virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//);
│ │ │ │ - virtual bool oonn__iinntteerreesstteedd ();
│ │ │ │ - virtual bool oonn__cchhookkee ();
│ │ │ │ virtual bool oonn__uunncchhookkee ();
│ │ │ │ + virtual bool oonn__hhaavvee__nnoonnee ();
│ │ │ │ + virtual bool oonn__cchhookkee ();
│ │ │ │ virtual bool oonn__hhaavvee__aallll ();
│ │ │ │ virtual bool oonn__ddoonntt__hhaavvee (piece_index_t);
│ │ │ │ + virtual bool oonn__rreeqquueesstt (peer_request const&);
│ │ │ │ + virtual bool oonn__iinntteerreesstteedd ();
│ │ │ │ + virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//);
│ │ │ │ + virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t);
│ │ │ │ + virtual bool oonn__hhaavvee (piece_index_t);
│ │ │ │ virtual bool oonn__ppiieeccee (peer_request const& //**ppiieeccee**//
│ │ │ │ , span //**bbuuff**//);
│ │ │ │ - virtual bool oonn__rreejjeecctt (peer_request const&);
│ │ │ │ - virtual bool oonn__ssuuggggeesstt (piece_index_t);
│ │ │ │ virtual bool oonn__ccaanncceell (peer_request const&);
│ │ │ │ - virtual void sseenntt__aallllooww__ffaasstt (piece_index_t);
│ │ │ │ + virtual bool oonn__ssuuggggeesstt (piece_index_t);
│ │ │ │ + virtual bool oonn__rreejjeecctt (peer_request const&);
│ │ │ │ + virtual void sseenntt__rreejjeecctt__rreeqquueesstt (peer_request const&);
│ │ │ │ virtual void sseenntt__cchhookkee ();
│ │ │ │ virtual void sseenntt__hhaavvee__aallll ();
│ │ │ │ + virtual void sseenntt__aallllooww__ffaasstt (piece_index_t);
│ │ │ │ + virtual void sseenntt__ccaanncceell (peer_request const&);
│ │ │ │ virtual void sseenntt__ssuuggggeesstt (piece_index_t);
│ │ │ │ virtual void sseenntt__rreeqquueesstt (peer_request const&);
│ │ │ │ virtual void sseenntt__hhaavvee__nnoonnee ();
│ │ │ │ - virtual void sseenntt__rreejjeecctt__rreeqquueesstt (peer_request const&);
│ │ │ │ - virtual void sseenntt__ccaanncceell (peer_request const&);
│ │ │ │ - virtual void sseenntt__hhaavvee (piece_index_t);
│ │ │ │ virtual void sseenntt__iinntteerreesstteedd ();
│ │ │ │ + virtual void sseenntt__uunncchhookkee ();
│ │ │ │ + virtual void sseenntt__hhaavvee (piece_index_t);
│ │ │ │ virtual void sseenntt__ppiieeccee (peer_request const&);
│ │ │ │ virtual void sseenntt__nnoott__iinntteerreesstteedd ();
│ │ │ │ - virtual void sseenntt__uunncchhookkee ();
│ │ │ │ virtual void sseenntt__ppaayyllooaadd (int //** bbyytteess **//);
│ │ │ │ virtual bool ccaann__ddiissccoonnnneecctt (error_code const& //**eecc**//);
│ │ │ │ virtual bool oonn__eexxtteennddeedd (int //**lleennggtthh**//, int //**mmssgg**//,
│ │ │ │ span //**bbooddyy**//);
│ │ │ │ virtual bool oonn__uunnkknnoowwnn__mmeessssaaggee (int //**lleennggtthh**//, int //**mmssgg**//,
│ │ │ │ span //**bbooddyy**//);
│ │ │ │ - virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t);
│ │ │ │ virtual void oonn__ppiieeccee__ppaassss (piece_index_t);
│ │ │ │ + virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t);
│ │ │ │ virtual void ttiicckk ();
│ │ │ │ virtual bool wwrriittee__rreeqquueesstt (peer_request const&);
│ │ │ │ };
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** ttyyppee(()) **********
│ │ │ │ virtual string_view ttyyppee () const;
│ │ │ │ This function is expected to return the name of the _p_l_u_g_i_n.
│ │ │ │ @@ -426,48 +491,48 @@
│ │ │ │ ********** oonn__eexxtteennssiioonn__hhaannddsshhaakkee(()) **********
│ │ │ │ virtual bool oonn__eexxtteennssiioonn__hhaannddsshhaakkee (bdecode_node const&);
│ │ │ │ called when the extension handshake from the other end is received if this
│ │ │ │ returns false, it means that this extension isn't supported by this peer. It
│ │ │ │ will result in this _p_e_e_r___p_l_u_g_i_n being removed from the peer_connection and
│ │ │ │ destructed. this is not called for web seeds
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** oonn__uunncchhookkee(()) oonn__hhaavvee__nnoonnee(()) oonn__nnoott__iinntteerreesstteedd(()) oonn__rreeqquueesstt(()) oonn__ddoonntt__hhaavvee
│ │ │ │ -(()) oonn__hhaavvee__aallll(()) oonn__bbiittffiieelldd(()) oonn__hhaavvee(()) oonn__aalllloowweedd__ffaasstt(()) oonn__cchhookkee(())
│ │ │ │ -oonn__iinntteerreesstteedd(()) **********
│ │ │ │ -virtual bool oonn__hhaavvee__nnoonnee ();
│ │ │ │ -virtual bool oonn__hhaavvee (piece_index_t);
│ │ │ │ -virtual bool oonn__rreeqquueesstt (peer_request const&);
│ │ │ │ +********** oonn__ddoonntt__hhaavvee(()) oonn__hhaavvee(()) oonn__nnoott__iinntteerreesstteedd(()) oonn__bbiittffiieelldd(()) oonn__rreeqquueesstt(())
│ │ │ │ +oonn__cchhookkee(()) oonn__aalllloowweedd__ffaasstt(()) oonn__hhaavvee__nnoonnee(()) oonn__hhaavvee__aallll(()) oonn__iinntteerreesstteedd(())
│ │ │ │ +oonn__uunncchhookkee(()) **********
│ │ │ │ virtual bool oonn__nnoott__iinntteerreesstteedd ();
│ │ │ │ -virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t);
│ │ │ │ -virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//);
│ │ │ │ -virtual bool oonn__iinntteerreesstteedd ();
│ │ │ │ -virtual bool oonn__cchhookkee ();
│ │ │ │ virtual bool oonn__uunncchhookkee ();
│ │ │ │ +virtual bool oonn__hhaavvee__nnoonnee ();
│ │ │ │ +virtual bool oonn__cchhookkee ();
│ │ │ │ virtual bool oonn__hhaavvee__aallll ();
│ │ │ │ virtual bool oonn__ddoonntt__hhaavvee (piece_index_t);
│ │ │ │ +virtual bool oonn__rreeqquueesstt (peer_request const&);
│ │ │ │ +virtual bool oonn__iinntteerreesstteedd ();
│ │ │ │ +virtual bool oonn__bbiittffiieelldd (bitfield const& //**bbiittffiieelldd**//);
│ │ │ │ +virtual bool oonn__aalllloowweedd__ffaasstt (piece_index_t);
│ │ │ │ +virtual bool oonn__hhaavvee (piece_index_t);
│ │ │ │ returning true from any of the message handlers indicates that the _p_l_u_g_i_n has
│ │ │ │ handled the message. it will break the _p_l_u_g_i_n chain traversing and not let
│ │ │ │ anyone else handle the message, including the default handler.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** oonn__ppiieeccee(()) **********
│ │ │ │ virtual bool oonn__ppiieeccee (peer_request const& //**ppiieeccee**//
│ │ │ │ , span //**bbuuff**//);
│ │ │ │ This function is called when the peer connection is receiving a piece. buf
│ │ │ │ points (non-owning pointer) to the data in an internal immutable disk buffer.
│ │ │ │ The length of the data is specified in the length member of the piece
│ │ │ │ parameter. returns true to indicate that the piece is handled and the rest of
│ │ │ │ the logic should be ignored.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** sseenntt__uunncchhookkee(()) sseenntt__hhaavvee(()) sseenntt__nnoott__iinntteerreesstteedd(()) sseenntt__ppiieeccee(())
│ │ │ │ -sseenntt__iinntteerreesstteedd(()) **********
│ │ │ │ -virtual void sseenntt__hhaavvee (piece_index_t);
│ │ │ │ +********** sseenntt__iinntteerreesstteedd(()) sseenntt__uunncchhookkee(()) sseenntt__hhaavvee(()) sseenntt__ppiieeccee(())
│ │ │ │ +sseenntt__nnoott__iinntteerreesstteedd(()) **********
│ │ │ │ virtual void sseenntt__iinntteerreesstteedd ();
│ │ │ │ +virtual void sseenntt__uunncchhookkee ();
│ │ │ │ +virtual void sseenntt__hhaavvee (piece_index_t);
│ │ │ │ virtual void sseenntt__ppiieeccee (peer_request const&);
│ │ │ │ virtual void sseenntt__nnoott__iinntteerreesstteedd ();
│ │ │ │ -virtual void sseenntt__uunncchhookkee ();
│ │ │ │ called after a choke message has been sent to the peer
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** sseenntt__ppaayyllooaadd(()) **********
│ │ │ │ virtual void sseenntt__ppaayyllooaadd (int //** bbyytteess **//);
│ │ │ │ called after piece data has been sent to the peer this can be used for stats
│ │ │ │ book keeping
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ @@ -491,16 +556,16 @@
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** oonn__uunnkknnoowwnn__mmeessssaaggee(()) **********
│ │ │ │ virtual bool oonn__uunnkknnoowwnn__mmeessssaaggee (int //**lleennggtthh**//, int //**mmssgg**//,
│ │ │ │ span //**bbooddyy**//);
│ │ │ │ this is not called for web seeds
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** oonn__ppiieeccee__ppaassss(()) oonn__ppiieeccee__ffaaiilleedd(()) **********
│ │ │ │ -virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t);
│ │ │ │ virtual void oonn__ppiieeccee__ppaassss (piece_index_t);
│ │ │ │ +virtual void oonn__ppiieeccee__ffaaiilleedd (piece_index_t);
│ │ │ │ called when a piece that this peer participated in either fails or passes the
│ │ │ │ hash_check
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** ttiicckk(()) **********
│ │ │ │ virtual void ttiicckk ();
│ │ │ │ called approximately once every second
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ @@ -529,79 +594,14 @@
│ │ │ │ consume is set to the number of bytes which should be trimmed from the head of
│ │ │ │ the buffers, default is 0
│ │ │ │ produce is set to the number of bytes of payload which are now ready to be sent
│ │ │ │ to the upper layer. default is the number of bytes passed in receive_vec
│ │ │ │ packet_size is set to the minimum number of bytes which must be read to advance
│ │ │ │ the next step of decryption. default is 0
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -************ ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee ************
│ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e_._h_p_p"
│ │ │ │ -the _p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e class provides a handle to the internal peer
│ │ │ │ -connection object, to be used by plugins. This is a low level interface that
│ │ │ │ -may not be stable across libtorrent versions
│ │ │ │ -struct peer_connection_handle
│ │ │ │ -{
│ │ │ │ - explicit ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee (std::weak_ptr impl);
│ │ │ │ - connection_type ttyyppee () const;
│ │ │ │ - peer_plugin const* ffiinndd__pplluuggiinn (string_view type) const;
│ │ │ │ - void aadddd__eexxtteennssiioonn (std::shared_ptr);
│ │ │ │ - bool iiss__sseeeedd () const;
│ │ │ │ - bool uuppllooaadd__oonnllyy () const;
│ │ │ │ - peer_id const& ppiidd () const;
│ │ │ │ - bool hhaass__ppiieeccee (piece_index_t i) const;
│ │ │ │ - bool iiss__iinntteerreessttiinngg () const;
│ │ │ │ - bool iiss__cchhookkeedd () const;
│ │ │ │ - bool iiss__ppeeeerr__iinntteerreesstteedd () const;
│ │ │ │ - bool hhaass__ppeeeerr__cchhookkeedd () const;
│ │ │ │ - void cchhookkee__tthhiiss__ppeeeerr ();
│ │ │ │ - void mmaayybbee__uunncchhookkee__tthhiiss__ppeeeerr ();
│ │ │ │ - void ggeett__ppeeeerr__iinnffoo (peer_info& p) const;
│ │ │ │ - torrent_handle aassssoocciiaatteedd__ttoorrrreenntt () const;
│ │ │ │ - _t_c_p_:_:_e_n_d_p_o_i_n_t const& rreemmoottee () const;
│ │ │ │ - _t_c_p_:_:_e_n_d_p_o_i_n_t llooccaall__eennddppooiinntt () const;
│ │ │ │ - void ddiissccoonnnneecctt (error_code const& ec, operation_t op
│ │ │ │ - , disconnect_severity_t = peer_connection_interface::normal);
│ │ │ │ - bool iiss__oouuttggooiinngg () const;
│ │ │ │ - bool iiss__ccoonnnneeccttiinngg () const;
│ │ │ │ - bool iiss__ddiissccoonnnneeccttiinngg () const;
│ │ │ │ - bool oonn__llooccaall__nneettwwoorrkk () const;
│ │ │ │ - bool iiggnnoorree__uunncchhookkee__sslloottss () const;
│ │ │ │ - bool ffaaiilleedd () const;
│ │ │ │ - bool sshhoouulldd__lloogg (peer_log_alert::direction_t direction) const;
│ │ │ │ - void ppeeeerr__lloogg (peer_log_alert::direction_t direction
│ │ │ │ - , char const* event, char const* fmt = "", ...) const TORRENT_FORMAT
│ │ │ │ -(4,5);
│ │ │ │ - bool ccaann__ddiissccoonnnneecctt (error_code const& ec) const;
│ │ │ │ - bool hhaass__mmeettaaddaattaa () const;
│ │ │ │ - bool iinn__hhaannddsshhaakkee () const;
│ │ │ │ - void sseenndd__bbuuffffeerr (char const* begin, int size);
│ │ │ │ - std::time_t llaasstt__sseeeenn__ccoommpplleettee () const;
│ │ │ │ - time_point ttiimmee__ooff__llaasstt__uunncchhookkee () const;
│ │ │ │ - bool ooppeerraattoorr==== (peer_connection_handle const& o) const;
│ │ │ │ - bool ooppeerraattoorr<< (peer_connection_handle const& o) const;
│ │ │ │ - bool ooppeerraattoorr!!== (peer_connection_handle const& o) const;
│ │ │ │ - std::shared_ptr nnaattiivvee__hhaannddllee () const;
│ │ │ │ -};
│ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -************ bbtt__ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee ************
│ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e_._h_p_p"
│ │ │ │ -The _b_t___p_e_e_r___c_o_n_n_e_c_t_i_o_n___h_a_n_d_l_e provides a handle to the internal bittorrent peer
│ │ │ │ -connection object to plugins. It's low level and may not be a stable API across
│ │ │ │ -libtorrent versions.
│ │ │ │ -struct bt_peer_connection_handle : peer_connection_handle
│ │ │ │ -{
│ │ │ │ - explicit bbtt__ppeeeerr__ccoonnnneeccttiioonn__hhaannddllee (peer_connection_handle pc);
│ │ │ │ - bool ppaacckkeett__ffiinniisshheedd () const;
│ │ │ │ - bool ssuuppppoorrtt__eexxtteennssiioonnss () const;
│ │ │ │ - bool ssuuppppoorrttss__eennccrryyppttiioonn () const;
│ │ │ │ - void sswwiittcchh__sseenndd__ccrryyppttoo (std::shared_ptr crypto);
│ │ │ │ - void sswwiittcchh__rreeccvv__ccrryyppttoo (std::shared_ptr crypto);
│ │ │ │ - std::shared_ptr nnaattiivvee__hhaannddllee () const;
│ │ │ │ -};
│ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ************ ccrreeaattee__uutt__ppeexx__pplluuggiinn(()) ************
│ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_e_x_t_e_n_s_i_o_n_s_/_u_t___p_e_x_._h_p_p"
│ │ │ │ std::shared_ptr ccrreeaattee__uutt__ppeexx__pplluuggiinn (torrent_handle const&,
│ │ │ │ client_data_t);
│ │ │ │ constructor function for the ut_pex extension. The ut_pex extension allows
│ │ │ │ peers to gossip about their connections, allowing the swarm stay well connected
│ │ │ │ and peers aware of more peers in the swarm. This extension is enabled by
│ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Resume_Data.html
│ │ │ @@ -30,15 +30,15 @@
│ │ │
│ │ │ home
│ │ │
│ │ │
Table of contents
│ │ │
│ │ │
│ │ │ [report issue]
│ │ │
read_resume_data()
│ │ │
Declared in "libtorrent/read_resume_data.hpp"
│ │ │
│ │ │ @@ -72,24 +72,24 @@
│ │ │ 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 {}
│ │ │ │ @@ -1,15 +1,15 @@
│ │ │ │ >
│ │ │ │ _[_l_i_b_t_o_r_r_e_n_t_ _l_o_g_o_]
│ │ │ │ VVeerrssiioonn:: 2.0.11
│ │ │ │ _h_o_m_e
│ │ │ │ Table of contents
│ │ │ │ * _r_e_a_d___r_e_s_u_m_e___d_a_t_a_(_)
│ │ │ │ * _w_r_i_t_e___r_e_s_u_m_e___d_a_t_a___b_u_f_(_)_ _w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_(_)
│ │ │ │ - * _w_r_i_t_e___t_o_r_r_e_n_t___f_i_l_e_(_)_ _w_r_i_t_e___t_o_r_r_e_n_t___f_i_l_e___b_u_f_(_)
│ │ │ │ + * _w_r_i_t_e___t_o_r_r_e_n_t___f_i_l_e___b_u_f_(_)_ _w_r_i_t_e___t_o_r_r_e_n_t___f_i_l_e_(_)
│ │ │ │ * _w_r_i_t_e___t_o_r_r_e_n_t___f_l_a_g_s___t
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ************ rreeaadd__rreessuummee__ddaattaa(()) ************
│ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_r_e_a_d___r_e_s_u_m_e___d_a_t_a_._h_p_p"
│ │ │ │ add_torrent_params rreeaadd__rreessuummee__ddaattaa (span buffer
│ │ │ │ , error_code& ec, load_torrent_limits const& cfg = {});
│ │ │ │ add_torrent_params rreeaadd__rreessuummee__ddaattaa (bdecode_node const& rd
│ │ │ │ @@ -36,21 +36,21 @@
│ │ │ │ ************ wwrriittee__rreessuummee__ddaattaa__bbuuff(()) wwrriittee__rreessuummee__ddaattaa(()) ************
│ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_._h_p_p"
│ │ │ │ std::vector wwrriittee__rreessuummee__ddaattaa__bbuuff (add_torrent_params const& atp);
│ │ │ │ entry wwrriittee__rreessuummee__ddaattaa (add_torrent_params const& atp);
│ │ │ │ this function turns the resume data in an add_torrent_params object into a
│ │ │ │ bencoded structure
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -************ wwrriittee__ttoorrrreenntt__ffiillee(()) wwrriittee__ttoorrrreenntt__ffiillee__bbuuff(()) ************
│ │ │ │ +************ wwrriittee__ttoorrrreenntt__ffiillee__bbuuff(()) wwrriittee__ttoorrrreenntt__ffiillee(()) ************
│ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_w_r_i_t_e___r_e_s_u_m_e___d_a_t_a_._h_p_p"
│ │ │ │ -std::vector wwrriittee__ttoorrrreenntt__ffiillee__bbuuff (add_torrent_params const& atp
│ │ │ │ - , write_torrent_flags_t flags);
│ │ │ │ -entry wwrriittee__ttoorrrreenntt__ffiillee (add_torrent_params const& atp);
│ │ │ │ entry wwrriittee__ttoorrrreenntt__ffiillee (add_torrent_params const& atp, write_torrent_flags_t
│ │ │ │ flags);
│ │ │ │ +entry wwrriittee__ttoorrrreenntt__ffiillee (add_torrent_params const& atp);
│ │ │ │ +std::vector wwrriittee__ttoorrrreenntt__ffiillee__bbuuff (add_torrent_params const& atp
│ │ │ │ + , write_torrent_flags_t flags);
│ │ │ │ writes only the fields to create a .torrent file. This function may fail with a
│ │ │ │ std::system_error exception if:
│ │ │ │ * The _a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s object passed to this function does not contain
│ │ │ │ the info dictionary (the ti field)
│ │ │ │ * The piece layers are not complete for all files that need them
│ │ │ │ The write_torrent_file_buf() overload returns the torrent file in bencoded
│ │ │ │ buffer form. This overload may be faster at the expense of lost flexibility to
│ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Session.html
│ │ │ @@ -52,15 +52,15 @@
│ │ │ - is_valid()
│ │ │ - session_state()
│ │ │ - get_torrent_status() refresh_torrent_status()
│ │ │ - post_torrent_updates()
│ │ │ - post_session_stats()
│ │ │ - post_dht_stats()
│ │ │ - set_dht_state()
│ │ │ -- find_torrent() get_torrents()
│ │ │ +- get_torrents() find_torrent()
│ │ │ - async_add_torrent() add_torrent()
│ │ │ - pause() resume() is_paused()
│ │ │ - is_dht_running()
│ │ │ - set_dht_storage()
│ │ │ - add_dht_node()
│ │ │ - dht_get_item()
│ │ │ - dht_get_item()
│ │ │ @@ -69,23 +69,23 @@
│ │ │ - dht_get_peers() dht_announce()
│ │ │ - dht_live_nodes()
│ │ │ - dht_sample_infohashes()
│ │ │ - dht_direct_request()
│ │ │ - add_extension()
│ │ │ - set_ip_filter() get_ip_filter()
│ │ │ - set_port_filter()
│ │ │ -- is_listening() ssl_listen_port() listen_port()
│ │ │ -- set_peer_class_filter() get_peer_class_filter()
│ │ │ -- get_peer_class_type_filter() set_peer_class_type_filter()
│ │ │ +- ssl_listen_port() is_listening() listen_port()
│ │ │ +- get_peer_class_filter() set_peer_class_filter()
│ │ │ +- set_peer_class_type_filter() get_peer_class_type_filter()
│ │ │ - create_peer_class()
│ │ │ - delete_peer_class()
│ │ │ -- get_peer_class() set_peer_class()
│ │ │ +- set_peer_class() get_peer_class()
│ │ │ - remove_torrent()
│ │ │ -- apply_settings() get_settings()
│ │ │ -- set_alert_notify() wait_for_alert() pop_alerts()
│ │ │ +- get_settings() apply_settings()
│ │ │ +- wait_for_alert() set_alert_notify() pop_alerts()
│ │ │ - delete_port_mapping() add_port_mapping()
│ │ │ - reopen_network_sockets()
│ │ │ - native_handle()
│ │ │
│ │ │
│ │ │
write_session_params_buf() write_session_params() read_session_params()
│ │ │
│ │ │ @@ -94,17 +94,17 @@
│ │ │
session_params
│ │ │
Declared in "libtorrent/session_params.hpp"
│ │ │
The session_params is a parameters pack for configuring the session
│ │ │ before it's started.
│ │ │
│ │ │ struct session_params
│ │ │ {
│ │ │ + session_params (settings_pack&& sp);
│ │ │ session_params ();
│ │ │ session_params (settings_pack const& sp);
│ │ │ - session_params (settings_pack&& sp);
│ │ │ session_params (settings_pack&& sp
│ │ │ , std::vector<std::shared_ptr<plugin>> exts);
│ │ │ session_params (settings_pack const& sp
│ │ │ , std::vector<std::shared_ptr<plugin>> exts);
│ │ │
│ │ │ settings_pack settings;
│ │ │ std::vector<std::shared_ptr<plugin>> extensions;
│ │ │ @@ -114,17 +114,17 @@
│ │ │ std::map<std::string, std::string> ext_state;
│ │ │ libtorrent::ip_filter ip_filter;
│ │ │ };
│ │ │
│ │ │
[report issue]
│ │ │
session_params()
│ │ │
│ │ │ +session_params (settings_pack&& sp);
│ │ │ session_params ();
│ │ │ session_params (settings_pack const& sp);
│ │ │ -session_params (settings_pack&& sp);
│ │ │
│ │ │
This constructor can be used to start with the default plugins
│ │ │ (ut_metadata, ut_pex and smart_ban). Pass a settings_pack to set the
│ │ │ initial settings when the session starts.
│ │ │
[report issue]
│ │ │
│ │ │
session_params()
│ │ │ @@ -178,33 +178,33 @@
│ │ │ synchronize the completion of the shutdown. The lifetime of this object
│ │ │ may outlive
session, causing the
session destructor to not block. The
│ │ │
session_proxy destructor will block however, until the underlying
session
│ │ │ is done shutting down.
│ │ │
│ │ │ struct session_proxy
│ │ │ {
│ │ │ - session_proxy (session_proxy const&);
│ │ │ - session_proxy& operator= (session_proxy&&) & noexcept;
│ │ │ - session_proxy& operator= (session_proxy const&) &;
│ │ │ - session_proxy (session_proxy&&) noexcept;
│ │ │ ~session_proxy ();
│ │ │ session_proxy ();
│ │ │ + session_proxy& operator= (session_proxy&&) & noexcept;
│ │ │ + session_proxy (session_proxy&&) noexcept;
│ │ │ + session_proxy (session_proxy const&);
│ │ │ + session_proxy& operator= (session_proxy const&) &;
│ │ │ };
│ │ │
│ │ │
│ │ │
│ │ │
[report issue]
│ │ │
~session_proxy() operator=() session_proxy()
│ │ │
│ │ │ -session_proxy (session_proxy const&);
│ │ │ -session_proxy& operator= (session_proxy&&) & noexcept;
│ │ │ -session_proxy& operator= (session_proxy const&) &;
│ │ │ -session_proxy (session_proxy&&) noexcept;
│ │ │ ~session_proxy ();
│ │ │ session_proxy ();
│ │ │ +session_proxy& operator= (session_proxy&&) & noexcept;
│ │ │ +session_proxy (session_proxy&&) noexcept;
│ │ │ +session_proxy (session_proxy const&);
│ │ │ +session_proxy& operator= (session_proxy const&) &;
│ │ │
│ │ │
default constructor, does not refer to any session
│ │ │ implementation object.
│ │ │
[report issue]
│ │ │
│ │ │
│ │ │
session
│ │ │ @@ -218,52 +218,52 @@
│ │ │
session_handle::apply_settings() member function. To change one or more
│ │ │ configuration options, create a
settings_pack. object and fill it with
│ │ │ the settings to be set and pass it in to
session::apply_settings().
│ │ │
see apply_settings().
│ │ │
│ │ │ struct session : session_handle
│ │ │ {
│ │ │ - session (session_params const& params, session_flags_t flags);
│ │ │ session (session_params&& params, session_flags_t flags);
│ │ │ + session (session_params const& params, session_flags_t flags);
│ │ │ explicit session (session_params&& params);
│ │ │ - session ();
│ │ │ explicit session (session_params const& params);
│ │ │ + session ();
│ │ │ session (session_params&& params, io_context& ios);
│ │ │ - session (session_params const& params, io_context& ios, session_flags_t);
│ │ │ session (session_params&& params, io_context& ios, session_flags_t);
│ │ │ session (session_params const& params, io_context& ios);
│ │ │ + session (session_params const& params, io_context& ios, session_flags_t);
│ │ │ ~session ();
│ │ │ session_proxy abort ();
│ │ │ };
│ │ │
│ │ │
[report issue]
│ │ │
session()
│ │ │
│ │ │ -session (session_params const& params, session_flags_t flags);
│ │ │ session (session_params&& params, session_flags_t flags);
│ │ │ +session (session_params const& params, session_flags_t flags);
│ │ │ explicit session (session_params&& params);
│ │ │ -session ();
│ │ │ explicit session (session_params const& params);
│ │ │ +session ();
│ │ │
│ │ │
Constructs the session objects which acts as the container of torrents.
│ │ │ In order to avoid a race condition between starting the session and
│ │ │ configuring it, you can pass in a session_params object. Its settings
│ │ │ will take effect before the session starts up.
│ │ │
The overloads taking flags can be used to start a session in
│ │ │ paused mode (by passing in session::paused). Note that
│ │ │ add_default_plugins do not have an affect on constructors that
│ │ │ take a session_params object. It already contains the plugins to use.
│ │ │
[report issue]
│ │ │
│ │ │
session()
│ │ │
│ │ │ session (session_params&& params, io_context& ios);
│ │ │ -session (session_params const& params, io_context& ios, session_flags_t);
│ │ │ session (session_params&& params, io_context& ios, session_flags_t);
│ │ │ session (session_params const& params, io_context& ios);
│ │ │ +session (session_params 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.
│ │ │
│ │ │
│ │ │
│ │ │
session_handle
│ │ │
Declared in "libtorrent/session_handle.hpp"
│ │ │
this class provides a non-owning handle to a session and a subset of the
│ │ │ interface of the session class. If the underlying session is destructed
│ │ │ -any handle to it will no longer be valid. is_valid() will return false and
│ │ │ +any handle to it will no longer be valid. is_valid() will return false and
│ │ │ any operation on it will throw a system_error exception, with error code
│ │ │ invalid_session_handle.
│ │ │
│ │ │ struct session_handle
│ │ │ {
│ │ │ bool is_valid () const;
│ │ │ session_params session_state (save_state_flags_t flags = save_state_flags_t::all()) const;
│ │ │ + void refresh_torrent_status (std::vector<torrent_status>* ret
│ │ │ + , status_flags_t flags = {}) const;
│ │ │ std::vector<torrent_status> get_torrent_status (
│ │ │ std::function<bool(torrent_status const&)> const& pred
│ │ │ , status_flags_t flags = {}) const;
│ │ │ - void refresh_torrent_status (std::vector<torrent_status>* ret
│ │ │ - , status_flags_t flags = {}) const;
│ │ │ void post_torrent_updates (status_flags_t flags = status_flags_t::all());
│ │ │ void post_session_stats ();
│ │ │ void post_dht_stats ();
│ │ │ - void set_dht_state (dht::dht_state&& st);
│ │ │ void set_dht_state (dht::dht_state const& st);
│ │ │ - std::vector<torrent_handle> get_torrents () const;
│ │ │ + void set_dht_state (dht::dht_state&& st);
│ │ │ torrent_handle find_torrent (sha1_hash const& info_hash) const;
│ │ │ - torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
│ │ │ - void async_add_torrent (add_torrent_params const& params);
│ │ │ + std::vector<torrent_handle> get_torrents () const;
│ │ │ + torrent_handle add_torrent (add_torrent_params const& params, error_code& ec);
│ │ │ void async_add_torrent (add_torrent_params&& params);
│ │ │ + void async_add_torrent (add_torrent_params const& params);
│ │ │ torrent_handle add_torrent (add_torrent_params const& params);
│ │ │ + torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
│ │ │ torrent_handle add_torrent (add_torrent_params&& params);
│ │ │ - torrent_handle add_torrent (add_torrent_params const& params, error_code& ec);
│ │ │ - void pause ();
│ │ │ bool is_paused () const;
│ │ │ void resume ();
│ │ │ + void pause ();
│ │ │ bool is_dht_running () const;
│ │ │ void set_dht_storage (dht::dht_storage_constructor_type sc);
│ │ │ void add_dht_node (std::pair<std::string, int> const& node);
│ │ │ void dht_get_item (sha1_hash const& target);
│ │ │ void dht_get_item (std::array<char, 32> key
│ │ │ , std::string salt = std::string());
│ │ │ sha1_hash dht_put_item (entry data);
│ │ │ @@ -355,40 +355,40 @@
│ │ │ , 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_live_nodes (sha1_hash const& nid);
│ │ │ void dht_sample_infohashes (udp::endpoint const& ep, sha1_hash const& target);
│ │ │ void dht_direct_request (udp::endpoint const& ep, entry const& e, client_data_t userdata = {});
│ │ │ - void add_extension (std::shared_ptr<plugin> ext);
│ │ │ void add_extension (std::function<std::shared_ptr<torrent_plugin>(
│ │ │ torrent_handle const&, client_data_t)> ext);
│ │ │ - ip_filter get_ip_filter () const;
│ │ │ + void add_extension (std::shared_ptr<plugin> ext);
│ │ │ void set_ip_filter (ip_filter f);
│ │ │ + ip_filter get_ip_filter () const;
│ │ │ void set_port_filter (port_filter const& f);
│ │ │ unsigned short ssl_listen_port () const;
│ │ │ bool is_listening () const;
│ │ │ unsigned short listen_port () const;
│ │ │ ip_filter get_peer_class_filter () const;
│ │ │ void set_peer_class_filter (ip_filter const& f);
│ │ │ void set_peer_class_type_filter (peer_class_type_filter const& f);
│ │ │ peer_class_type_filter get_peer_class_type_filter () const;
│ │ │ peer_class_t create_peer_class (char const* name);
│ │ │ void delete_peer_class (peer_class_t cid);
│ │ │ - void set_peer_class (peer_class_t cid, peer_class_info const& pci);
│ │ │ peer_class_info get_peer_class (peer_class_t cid) const;
│ │ │ + void set_peer_class (peer_class_t cid, peer_class_info const& pci);
│ │ │ void remove_torrent (const torrent_handle&, remove_flags_t = {});
│ │ │ settings_pack get_settings () const;
│ │ │ void apply_settings (settings_pack&&);
│ │ │ void apply_settings (settings_pack const&);
│ │ │ - alert* wait_for_alert (time_duration max_wait);
│ │ │ void pop_alerts (std::vector<alert*>* alerts);
│ │ │ + alert* wait_for_alert (time_duration max_wait);
│ │ │ void set_alert_notify (std::function<void()> const& fun);
│ │ │ - void delete_port_mapping (port_mapping_t handle);
│ │ │ std::vector<port_mapping_t> add_port_mapping (portmap_protocol t, int external_port, int local_port);
│ │ │ + void delete_port_mapping (port_mapping_t handle);
│ │ │ void reopen_network_sockets (reopen_network_flags_t options = reopen_map_ports);
│ │ │ std::shared_ptr<aux::session_impl> native_handle () const;
│ │ │
│ │ │ static constexpr save_state_flags_t save_settings = 0_bit;
│ │ │ static constexpr save_state_flags_t save_dht_state = 2_bit;
│ │ │ static constexpr save_state_flags_t save_extension_state = 11_bit;
│ │ │ static constexpr save_state_flags_t save_ip_filter = 12_bit;
│ │ │ @@ -425,19 +425,19 @@
│ │ │ the flags parameter can be used to only save certain parts of the
│ │ │ session state
│ │ │
│ │ │ [report issue]
│ │ │
│ │ │
get_torrent_status() refresh_torrent_status()
│ │ │
│ │ │ +void refresh_torrent_status (std::vector<torrent_status>* ret
│ │ │ + , status_flags_t flags = {}) const;
│ │ │ std::vector<torrent_status> get_torrent_status (
│ │ │ std::function<bool(torrent_status const&)> const& pred
│ │ │ , status_flags_t flags = {}) const;
│ │ │ -void refresh_torrent_status (std::vector<torrent_status>* ret
│ │ │ - , status_flags_t flags = {}) const;
│ │ │
│ │ │
│ │ │
Note
│ │ │
these calls are potentially expensive and won't scale well with
│ │ │ lots of torrents. If you're concerned about performance, consider
│ │ │ using post_torrent_updates() instead.
│ │ │
│ │ │ @@ -501,47 +501,47 @@
│ │ │ void
post_dht_stats ();
│ │ │
│ │ │
This will cause a dht_stats_alert to be posted.
│ │ │
[report issue]
│ │ │
│ │ │
set_dht_state()
│ │ │
│ │ │ -void set_dht_state (dht::dht_state&& st);
│ │ │ void set_dht_state (dht::dht_state const& st);
│ │ │ +void set_dht_state (dht::dht_state&& st);
│ │ │
│ │ │
set the DHT state for the session. This will be taken into account the
│ │ │ next time the DHT is started, as if it had been passed in via the
│ │ │ session_params on startup.
│ │ │ -
│ │ │ -
[report issue]
│ │ │ -
│ │ │ -
find_torrent() get_torrents()
│ │ │ +
│ │ │ +
[report issue]
│ │ │ +
│ │ │ +
get_torrents() find_torrent()
│ │ │
│ │ │ -std::vector<torrent_handle> get_torrents () const;
│ │ │ torrent_handle find_torrent (sha1_hash const& info_hash) const;
│ │ │ +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]
│ │ │
│ │ │
async_add_torrent() add_torrent()
│ │ │
│ │ │ -torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
│ │ │ -void async_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&& params);
│ │ │ +void async_add_torrent (add_torrent_params const& params);
│ │ │ torrent_handle add_torrent (add_torrent_params const& params);
│ │ │ +torrent_handle add_torrent (add_torrent_params&& params, error_code& ec);
│ │ │ torrent_handle add_torrent (add_torrent_params&& params);
│ │ │ -torrent_handle add_torrent (add_torrent_params const& params, error_code& ec);
│ │ │
│ │ │
You add torrents through the add_torrent() function where you give an
│ │ │ object with all the parameters. The add_torrent() overloads will block
│ │ │ until the torrent has been added (or failed to be added) and returns
│ │ │ an error code and a torrent_handle. In order to add torrents more
│ │ │ efficiently, consider using async_add_torrent() which returns
│ │ │ immediately, without waiting for the torrent to add. Notification of
│ │ │ @@ -572,17 +572,17 @@
│ │ │ compatible with v1). For more details, see BitTorrent v2 torrents.
│ │ │
│ │ │
│ │ │
[report issue]
│ │ │
│ │ │
pause() resume() is_paused()
│ │ │
│ │ │ -void pause ();
│ │ │ bool is_paused () const;
│ │ │ void resume ();
│ │ │ +void pause ();
│ │ │
│ │ │
Pausing the session has the same effect as pausing every torrent in
│ │ │ it, except that torrents will not be resumed by the auto-manage
│ │ │ mechanism. Resuming will restore the torrents to their previous paused
│ │ │ state. i.e. the session pause state is separate from the torrent pause
│ │ │ state. A torrent is inactive if it is paused or if the session is
│ │ │ paused.
│ │ │ @@ -749,17 +749,17 @@
│ │ │ with the response (if any) and the userdata pointer passed in here.
│ │ │ Since this
alert is a response to an explicit call, it will always be
│ │ │ posted, regardless of the
alert mask.
│ │ │
[report issue]
│ │ │
│ │ │
add_extension()
│ │ │
│ │ │ -void add_extension (std::shared_ptr<plugin> ext);
│ │ │ void add_extension (std::function<std::shared_ptr<torrent_plugin>(
│ │ │ torrent_handle const&, client_data_t)> ext);
│ │ │ +void add_extension (std::shared_ptr<plugin> ext);
│ │ │
│ │ │
This function adds an extension to this session. The argument is a
│ │ │ function object that is called with a torrent_handle and which should
│ │ │ return a std::shared_ptr<torrent_plugin>. To write custom
│ │ │ plugins, see libtorrent plugins. For the typical bittorrent client
│ │ │ all of these extensions should be added. The main plugins implemented
│ │ │ in libtorrent are:
│ │ │ @@ -792,16 +792,16 @@
│ │ │
ses.add_extension(<::create_smart_ban_plugin);
│ │ │
│ │ │
│ │ │
[report issue]
│ │ │
│ │ │
set_ip_filter() get_ip_filter()
│ │ │
│ │ │ -ip_filter get_ip_filter () const;
│ │ │ void set_ip_filter (ip_filter f);
│ │ │ +ip_filter get_ip_filter () const;
│ │ │
│ │ │
Sets a filter that will be used to reject and accept incoming as well
│ │ │ as outgoing connections based on their originating ip address. The
│ │ │ default filter will allow connections to any ip address. To build a
│ │ │ set of rules for which addresses are accepted and not, see ip_filter.
│ │ │
Each time a peer is blocked because of the IP filter, a
│ │ │ peer_blocked_alert is generated. get_ip_filter() Returns the
│ │ │ @@ -812,34 +812,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() ssl_listen_port() listen_port()
│ │ │ +
│ │ │ +
[report issue]
│ │ │ +
│ │ │ +
ssl_listen_port() is_listening() listen_port()
│ │ │
│ │ │ unsigned short ssl_listen_port () const;
│ │ │ bool is_listening () const;
│ │ │ unsigned short listen_port () const;
│ │ │
│ │ │
is_listening() will tell you whether or not the session has
│ │ │ successfully opened a listening port. If it hasn't, this function will
│ │ │ return false, and then you can set a new
│ │ │ settings_pack::listen_interfaces to try another interface and port to
│ │ │ bind to.
│ │ │
listen_port() returns the port we ended up listening on.
│ │ │ -
│ │ │ -
[report issue]
│ │ │ -
│ │ │ -
set_peer_class_filter() get_peer_class_filter()
│ │ │ +
│ │ │ +
[report issue]
│ │ │ +
│ │ │ +
get_peer_class_filter() set_peer_class_filter()
│ │ │
│ │ │ ip_filter get_peer_class_filter () const;
│ │ │ void set_peer_class_filter (ip_filter const& f);
│ │ │
│ │ │
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.
│ │ │ @@ -862,18 +862,18 @@
│ │ │ 32 bits in the IP range mapping. Only the set bits matter; no peer
│ │ │ class will be removed from a peer as a result of this call, peer
│ │ │ classes are only added.
│ │ │
The peer_class argument cannot be greater than 31. The bitmasks
│ │ │ representing peer classes in the peer_class_filter are 32 bits.
│ │ │
The get_peer_class_filter() function returns the current filter.
│ │ │
For more information, see peer classes.
│ │ │ -
│ │ │ -
[report issue]
│ │ │ -
│ │ │ -
get_peer_class_type_filter() set_peer_class_type_filter()
│ │ │ +
│ │ │ +
[report issue]
│ │ │ +
│ │ │ +
set_peer_class_type_filter() get_peer_class_type_filter()
│ │ │
│ │ │ void set_peer_class_type_filter (peer_class_type_filter const& f);
│ │ │ peer_class_type_filter get_peer_class_type_filter () const;
│ │ │
│ │ │
Sets and gets the peer class type filter. This is controls automatic
│ │ │ peer class assignments to peers based on what kind of socket it is.
│ │ │
It does not only support assigning peer classes, it also supports
│ │ │ @@ -915,21 +915,21 @@
│ │ │ remove the peer class if it's still assigned to torrents or peers. It
│ │ │ will however remove it once the last peer and torrent drops their
│ │ │ references to it.
│ │ │
There is no need to call this function for custom peer classes. All
│ │ │ peer classes will be properly destructed when the session object
│ │ │ destructs.
│ │ │
For more information on peer classes, see peer classes.
│ │ │ -
│ │ │ -
[report issue]
│ │ │ -
│ │ │ -
get_peer_class() set_peer_class()
│ │ │ +
│ │ │ +
[report issue]
│ │ │ +
│ │ │ +
set_peer_class() get_peer_class()
│ │ │
│ │ │ -void set_peer_class (peer_class_t cid, peer_class_info const& pci);
│ │ │ peer_class_info get_peer_class (peer_class_t cid) const;
│ │ │ +void set_peer_class (peer_class_t cid, peer_class_info const& pci);
│ │ │
│ │ │
These functions queries information from a peer class and updates the
│ │ │ configuration of a peer class, respectively.
│ │ │
cid must refer to an existing peer class. If it does not, the
│ │ │ return value of get_peer_class() is undefined.
│ │ │
set_peer_class() sets all the information in the
│ │ │ peer_class_info object in the specified peer class. There is no
│ │ │ @@ -969,34 +969,34 @@
│ │ │ handle.save_resume_data();
│ │ │
Note that when a queued or downloading torrent is removed, its position
│ │ │ in the download queue is vacated and every subsequent torrent in the
│ │ │ queue has their queue positions updated. This can potentially cause a
│ │ │ large state_update to be posted. When removing all torrents, it is
│ │ │ advised to remove them from the back of the queue, to minimize the
│ │ │ shifting.
│ │ │ -
│ │ │ -
[report issue]
│ │ │ -
│ │ │ -
apply_settings() get_settings()
│ │ │ +
│ │ │ +
[report issue]
│ │ │ +
│ │ │ +
get_settings() apply_settings()
│ │ │
│ │ │ settings_pack get_settings () const;
│ │ │ void apply_settings (settings_pack&&);
│ │ │ 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]
│ │ │ -
│ │ │ -
set_alert_notify() wait_for_alert() pop_alerts()
│ │ │ +
│ │ │ +
[report issue]
│ │ │ +
│ │ │ +
wait_for_alert() set_alert_notify() pop_alerts()
│ │ │
│ │ │ -alert* wait_for_alert (time_duration max_wait);
│ │ │ void pop_alerts (std::vector<alert*>* alerts);
│ │ │ +alert* wait_for_alert (time_duration max_wait);
│ │ │ void set_alert_notify (std::function<void()> const& fun);
│ │ │
│ │ │
Alerts is the main mechanism for libtorrent to report errors and
│ │ │ events. pop_alerts fills in the vector passed to it with pointers
│ │ │ to new alerts. The session still owns these alerts and they will stay
│ │ │ valid until the next time pop_alerts is called. You may not delete
│ │ │ the alert objects.
│ │ │ @@ -1048,16 +1048,16 @@
│ │ │
alert::type() but can also be queries from a concrete type via
│ │ │
T::alert_type, as a static constant.
│ │ │
│ │ │
[report issue]
│ │ │
│ │ │
delete_port_mapping() add_port_mapping()
│ │ │
│ │ │ -void delete_port_mapping (port_mapping_t handle);
│ │ │ std::vector<port_mapping_t> add_port_mapping (portmap_protocol t, int external_port, int local_port);
│ │ │ +void delete_port_mapping (port_mapping_t handle);
│ │ │
│ │ │
add_port_mapping adds one or more port forwards on UPnP and/or NAT-PMP,
│ │ │ whichever is enabled. A mapping is created for each listen socket
│ │ │ in the session. The return values are all handles referring to the
│ │ │ port mappings that were just created. Pass them to delete_port_mapping()
│ │ │ to remove them.
│ │ │
[report issue]
│ │ │ ├── html2text {}
│ │ │ │ @@ -17,15 +17,15 @@
│ │ │ │ o _i_s___v_a_l_i_d_(_)
│ │ │ │ o _s_e_s_s_i_o_n___s_t_a_t_e_(_)
│ │ │ │ o _g_e_t___t_o_r_r_e_n_t___s_t_a_t_u_s_(_)_ _r_e_f_r_e_s_h___t_o_r_r_e_n_t___s_t_a_t_u_s_(_)
│ │ │ │ o _p_o_s_t___t_o_r_r_e_n_t___u_p_d_a_t_e_s_(_)
│ │ │ │ o _p_o_s_t___s_e_s_s_i_o_n___s_t_a_t_s_(_)
│ │ │ │ o _p_o_s_t___d_h_t___s_t_a_t_s_(_)
│ │ │ │ o _s_e_t___d_h_t___s_t_a_t_e_(_)
│ │ │ │ - o _f_i_n_d___t_o_r_r_e_n_t_(_)_ _g_e_t___t_o_r_r_e_n_t_s_(_)
│ │ │ │ + o _g_e_t___t_o_r_r_e_n_t_s_(_)_ _f_i_n_d___t_o_r_r_e_n_t_(_)
│ │ │ │ o _a_s_y_n_c___a_d_d___t_o_r_r_e_n_t_(_)_ _a_d_d___t_o_r_r_e_n_t_(_)
│ │ │ │ o _p_a_u_s_e_(_)_ _r_e_s_u_m_e_(_)_ _i_s___p_a_u_s_e_d_(_)
│ │ │ │ o _i_s___d_h_t___r_u_n_n_i_n_g_(_)
│ │ │ │ o _s_e_t___d_h_t___s_t_o_r_a_g_e_(_)
│ │ │ │ o _a_d_d___d_h_t___n_o_d_e_(_)
│ │ │ │ o _d_h_t___g_e_t___i_t_e_m_(_)
│ │ │ │ o _d_h_t___g_e_t___i_t_e_m_(_)
│ │ │ │ @@ -34,37 +34,37 @@
│ │ │ │ o _d_h_t___g_e_t___p_e_e_r_s_(_)_ _d_h_t___a_n_n_o_u_n_c_e_(_)
│ │ │ │ o _d_h_t___l_i_v_e___n_o_d_e_s_(_)
│ │ │ │ o _d_h_t___s_a_m_p_l_e___i_n_f_o_h_a_s_h_e_s_(_)
│ │ │ │ o _d_h_t___d_i_r_e_c_t___r_e_q_u_e_s_t_(_)
│ │ │ │ o _a_d_d___e_x_t_e_n_s_i_o_n_(_)
│ │ │ │ o _s_e_t___i_p___f_i_l_t_e_r_(_)_ _g_e_t___i_p___f_i_l_t_e_r_(_)
│ │ │ │ o _s_e_t___p_o_r_t___f_i_l_t_e_r_(_)
│ │ │ │ - o _i_s___l_i_s_t_e_n_i_n_g_(_)_ _s_s_l___l_i_s_t_e_n___p_o_r_t_(_)_ _l_i_s_t_e_n___p_o_r_t_(_)
│ │ │ │ - o _s_e_t___p_e_e_r___c_l_a_s_s___f_i_l_t_e_r_(_)_ _g_e_t___p_e_e_r___c_l_a_s_s___f_i_l_t_e_r_(_)
│ │ │ │ - o _g_e_t___p_e_e_r___c_l_a_s_s___t_y_p_e___f_i_l_t_e_r_(_)_ _s_e_t___p_e_e_r___c_l_a_s_s___t_y_p_e___f_i_l_t_e_r_(_)
│ │ │ │ + o _s_s_l___l_i_s_t_e_n___p_o_r_t_(_)_ _i_s___l_i_s_t_e_n_i_n_g_(_)_ _l_i_s_t_e_n___p_o_r_t_(_)
│ │ │ │ + o _g_e_t___p_e_e_r___c_l_a_s_s___f_i_l_t_e_r_(_)_ _s_e_t___p_e_e_r___c_l_a_s_s___f_i_l_t_e_r_(_)
│ │ │ │ + o _s_e_t___p_e_e_r___c_l_a_s_s___t_y_p_e___f_i_l_t_e_r_(_)_ _g_e_t___p_e_e_r___c_l_a_s_s___t_y_p_e___f_i_l_t_e_r_(_)
│ │ │ │ o _c_r_e_a_t_e___p_e_e_r___c_l_a_s_s_(_)
│ │ │ │ o _d_e_l_e_t_e___p_e_e_r___c_l_a_s_s_(_)
│ │ │ │ - o _g_e_t___p_e_e_r___c_l_a_s_s_(_)_ _s_e_t___p_e_e_r___c_l_a_s_s_(_)
│ │ │ │ + o _s_e_t___p_e_e_r___c_l_a_s_s_(_)_ _g_e_t___p_e_e_r___c_l_a_s_s_(_)
│ │ │ │ o _r_e_m_o_v_e___t_o_r_r_e_n_t_(_)
│ │ │ │ - o _a_p_p_l_y___s_e_t_t_i_n_g_s_(_)_ _g_e_t___s_e_t_t_i_n_g_s_(_)
│ │ │ │ - o _s_e_t___a_l_e_r_t___n_o_t_i_f_y_(_)_ _w_a_i_t___f_o_r___a_l_e_r_t_(_)_ _p_o_p___a_l_e_r_t_s_(_)
│ │ │ │ + o _g_e_t___s_e_t_t_i_n_g_s_(_)_ _a_p_p_l_y___s_e_t_t_i_n_g_s_(_)
│ │ │ │ + o _w_a_i_t___f_o_r___a_l_e_r_t_(_)_ _s_e_t___a_l_e_r_t___n_o_t_i_f_y_(_)_ _p_o_p___a_l_e_r_t_s_(_)
│ │ │ │ o _d_e_l_e_t_e___p_o_r_t___m_a_p_p_i_n_g_(_)_ _a_d_d___p_o_r_t___m_a_p_p_i_n_g_(_)
│ │ │ │ o _r_e_o_p_e_n___n_e_t_w_o_r_k___s_o_c_k_e_t_s_(_)
│ │ │ │ o _n_a_t_i_v_e___h_a_n_d_l_e_(_)
│ │ │ │ * _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s___b_u_f_(_)_ _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s_(_)_ _r_e_a_d___s_e_s_s_i_o_n___p_a_r_a_m_s_(_)
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ************ sseessssiioonn__ppaarraammss ************
│ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n___p_a_r_a_m_s_._h_p_p"
│ │ │ │ The _s_e_s_s_i_o_n___p_a_r_a_m_s is a parameters pack for configuring the _s_e_s_s_i_o_n before it's
│ │ │ │ started.
│ │ │ │ struct session_params
│ │ │ │ {
│ │ │ │ + sseessssiioonn__ppaarraammss (settings_pack&& sp);
│ │ │ │ sseessssiioonn__ppaarraammss ();
│ │ │ │ sseessssiioonn__ppaarraammss (settings_pack const& sp);
│ │ │ │ - sseessssiioonn__ppaarraammss (settings_pack&& sp);
│ │ │ │ sseessssiioonn__ppaarraammss (settings_pack&& sp
│ │ │ │ , std::vector
> exts);
│ │ │ │ sseessssiioonn__ppaarraammss (settings_pack const& sp
│ │ │ │ , std::vector> exts);
│ │ │ │
│ │ │ │ settings_pack settings;
│ │ │ │ std::vector> extensions;
│ │ │ │ @@ -72,17 +72,17 @@
│ │ │ │ dht::dht_storage_constructor_type dht_storage_constructor;
│ │ │ │ disk_io_constructor_type disk_io_constructor;
│ │ │ │ std::map ext_state;
│ │ │ │ libtorrent::ip_filter ip_filter;
│ │ │ │ };
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** sseessssiioonn__ppaarraammss(()) **********
│ │ │ │ +sseessssiioonn__ppaarraammss (settings_pack&& sp);
│ │ │ │ sseessssiioonn__ppaarraammss ();
│ │ │ │ sseessssiioonn__ppaarraammss (settings_pack const& sp);
│ │ │ │ -sseessssiioonn__ppaarraammss (settings_pack&& sp);
│ │ │ │ This constructor can be used to start with the default plugins (ut_metadata,
│ │ │ │ ut_pex and smart_ban). Pass a _s_e_t_t_i_n_g_s___p_a_c_k to set the initial settings when
│ │ │ │ the _s_e_s_s_i_o_n starts.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** sseessssiioonn__ppaarraammss(()) **********
│ │ │ │ sseessssiioonn__ppaarraammss (settings_pack&& sp
│ │ │ │ , std::vector> exts);
│ │ │ │ @@ -122,29 +122,29 @@
│ │ │ │ _s_e_s_s_i_o_n destruction is explicitly initiated, this holder is used to synchronize
│ │ │ │ the completion of the shutdown. The lifetime of this object may outlive
│ │ │ │ _s_e_s_s_i_o_n, causing the _s_e_s_s_i_o_n destructor to not block. The _s_e_s_s_i_o_n___p_r_o_x_y
│ │ │ │ destructor will block however, until the underlying _s_e_s_s_i_o_n is done shutting
│ │ │ │ down.
│ │ │ │ struct session_proxy
│ │ │ │ {
│ │ │ │ - sseessssiioonn__pprrooxxyy (session_proxy const&);
│ │ │ │ - session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept;
│ │ │ │ - session_proxy& ooppeerraattoorr== (session_proxy const&) &;
│ │ │ │ - sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept;
│ │ │ │ ~~sseessssiioonn__pprrooxxyy ();
│ │ │ │ sseessssiioonn__pprrooxxyy ();
│ │ │ │ + session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept;
│ │ │ │ + sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept;
│ │ │ │ + sseessssiioonn__pprrooxxyy (session_proxy const&);
│ │ │ │ + session_proxy& ooppeerraattoorr== (session_proxy const&) &;
│ │ │ │ };
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** ~~sseessssiioonn__pprrooxxyy(()) ooppeerraattoorr==(()) sseessssiioonn__pprrooxxyy(()) **********
│ │ │ │ -sseessssiioonn__pprrooxxyy (session_proxy const&);
│ │ │ │ -session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept;
│ │ │ │ -session_proxy& ooppeerraattoorr== (session_proxy const&) &;
│ │ │ │ -sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept;
│ │ │ │ ~~sseessssiioonn__pprrooxxyy ();
│ │ │ │ sseessssiioonn__pprrooxxyy ();
│ │ │ │ +session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept;
│ │ │ │ +sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept;
│ │ │ │ +sseessssiioonn__pprrooxxyy (session_proxy const&);
│ │ │ │ +session_proxy& ooppeerraattoorr== (session_proxy const&) &;
│ │ │ │ default constructor, does not refer to any _s_e_s_s_i_o_n implementation object.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ************ sseessssiioonn ************
│ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n_._h_p_p"
│ │ │ │ The _s_e_s_s_i_o_n holds all state that spans multiple torrents. Among other things it
│ │ │ │ runs the network loop and manages all torrents. Once it's created, the _s_e_s_s_i_o_n
│ │ │ │ object will spawn the main thread that will do all the work. The main thread
│ │ │ │ @@ -152,47 +152,47 @@
│ │ │ │ You have some control over _s_e_s_s_i_o_n configuration through the session_handle::
│ │ │ │ apply_settings() member function. To change one or more configuration options,
│ │ │ │ create a _s_e_t_t_i_n_g_s___p_a_c_k. object and fill it with the settings to be set and pass
│ │ │ │ it in to session::apply_settings().
│ │ │ │ see _a_p_p_l_y___s_e_t_t_i_n_g_s_(_).
│ │ │ │ struct session : session_handle
│ │ │ │ {
│ │ │ │ - sseessssiioonn (session_params const& params, session_flags_t flags);
│ │ │ │ sseessssiioonn (session_params&& params, session_flags_t flags);
│ │ │ │ + sseessssiioonn (session_params const& params, session_flags_t flags);
│ │ │ │ explicit sseessssiioonn (session_params&& params);
│ │ │ │ - sseessssiioonn ();
│ │ │ │ explicit sseessssiioonn (session_params const& params);
│ │ │ │ + sseessssiioonn ();
│ │ │ │ sseessssiioonn (session_params&& params, io_context& ios);
│ │ │ │ - sseessssiioonn (session_params const& params, io_context& ios, session_flags_t);
│ │ │ │ sseessssiioonn (session_params&& params, io_context& ios, session_flags_t);
│ │ │ │ sseessssiioonn (session_params const& params, io_context& ios);
│ │ │ │ + sseessssiioonn (session_params const& params, io_context& ios, session_flags_t);
│ │ │ │ ~~sseessssiioonn ();
│ │ │ │ session_proxy aabboorrtt ();
│ │ │ │ };
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** sseessssiioonn(()) **********
│ │ │ │ -sseessssiioonn (session_params const& params, session_flags_t flags);
│ │ │ │ sseessssiioonn (session_params&& params, session_flags_t flags);
│ │ │ │ +sseessssiioonn (session_params const& params, session_flags_t flags);
│ │ │ │ explicit sseessssiioonn (session_params&& params);
│ │ │ │ -sseessssiioonn ();
│ │ │ │ explicit sseessssiioonn (session_params const& params);
│ │ │ │ +sseessssiioonn ();
│ │ │ │ Constructs the _s_e_s_s_i_o_n objects which acts as the container of torrents. In
│ │ │ │ order to avoid a race condition between starting the _s_e_s_s_i_o_n and configuring
│ │ │ │ it, you can pass in a _s_e_s_s_i_o_n___p_a_r_a_m_s object. Its settings will take effect
│ │ │ │ before the _s_e_s_s_i_o_n starts up.
│ │ │ │ The overloads taking flags can be used to start a _s_e_s_s_i_o_n in paused mode (by
│ │ │ │ passing in session::paused). Note that add_default_plugins do not have an
│ │ │ │ affect on constructors that take a _s_e_s_s_i_o_n___p_a_r_a_m_s object. It already contains
│ │ │ │ the plugins to use.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** sseessssiioonn(()) **********
│ │ │ │ sseessssiioonn (session_params&& params, io_context& ios);
│ │ │ │ -sseessssiioonn (session_params const& params, io_context& ios, session_flags_t);
│ │ │ │ sseessssiioonn (session_params&& params, io_context& ios, session_flags_t);
│ │ │ │ sseessssiioonn (session_params const& params, io_context& ios);
│ │ │ │ +sseessssiioonn (session_params const& params, io_context& ios, session_flags_t);
│ │ │ │ Overload of the constructor that takes an external io_context to run the
│ │ │ │ _s_e_s_s_i_o_n object on. This is primarily useful for tests that may want to run
│ │ │ │ multiple sessions on a single io_context, or low resource systems where
│ │ │ │ additional threads are expensive and sharing an io_context with other events is
│ │ │ │ fine.
│ │ │ │ Warning
│ │ │ │ The _s_e_s_s_i_o_n object does not cleanly terminate with an external io_context. The
│ │ │ │ @@ -232,36 +232,36 @@
│ │ │ │ operation on it will throw a system_error exception, with error code
│ │ │ │ invalid_session_handle.
│ │ │ │ struct session_handle
│ │ │ │ {
│ │ │ │ bool iiss__vvaalliidd () const;
│ │ │ │ session_params sseessssiioonn__ssttaattee (save_state_flags_t flags =
│ │ │ │ save_state_flags_t::all()) const;
│ │ │ │ + void rreeffrreesshh__ttoorrrreenntt__ssttaattuuss (std::vector* ret
│ │ │ │ + , status_flags_t flags = {}) const;
│ │ │ │ std::vector ggeett__ttoorrrreenntt__ssttaattuuss (
│ │ │ │ std::function const& pred
│ │ │ │ , status_flags_t flags = {}) const;
│ │ │ │ - void rreeffrreesshh__ttoorrrreenntt__ssttaattuuss (std::vector* ret
│ │ │ │ - , status_flags_t flags = {}) const;
│ │ │ │ void ppoosstt__ttoorrrreenntt__uuppddaatteess (status_flags_t flags = status_flags_t::all());
│ │ │ │ void ppoosstt__sseessssiioonn__ssttaattss ();
│ │ │ │ void ppoosstt__ddhhtt__ssttaattss ();
│ │ │ │ - void sseett__ddhhtt__ssttaattee (dht::dht_state&& st);
│ │ │ │ void sseett__ddhhtt__ssttaattee (dht::dht_state const& st);
│ │ │ │ - std::vector ggeett__ttoorrrreennttss () const;
│ │ │ │ + void sseett__ddhhtt__ssttaattee (dht::dht_state&& st);
│ │ │ │ torrent_handle ffiinndd__ttoorrrreenntt (sha1_hash const& info_hash) const;
│ │ │ │ - torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec);
│ │ │ │ - void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ + std::vector ggeett__ttoorrrreennttss () const;
│ │ │ │ + torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code&
│ │ │ │ +ec);
│ │ │ │ void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params);
│ │ │ │ + void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ + torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec);
│ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params);
│ │ │ │ - torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code&
│ │ │ │ -ec);
│ │ │ │ - void ppaauussee ();
│ │ │ │ bool iiss__ppaauusseedd () const;
│ │ │ │ void rreessuummee ();
│ │ │ │ + void ppaauussee ();
│ │ │ │ bool iiss__ddhhtt__rruunnnniinngg () const;
│ │ │ │ void sseett__ddhhtt__ssttoorraaggee (dht::dht_storage_constructor_type sc);
│ │ │ │ void aadddd__ddhhtt__nnooddee (std::pair const& node);
│ │ │ │ void ddhhtt__ggeett__iitteemm (sha1_hash const& target);
│ │ │ │ void ddhhtt__ggeett__iitteemm (std::array key
│ │ │ │ , std::string salt = std::string());
│ │ │ │ sha1_hash ddhhtt__ppuutt__iitteemm (entry data);
│ │ │ │ @@ -273,41 +273,41 @@
│ │ │ │ void ddhhtt__aannnnoouunnccee (sha1_hash const& info_hash, int port = 0, dht::
│ │ │ │ announce_flags_t flags = {});
│ │ │ │ void ddhhtt__lliivvee__nnooddeess (sha1_hash const& nid);
│ │ │ │ void ddhhtt__ssaammppllee__iinnffoohhaasshheess (udp::endpoint const& ep, sha1_hash const&
│ │ │ │ target);
│ │ │ │ void ddhhtt__ddiirreecctt__rreeqquueesstt (udp::endpoint const& ep, entry const& e,
│ │ │ │ client_data_t userdata = {});
│ │ │ │ - void aadddd__eexxtteennssiioonn (std::shared_ptr ext);
│ │ │ │ void aadddd__eexxtteennssiioonn (std::function(
│ │ │ │ torrent_handle const&, client_data_t)> ext);
│ │ │ │ - ip_filter ggeett__iipp__ffiilltteerr () const;
│ │ │ │ + void aadddd__eexxtteennssiioonn (std::shared_ptr ext);
│ │ │ │ void sseett__iipp__ffiilltteerr (ip_filter f);
│ │ │ │ + ip_filter ggeett__iipp__ffiilltteerr () const;
│ │ │ │ void sseett__ppoorrtt__ffiilltteerr (port_filter const& f);
│ │ │ │ unsigned short ssssll__lliisstteenn__ppoorrtt () const;
│ │ │ │ bool iiss__lliisstteenniinngg () const;
│ │ │ │ unsigned short lliisstteenn__ppoorrtt () const;
│ │ │ │ ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const;
│ │ │ │ void sseett__ppeeeerr__ccllaassss__ffiilltteerr (ip_filter const& f);
│ │ │ │ void sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr (peer_class_type_filter const& f);
│ │ │ │ peer_class_type_filter ggeett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr () const;
│ │ │ │ peer_class_t ccrreeaattee__ppeeeerr__ccllaassss (char const* name);
│ │ │ │ void ddeelleettee__ppeeeerr__ccllaassss (peer_class_t cid);
│ │ │ │ - void sseett__ppeeeerr__ccllaassss (peer_class_t cid, peer_class_info const& pci);
│ │ │ │ peer_class_info ggeett__ppeeeerr__ccllaassss (peer_class_t cid) const;
│ │ │ │ + void sseett__ppeeeerr__ccllaassss (peer_class_t cid, peer_class_info const& pci);
│ │ │ │ void rreemmoovvee__ttoorrrreenntt (const torrent_handle&, remove_flags_t = {});
│ │ │ │ settings_pack ggeett__sseettttiinnggss () const;
│ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack&&);
│ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack const&);
│ │ │ │ - alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait);
│ │ │ │ void ppoopp__aalleerrttss (std::vector* alerts);
│ │ │ │ + alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait);
│ │ │ │ void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun);
│ │ │ │ - void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle);
│ │ │ │ std::vector aadddd__ppoorrtt__mmaappppiinngg (portmap_protocol t, int
│ │ │ │ external_port, int local_port);
│ │ │ │ + void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle);
│ │ │ │ void rreeooppeenn__nneettwwoorrkk__ssoocckkeettss (reopen_network_flags_t options =
│ │ │ │ reopen_map_ports);
│ │ │ │ std::shared_ptr nnaattiivvee__hhaannddllee () const;
│ │ │ │
│ │ │ │ static constexpr save_state_flags_t ssaavvee__sseettttiinnggss = 0_bit;
│ │ │ │ static constexpr save_state_flags_t ssaavvee__ddhhtt__ssttaattee = 2_bit;
│ │ │ │ static constexpr save_state_flags_t ssaavvee__eexxtteennssiioonn__ssttaattee = 11_bit;
│ │ │ │ @@ -334,19 +334,19 @@
│ │ │ │ returns the current _s_e_s_s_i_o_n state. This can be passed to _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s_(_)
│ │ │ │ to save the state to disk and restored using _r_e_a_d___s_e_s_s_i_o_n___p_a_r_a_m_s_(_) when
│ │ │ │ constructing a new _s_e_s_s_i_o_n. The kind of state that's included is all settings,
│ │ │ │ the DHT routing table, possibly plugin-specific state. the flags parameter can
│ │ │ │ be used to only save certain parts of the _s_e_s_s_i_o_n state
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** ggeett__ttoorrrreenntt__ssttaattuuss(()) rreeffrreesshh__ttoorrrreenntt__ssttaattuuss(()) **********
│ │ │ │ +void rreeffrreesshh__ttoorrrreenntt__ssttaattuuss (std::vector* ret
│ │ │ │ + , status_flags_t flags = {}) const;
│ │ │ │ std::vector ggeett__ttoorrrreenntt__ssttaattuuss (
│ │ │ │ std::function const& pred
│ │ │ │ , status_flags_t flags = {}) const;
│ │ │ │ -void rreeffrreesshh__ttoorrrreenntt__ssttaattuuss (std::vector* ret
│ │ │ │ - , status_flags_t flags = {}) const;
│ │ │ │ Note
│ │ │ │ these calls are potentially expensive and won't scale well with lots of
│ │ │ │ torrents. If you're concerned about performance, consider using
│ │ │ │ post_torrent_updates() instead.
│ │ │ │ get_torrent_status returns a vector of the _t_o_r_r_e_n_t___s_t_a_t_u_s for every torrent
│ │ │ │ which satisfies pred, which is a predicate function which determines if a
│ │ │ │ torrent should be included in the returned set or not. Returning true means it
│ │ │ │ @@ -391,37 +391,37 @@
│ │ │ │ For more information, see the _s_e_s_s_i_o_n_ _s_t_a_t_i_s_t_i_c_s section.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** ppoosstt__ddhhtt__ssttaattss(()) **********
│ │ │ │ void ppoosstt__ddhhtt__ssttaattss ();
│ │ │ │ This will cause a _d_h_t___s_t_a_t_s___a_l_e_r_t to be posted.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** sseett__ddhhtt__ssttaattee(()) **********
│ │ │ │ -void sseett__ddhhtt__ssttaattee (dht::dht_state&& st);
│ │ │ │ void sseett__ddhhtt__ssttaattee (dht::dht_state const& st);
│ │ │ │ +void sseett__ddhhtt__ssttaattee (dht::dht_state&& st);
│ │ │ │ set the DHT state for the _s_e_s_s_i_o_n. This will be taken into account the next
│ │ │ │ time the DHT is started, as if it had been passed in via the _s_e_s_s_i_o_n___p_a_r_a_m_s on
│ │ │ │ startup.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** ffiinndd__ttoorrrreenntt(()) ggeett__ttoorrrreennttss(()) **********
│ │ │ │ -std::vector ggeett__ttoorrrreennttss () const;
│ │ │ │ +********** ggeett__ttoorrrreennttss(()) ffiinndd__ttoorrrreenntt(()) **********
│ │ │ │ torrent_handle ffiinndd__ttoorrrreenntt (sha1_hash const& info_hash) const;
│ │ │ │ +std::vector ggeett__ttoorrrreennttss () const;
│ │ │ │ find_torrent() looks for a torrent with the given info-hash. In case there is
│ │ │ │ such a torrent in the _s_e_s_s_i_o_n, a _t_o_r_r_e_n_t___h_a_n_d_l_e to that torrent is returned. In
│ │ │ │ case the torrent cannot be found, an invalid _t_o_r_r_e_n_t___h_a_n_d_l_e is returned.
│ │ │ │ See torrent_handle::is_valid() to know if the torrent was found or not.
│ │ │ │ get_torrents() returns a vector of torrent_handles to all the torrents
│ │ │ │ currently in the _s_e_s_s_i_o_n.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** aassyynncc__aadddd__ttoorrrreenntt(()) aadddd__ttoorrrreenntt(()) **********
│ │ │ │ -torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec);
│ │ │ │ -void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ +torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& ec);
│ │ │ │ void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params);
│ │ │ │ +void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ +torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec);
│ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params);
│ │ │ │ -torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& ec);
│ │ │ │ You add torrents through the _a_d_d___t_o_r_r_e_n_t_(_) function where you give an object
│ │ │ │ with all the parameters. The _a_d_d___t_o_r_r_e_n_t_(_) overloads will block until the
│ │ │ │ torrent has been added (or failed to be added) and returns an error code and a
│ │ │ │ _t_o_r_r_e_n_t___h_a_n_d_l_e. In order to add torrents more efficiently, consider using
│ │ │ │ _a_s_y_n_c___a_d_d___t_o_r_r_e_n_t_(_) which returns immediately, without waiting for the torrent
│ │ │ │ to add. Notification of the torrent being added is sent as _a_d_d___t_o_r_r_e_n_t___a_l_e_r_t.
│ │ │ │ The save_path field in _a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s must be set to a valid path where the
│ │ │ │ @@ -443,17 +443,17 @@
│ │ │ │ link that will just download the metadata, but no payload, set the
│ │ │ │ torrent_flags::upload_mode flag.
│ │ │ │ Special consideration has to be taken when adding hybrid torrents (i.e.
│ │ │ │ torrents that are BitTorrent v2 torrents that are backwards compatible with
│ │ │ │ v1). For more details, see _B_i_t_T_o_r_r_e_n_t_ _v_2_ _t_o_r_r_e_n_t_s.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** ppaauussee(()) rreessuummee(()) iiss__ppaauusseedd(()) **********
│ │ │ │ -void ppaauussee ();
│ │ │ │ bool iiss__ppaauusseedd () const;
│ │ │ │ void rreessuummee ();
│ │ │ │ +void ppaauussee ();
│ │ │ │ Pausing the _s_e_s_s_i_o_n has the same effect as pausing every torrent in it, except
│ │ │ │ that torrents will not be resumed by the auto-manage mechanism. Resuming will
│ │ │ │ restore the torrents to their previous paused state. i.e. the _s_e_s_s_i_o_n pause
│ │ │ │ state is separate from the torrent pause state. A torrent is inactive if it is
│ │ │ │ paused or if the _s_e_s_s_i_o_n is paused.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** iiss__ddhhtt__rruunnnniinngg(()) **********
│ │ │ │ @@ -572,17 +572,17 @@
│ │ │ │ Send an arbitrary DHT request directly to the specified endpoint. This function
│ │ │ │ is intended for use by plugins. When a response is received or the request
│ │ │ │ times out, a _d_h_t___d_i_r_e_c_t___r_e_s_p_o_n_s_e___a_l_e_r_t will be posted with the response (if
│ │ │ │ any) and the userdata pointer passed in here. Since this _a_l_e_r_t is a response to
│ │ │ │ an explicit call, it will always be posted, regardless of the _a_l_e_r_t mask.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** aadddd__eexxtteennssiioonn(()) **********
│ │ │ │ -void aadddd__eexxtteennssiioonn (std::shared_ptr ext);
│ │ │ │ void aadddd__eexxtteennssiioonn (std::function(
│ │ │ │ torrent_handle const&, client_data_t)> ext);
│ │ │ │ +void aadddd__eexxtteennssiioonn (std::shared_ptr ext);
│ │ │ │ This function adds an extension to this _s_e_s_s_i_o_n. The argument is a function
│ │ │ │ object that is called with a torrent_handle and which should return a std::
│ │ │ │ shared_ptr. To write custom plugins, see _l_i_b_t_o_r_r_e_n_t_ _p_l_u_g_i_n_s.
│ │ │ │ For the typical bittorrent client all of these extensions should be added. The
│ │ │ │ main plugins implemented in libtorrent are:
│ │ │ │ uTorrent metadata
│ │ │ │ Allows peers to download the metadata (.torrent files) from the swarm
│ │ │ │ @@ -598,16 +598,16 @@
│ │ │ │ A _p_l_u_g_i_n that, with a small overhead, can ban peers that sends bad data
│ │ │ │ with very high accuracy. Should eliminate most problems on poisoned
│ │ │ │ torrents.
│ │ │ │ #include
│ │ │ │ ses.add_extension(<::create_smart_ban_plugin);
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** sseett__iipp__ffiilltteerr(()) ggeett__iipp__ffiilltteerr(()) **********
│ │ │ │ -ip_filter ggeett__iipp__ffiilltteerr () const;
│ │ │ │ void sseett__iipp__ffiilltteerr (ip_filter f);
│ │ │ │ +ip_filter ggeett__iipp__ffiilltteerr () const;
│ │ │ │ Sets a filter that will be used to reject and accept incoming as well as
│ │ │ │ outgoing connections based on their originating ip address. The default filter
│ │ │ │ will allow connections to any ip address. To build a set of rules for which
│ │ │ │ addresses are accepted and not, see _i_p___f_i_l_t_e_r.
│ │ │ │ Each time a peer is blocked because of the IP filter, a _p_e_e_r___b_l_o_c_k_e_d___a_l_e_r_t is
│ │ │ │ generated. get_ip_filter() Returns the _i_p___f_i_l_t_e_r currently in the _s_e_s_s_i_o_n. See
│ │ │ │ _i_p___f_i_l_t_e_r.
│ │ │ │ @@ -615,25 +615,25 @@
│ │ │ │ ********** sseett__ppoorrtt__ffiilltteerr(()) **********
│ │ │ │ void sseett__ppoorrtt__ffiilltteerr (port_filter const& f);
│ │ │ │ apply _p_o_r_t___f_i_l_t_e_r f to incoming and outgoing peers. a port filter will reject
│ │ │ │ making outgoing peer connections to certain remote ports. The main intention is
│ │ │ │ to be able to avoid triggering certain anti-virus software by connecting to
│ │ │ │ SMTP, FTP ports.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** iiss__lliisstteenniinngg(()) ssssll__lliisstteenn__ppoorrtt(()) lliisstteenn__ppoorrtt(()) **********
│ │ │ │ +********** ssssll__lliisstteenn__ppoorrtt(()) iiss__lliisstteenniinngg(()) lliisstteenn__ppoorrtt(()) **********
│ │ │ │ unsigned short ssssll__lliisstteenn__ppoorrtt () const;
│ │ │ │ bool iiss__lliisstteenniinngg () const;
│ │ │ │ unsigned short lliisstteenn__ppoorrtt () const;
│ │ │ │ is_listening() will tell you whether or not the _s_e_s_s_i_o_n has successfully opened
│ │ │ │ a listening port. If it hasn't, this function will return false, and then you
│ │ │ │ can set a new _s_e_t_t_i_n_g_s___p_a_c_k_:_:_l_i_s_t_e_n___i_n_t_e_r_f_a_c_e_s to try another interface and
│ │ │ │ port to bind to.
│ │ │ │ listen_port() returns the port we ended up listening on.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** sseett__ppeeeerr__ccllaassss__ffiilltteerr(()) ggeett__ppeeeerr__ccllaassss__ffiilltteerr(()) **********
│ │ │ │ +********** ggeett__ppeeeerr__ccllaassss__ffiilltteerr(()) sseett__ppeeeerr__ccllaassss__ffiilltteerr(()) **********
│ │ │ │ ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const;
│ │ │ │ void sseett__ppeeeerr__ccllaassss__ffiilltteerr (ip_filter const& f);
│ │ │ │ Sets the peer class filter for this _s_e_s_s_i_o_n. All new peer connections will take
│ │ │ │ this into account and be added to the peer classes specified by this filter,
│ │ │ │ based on the peer's IP address.
│ │ │ │ The ip-filter essentially maps an IP -> uint32. Each bit in that 32 bit integer
│ │ │ │ represents a peer class. The least significant bit represents class 0, the next
│ │ │ │ @@ -652,15 +652,15 @@
│ │ │ │ in the IP range mapping. Only the set bits matter; no peer class will be
│ │ │ │ removed from a peer as a result of this call, peer classes are only added.
│ │ │ │ The peer_class argument cannot be greater than 31. The bitmasks representing
│ │ │ │ peer classes in the peer_class_filter are 32 bits.
│ │ │ │ The get_peer_class_filter() function returns the current filter.
│ │ │ │ For more information, see _p_e_e_r_ _c_l_a_s_s_e_s.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** ggeett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) **********
│ │ │ │ +********** sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) ggeett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr(()) **********
│ │ │ │ void sseett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr (peer_class_type_filter const& f);
│ │ │ │ peer_class_type_filter ggeett__ppeeeerr__ccllaassss__ttyyppee__ffiilltteerr () const;
│ │ │ │ Sets and gets the ppeeeerr ccllaassss ttyyppee ffiilltteerr. This is controls automatic peer class
│ │ │ │ assignments to peers based on what kind of socket it is.
│ │ │ │ It does not only support assigning peer classes, it also supports removing peer
│ │ │ │ classes based on socket type.
│ │ │ │ The order of these rules being applied are:
│ │ │ │ @@ -690,17 +690,17 @@
│ │ │ │ Since peer classes are reference counted, this function will not remove the
│ │ │ │ peer class if it's still assigned to torrents or peers. It will however remove
│ │ │ │ it once the last peer and torrent drops their references to it.
│ │ │ │ There is no need to call this function for custom peer classes. All peer
│ │ │ │ classes will be properly destructed when the _s_e_s_s_i_o_n object destructs.
│ │ │ │ For more information on peer classes, see _p_e_e_r_ _c_l_a_s_s_e_s.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** ggeett__ppeeeerr__ccllaassss(()) sseett__ppeeeerr__ccllaassss(()) **********
│ │ │ │ -void sseett__ppeeeerr__ccllaassss (peer_class_t cid, peer_class_info const& pci);
│ │ │ │ +********** sseett__ppeeeerr__ccllaassss(()) ggeett__ppeeeerr__ccllaassss(()) **********
│ │ │ │ peer_class_info ggeett__ppeeeerr__ccllaassss (peer_class_t cid) const;
│ │ │ │ +void sseett__ppeeeerr__ccllaassss (peer_class_t cid, peer_class_info const& pci);
│ │ │ │ These functions queries information from a peer class and updates the
│ │ │ │ configuration of a peer class, respectively.
│ │ │ │ cid must refer to an existing peer class. If it does not, the return value of
│ │ │ │ get_peer_class() is undefined.
│ │ │ │ set_peer_class() sets all the information in the _p_e_e_r___c_l_a_s_s___i_n_f_o object in the
│ │ │ │ specified peer class. There is no option to only update a single property.
│ │ │ │ A peer or torrent belonging to more than one class, the highest priority among
│ │ │ │ @@ -730,25 +730,25 @@
│ │ │ │ session.remove_handle(handle); handle.save_resume_data();
│ │ │ │ Note that when a queued or downloading torrent is removed, its position in the
│ │ │ │ download queue is vacated and every subsequent torrent in the queue has their
│ │ │ │ queue positions updated. This can potentially cause a large state_update to be
│ │ │ │ posted. When removing all torrents, it is advised to remove them from the back
│ │ │ │ of the queue, to minimize the shifting.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** aappppllyy__sseettttiinnggss(()) ggeett__sseettttiinnggss(()) **********
│ │ │ │ +********** ggeett__sseettttiinnggss(()) aappppllyy__sseettttiinnggss(()) **********
│ │ │ │ settings_pack ggeett__sseettttiinnggss () const;
│ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack&&);
│ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack const&);
│ │ │ │ Applies the settings specified by the _s_e_t_t_i_n_g_s___p_a_c_k s. This is an asynchronous
│ │ │ │ operation that will return immediately and actually apply the settings to the
│ │ │ │ main thread of libtorrent some time later.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** sseett__aalleerrtt__nnoottiiffyy(()) wwaaiitt__ffoorr__aalleerrtt(()) ppoopp__aalleerrttss(()) **********
│ │ │ │ -alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait);
│ │ │ │ +********** wwaaiitt__ffoorr__aalleerrtt(()) sseett__aalleerrtt__nnoottiiffyy(()) ppoopp__aalleerrttss(()) **********
│ │ │ │ void ppoopp__aalleerrttss (std::vector* alerts);
│ │ │ │ +alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait);
│ │ │ │ void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun);
│ │ │ │ Alerts is the main mechanism for libtorrent to report errors and events.
│ │ │ │ pop_alerts fills in the vector passed to it with pointers to new alerts. The
│ │ │ │ _s_e_s_s_i_o_n still owns these alerts and they will stay valid until the next time
│ │ │ │ pop_alerts is called. You may not delete the _a_l_e_r_t objects.
│ │ │ │ It is safe to call pop_alerts from multiple different threads, as long as the
│ │ │ │ alerts themselves are not accessed once another thread calls pop_alerts. Doing
│ │ │ │ @@ -789,17 +789,17 @@
│ │ │ │ block. It should not perform any expensive work. It really should just notify
│ │ │ │ the main application thread.
│ │ │ │ The type of an _a_l_e_r_t is returned by the polymorphic function alert::type() but
│ │ │ │ can also be queries from a concrete type via T::alert_type, as a static
│ │ │ │ constant.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** ddeelleettee__ppoorrtt__mmaappppiinngg(()) aadddd__ppoorrtt__mmaappppiinngg(()) **********
│ │ │ │ -void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle);
│ │ │ │ std::vector aadddd__ppoorrtt__mmaappppiinngg (portmap_protocol t, int
│ │ │ │ external_port, int local_port);
│ │ │ │ +void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle);
│ │ │ │ add_port_mapping adds one or more port forwards on UPnP and/or NAT-PMP,
│ │ │ │ whichever is enabled. A mapping is created for each listen socket in the
│ │ │ │ _s_e_s_s_i_o_n. The return values are all handles referring to the port mappings that
│ │ │ │ were just created. Pass them to _d_e_l_e_t_e___p_o_r_t___m_a_p_p_i_n_g_(_) to remove them.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** rreeooppeenn__nneettwwoorrkk__ssoocckkeettss(()) **********
│ │ │ │ void rreeooppeenn__nneettwwoorrkk__ssoocckkeettss (reopen_network_flags_t options =
│ │ ├── ./usr/share/doc/libtorrent-rasterbar-doc/html/reference-Settings.html
│ │ │ @@ -29,35 +29,35 @@
│ │ │
│ │ │
│ │ │ home
│ │ │
│ │ │
Table of contents
│ │ │
│ │ │
│ │ │ You have some control over session configuration through the session::apply_settings()
│ │ │ member function. To change one or more configuration options, create a settings_pack
│ │ │ object and fill it with the settings to be set and pass it in to session::apply_settings().
│ │ │ The settings_pack object is a collection of settings updates that are applied
│ │ │ to the session when passed to session::apply_settings(). It's empty when
│ │ │ @@ -4600,22 +4600,22 @@
│ │ │ struct settings_pack final : settings_interface
│ │ │ {
│ │ │ friend void apply_pack_impl (settings_pack const*
│ │ │ , aux::session_settings_single_thread&
│ │ │ , std::vector<void(aux::session_impl::*)()>*);
│ │ │ void set_str (int name, std::string val) override;
│ │ │ void set_bool (int name, bool val) override;
│ │ │ - void set_int (int name, flags::bitfield_flag<Type, Tag> const val);
│ │ │ void set_int (int name, int 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;
│ │ │ - int get_int (int name) const override;
│ │ │ bool get_bool (int name) const override;
│ │ │ + int get_int (int name) const override;
│ │ │ + std::string const& get_str (int name) const override;
│ │ │ void for_each (Fun&& f) const;
│ │ │
│ │ │ enum type_bases
│ │ │ {
│ │ │ string_type_base,
│ │ │ int_type_base,
│ │ │ bool_type_base,
│ │ │ @@ -4685,23 +4685,23 @@
│ │ │ socks5,
│ │ │ socks5_pw,
│ │ │ http,
│ │ │ http_pw,
│ │ │ };
│ │ │ };
│ │ │
│ │ │ -
│ │ │ +
│ │ │
│ │ │ -[report issue]
│ │ │ -
set_bool() set_str() set_int()
│ │ │ +
[report issue]
│ │ │ +
set_int() set_str() set_bool()
│ │ │
│ │ │ void set_str (int name, std::string val) override;
│ │ │ void set_bool (int name, bool val) override;
│ │ │ -void set_int (int name, flags::bitfield_flag<Type, Tag> const val);
│ │ │ void set_int (int name, int val) override;
│ │ │ +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()
│ │ │ @@ -4721,23 +4721,23 @@
│ │ │
[report issue]
│ │ │
│ │ │
clear()
│ │ │
│ │ │ void clear (int name);
│ │ │
│ │ │
clear a specific setting from the pack
│ │ │ +
│ │ │
│ │ │ -
│ │ │ -
[report issue]
│ │ │ -
│ │ │ +
│ │ │ +
get_str() get_bool() get_int()
│ │ │
│ │ │ -std::string const& get_str (int name) const override;
│ │ │ -int get_int (int name) const override;
│ │ │ bool get_bool (int name) const override;
│ │ │ +int get_int (int name) const override;
│ │ │ +std::string const& get_str (int name) const override;
│ │ │
│ │ │
queries the current configuration option from the settings_pack.
│ │ │ name is one of the enumeration values from string_types, int_types
│ │ │ or bool_types. The enum value must match the type of the get_*
│ │ │ function. If the specified setting field has not been set, the default
│ │ │ value is returned.
│ │ │
[report issue]
│ │ │ @@ -5096,16 +5096,64 @@
│ │ │
| http_pw |
│ │ │ 5 |
│ │ │ The server is assumed to be an HTTP proxy that requires user
│ │ │ authorization. The username and password will be sent to the proxy. |
│ │ │
│ │ │
│ │ │
│ │ │ -
[report issue]
│ │ │ +
│ │ │ +[report issue]
│ │ │
│ │ │ +
│ │ │ +
setting_by_name() name_for_setting()
│ │ │ +
Declared in "libtorrent/settings_pack.hpp"
│ │ │ +
│ │ │ +char const* name_for_setting (int s);
│ │ │ +int setting_by_name (string_view name);
│ │ │ +
│ │ │ +
converts a setting integer (from the enums string_types, int_types or
│ │ │ +bool_types) to a string, and vice versa.
│ │ │ +
[report issue]
│ │ │ +
│ │ │ +
│ │ │
│ │ │
generate_fingerprint()
│ │ │
Declared in "libtorrent/fingerprint.hpp"
│ │ │
│ │ │ std::string generate_fingerprint (std::string name
│ │ │ , int major, int minor = 0, int revision = 0, int tag = 0);
│ │ │
│ │ │ @@ -5154,62 +5202,14 @@
│ │ │
Tribler |
│ │ │
│ │ │
│ │ │
│ │ │
There's an informal directory of client id's here.
│ │ │
The major, minor, revision and tag parameters are used to
│ │ │ identify the version of your client.
│ │ │ -
│ │ │ -
[report issue]
│ │ │ -
│ │ │ -
│ │ │ -
name_for_setting() setting_by_name()
│ │ │ -
Declared in "libtorrent/settings_pack.hpp"
│ │ │ -
│ │ │ -int setting_by_name (string_view name);
│ │ │ -char const* name_for_setting (int s);
│ │ │ -
│ │ │ -
converts a setting integer (from the enums string_types, int_types or
│ │ │ -bool_types) to a string, and vice versa.
│ │ │ -
[report issue]
│ │ │ -
│ │ │ -
default_settings()
│ │ │ -
Declared in "libtorrent/settings_pack.hpp"
│ │ │ -
│ │ │ -settings_pack default_settings ();
│ │ │ -
│ │ │ -
returns a settings_pack with every setting set to its default value
│ │ │
│ │ │
│ │ │
│ │ │
│ │ │