│ │ │ +
write_session_params() write_session_params_buf() read_session_params()
│ │ │
Declared in "libtorrent/session_params.hpp"
│ │ │
│ │ │ -session_params read_session_params (bdecode_node const& e
│ │ │ - , save_state_flags_t flags = save_state_flags_t::all());
│ │ │ -entry write_session_params (session_params const& sp
│ │ │ +session_params read_session_params (span<char const> buf
│ │ │ , save_state_flags_t flags = save_state_flags_t::all());
│ │ │ std::vector<char> write_session_params_buf (session_params const& sp
│ │ │ , save_state_flags_t flags = save_state_flags_t::all());
│ │ │ -session_params read_session_params (span<char const> buf
│ │ │ +entry write_session_params (session_params const& sp
│ │ │ + , save_state_flags_t flags = save_state_flags_t::all());
│ │ │ +session_params read_session_params (bdecode_node const& e
│ │ │ , save_state_flags_t flags = save_state_flags_t::all());
│ │ │
│ │ │
These functions serialize and de-serialize a session_params object to and
│ │ │ from bencoded form. The session_params object is used to initialize a new
│ │ │ session using the state from a previous one (or by programmatically configure
│ │ │ the session up-front).
│ │ │ The flags parameter can be used to only save and load certain aspects of the
│ │ │ ├── html2text {}
│ │ │ │ @@ -2,69 +2,69 @@
│ │ │ │ _[_l_i_b_t_o_r_r_e_n_t_ _l_o_g_o_]
│ │ │ │ VVeerrssiioonn:: 2.0.11
│ │ │ │ _h_o_m_e
│ │ │ │ Table of contents
│ │ │ │ * _s_e_s_s_i_o_n___p_a_r_a_m_s
│ │ │ │ o _s_e_s_s_i_o_n___p_a_r_a_m_s_(_)
│ │ │ │ o _s_e_s_s_i_o_n___p_a_r_a_m_s_(_)
│ │ │ │ - * _s_e_s_s_i_o_n___p_r_o_x_y
│ │ │ │ - o _~_s_e_s_s_i_o_n___p_r_o_x_y_(_)_ _o_p_e_r_a_t_o_r_=_(_)_ _s_e_s_s_i_o_n___p_r_o_x_y_(_)
│ │ │ │ - * _s_e_s_s_i_o_n
│ │ │ │ - o _s_e_s_s_i_o_n_(_)
│ │ │ │ - o _s_e_s_s_i_o_n_(_)
│ │ │ │ - o _~_s_e_s_s_i_o_n_(_)
│ │ │ │ - o _a_b_o_r_t_(_)
│ │ │ │ * _s_e_s_s_i_o_n___h_a_n_d_l_e
│ │ │ │ o _i_s___v_a_l_i_d_(_)
│ │ │ │ o _s_e_s_s_i_o_n___s_t_a_t_e_(_)
│ │ │ │ o _g_e_t___t_o_r_r_e_n_t___s_t_a_t_u_s_(_)_ _r_e_f_r_e_s_h___t_o_r_r_e_n_t___s_t_a_t_u_s_(_)
│ │ │ │ o _p_o_s_t___t_o_r_r_e_n_t___u_p_d_a_t_e_s_(_)
│ │ │ │ o _p_o_s_t___s_e_s_s_i_o_n___s_t_a_t_s_(_)
│ │ │ │ o _p_o_s_t___d_h_t___s_t_a_t_s_(_)
│ │ │ │ o _s_e_t___d_h_t___s_t_a_t_e_(_)
│ │ │ │ o _f_i_n_d___t_o_r_r_e_n_t_(_)_ _g_e_t___t_o_r_r_e_n_t_s_(_)
│ │ │ │ o _a_s_y_n_c___a_d_d___t_o_r_r_e_n_t_(_)_ _a_d_d___t_o_r_r_e_n_t_(_)
│ │ │ │ - o _p_a_u_s_e_(_)_ _r_e_s_u_m_e_(_)_ _i_s___p_a_u_s_e_d_(_)
│ │ │ │ + o _p_a_u_s_e_(_)_ _i_s___p_a_u_s_e_d_(_)_ _r_e_s_u_m_e_(_)
│ │ │ │ o _i_s___d_h_t___r_u_n_n_i_n_g_(_)
│ │ │ │ o _s_e_t___d_h_t___s_t_o_r_a_g_e_(_)
│ │ │ │ o _a_d_d___d_h_t___n_o_d_e_(_)
│ │ │ │ o _d_h_t___g_e_t___i_t_e_m_(_)
│ │ │ │ o _d_h_t___g_e_t___i_t_e_m_(_)
│ │ │ │ o _d_h_t___p_u_t___i_t_e_m_(_)
│ │ │ │ o _d_h_t___p_u_t___i_t_e_m_(_)
│ │ │ │ - o _d_h_t___g_e_t___p_e_e_r_s_(_)_ _d_h_t___a_n_n_o_u_n_c_e_(_)
│ │ │ │ + o _d_h_t___a_n_n_o_u_n_c_e_(_)_ _d_h_t___g_e_t___p_e_e_r_s_(_)
│ │ │ │ o _d_h_t___l_i_v_e___n_o_d_e_s_(_)
│ │ │ │ o _d_h_t___s_a_m_p_l_e___i_n_f_o_h_a_s_h_e_s_(_)
│ │ │ │ o _d_h_t___d_i_r_e_c_t___r_e_q_u_e_s_t_(_)
│ │ │ │ o _a_d_d___e_x_t_e_n_s_i_o_n_(_)
│ │ │ │ o _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_s_l___l_i_s_t_e_n___p_o_r_t_(_)_ _l_i_s_t_e_n___p_o_r_t_(_)_ _i_s___l_i_s_t_e_n_i_n_g_(_)
│ │ │ │ o _s_e_t___p_e_e_r___c_l_a_s_s___f_i_l_t_e_r_(_)_ _g_e_t___p_e_e_r___c_l_a_s_s___f_i_l_t_e_r_(_)
│ │ │ │ - o _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_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 _p_o_p___a_l_e_r_t_s_(_)_ _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_(_)
│ │ │ │ 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_(_)
│ │ │ │ + * _s_e_s_s_i_o_n___p_r_o_x_y
│ │ │ │ + o _s_e_s_s_i_o_n___p_r_o_x_y_(_)_ _o_p_e_r_a_t_o_r_=_(_)_ _~_s_e_s_s_i_o_n___p_r_o_x_y_(_)
│ │ │ │ + * _s_e_s_s_i_o_n
│ │ │ │ + o _s_e_s_s_i_o_n_(_)
│ │ │ │ + o _s_e_s_s_i_o_n_(_)
│ │ │ │ + o _~_s_e_s_s_i_o_n_(_)
│ │ │ │ + o _a_b_o_r_t_(_)
│ │ │ │ + * _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s_(_)_ _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s___b_u_f_(_)_ _r_e_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 ();
│ │ │ │ - sseessssiioonn__ppaarraammss (settings_pack const& sp);
│ │ │ │ sseessssiioonn__ppaarraammss (settings_pack&& sp);
│ │ │ │ + sseessssiioonn__ppaarraammss (settings_pack const& sp);
│ │ │ │ + sseessssiioonn__ppaarraammss ();
│ │ │ │ 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 ();
│ │ │ │ -sseessssiioonn__ppaarraammss (settings_pack const& sp);
│ │ │ │ sseessssiioonn__ppaarraammss (settings_pack&& sp);
│ │ │ │ +sseessssiioonn__ppaarraammss (settings_pack const& sp);
│ │ │ │ +sseessssiioonn__ppaarraammss ();
│ │ │ │ This constructor can be used to start with the default plugins (ut_metadata,
│ │ │ │ ut_pex and smart_ban). Pass a _s_e_t_t_i_n_g_s___p_a_c_k to set the initial settings when
│ │ │ │ the _s_e_s_s_i_o_n starts.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** sseessssiioonn__ppaarraammss(()) **********
│ │ │ │ sseessssiioonn__ppaarraammss (settings_pack&& sp
│ │ │ │ , std::vector> exts);
│ │ │ │ @@ -112,122 +112,14 @@
│ │ │ │ primarily here to make it convenient to save and restore state across
│ │ │ │ sessions, using _r_e_a_d___s_e_s_s_i_o_n___p_a_r_a_m_s_(_) and _w_r_i_t_e___s_e_s_s_i_o_n___p_a_r_a_m_s_(_).
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ip_filter
│ │ │ │ the IP filter to use for the _s_e_s_s_i_o_n. This restricts which peers are
│ │ │ │ allowed to connect. As if passed to _s_e_t___i_p___f_i_l_t_e_r_(_).
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -************ sseessssiioonn__pprrooxxyy ************
│ │ │ │ -Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n_._h_p_p"
│ │ │ │ -this is a holder for the internal _s_e_s_s_i_o_n implementation object. Once the
│ │ │ │ -_s_e_s_s_i_o_n destruction is explicitly initiated, this holder is used to synchronize
│ │ │ │ -the completion of the shutdown. The lifetime of this object may outlive
│ │ │ │ -_s_e_s_s_i_o_n, causing the _s_e_s_s_i_o_n destructor to not block. The _s_e_s_s_i_o_n___p_r_o_x_y
│ │ │ │ -destructor will block however, until the underlying _s_e_s_s_i_o_n is done shutting
│ │ │ │ -down.
│ │ │ │ -struct session_proxy
│ │ │ │ -{
│ │ │ │ - sseessssiioonn__pprrooxxyy (session_proxy const&);
│ │ │ │ - session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept;
│ │ │ │ - session_proxy& ooppeerraattoorr== (session_proxy const&) &;
│ │ │ │ - sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept;
│ │ │ │ - ~~sseessssiioonn__pprrooxxyy ();
│ │ │ │ - sseessssiioonn__pprrooxxyy ();
│ │ │ │ -};
│ │ │ │ -[_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 ();
│ │ │ │ -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
│ │ │ │ -will be idle as long it doesn't have any torrents to participate in.
│ │ │ │ -You have some control over _s_e_s_s_i_o_n configuration through the session_handle::
│ │ │ │ -apply_settings() member function. To change one or more configuration options,
│ │ │ │ -create a _s_e_t_t_i_n_g_s___p_a_c_k. object and fill it with the settings to be set and pass
│ │ │ │ -it in to session::apply_settings().
│ │ │ │ -see _a_p_p_l_y___s_e_t_t_i_n_g_s_(_).
│ │ │ │ -struct session : session_handle
│ │ │ │ -{
│ │ │ │ - sseessssiioonn (session_params const& params, session_flags_t flags);
│ │ │ │ - sseessssiioonn (session_params&& params, session_flags_t flags);
│ │ │ │ - explicit sseessssiioonn (session_params&& params);
│ │ │ │ - sseessssiioonn ();
│ │ │ │ - explicit sseessssiioonn (session_params const& params);
│ │ │ │ - sseessssiioonn (session_params&& params, io_context& ios);
│ │ │ │ - sseessssiioonn (session_params const& params, io_context& ios, session_flags_t);
│ │ │ │ - sseessssiioonn (session_params&& params, io_context& ios, session_flags_t);
│ │ │ │ - sseessssiioonn (session_params const& params, io_context& ios);
│ │ │ │ - ~~sseessssiioonn ();
│ │ │ │ - session_proxy aabboorrtt ();
│ │ │ │ -};
│ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** sseessssiioonn(()) **********
│ │ │ │ -sseessssiioonn (session_params const& params, session_flags_t flags);
│ │ │ │ -sseessssiioonn (session_params&& params, session_flags_t flags);
│ │ │ │ -explicit sseessssiioonn (session_params&& params);
│ │ │ │ -sseessssiioonn ();
│ │ │ │ -explicit sseessssiioonn (session_params const& params);
│ │ │ │ -Constructs the _s_e_s_s_i_o_n objects which acts as the container of torrents. In
│ │ │ │ -order to avoid a race condition between starting the _s_e_s_s_i_o_n and configuring
│ │ │ │ -it, you can pass in a _s_e_s_s_i_o_n___p_a_r_a_m_s object. Its settings will take effect
│ │ │ │ -before the _s_e_s_s_i_o_n starts up.
│ │ │ │ -The overloads taking flags can be used to start a _s_e_s_s_i_o_n in paused mode (by
│ │ │ │ -passing in session::paused). Note that add_default_plugins do not have an
│ │ │ │ -affect on constructors that take a _s_e_s_s_i_o_n___p_a_r_a_m_s object. It already contains
│ │ │ │ -the plugins to use.
│ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** sseessssiioonn(()) **********
│ │ │ │ -sseessssiioonn (session_params&& params, io_context& ios);
│ │ │ │ -sseessssiioonn (session_params const& params, io_context& ios, session_flags_t);
│ │ │ │ -sseessssiioonn (session_params&& params, io_context& ios, session_flags_t);
│ │ │ │ -sseessssiioonn (session_params const& params, io_context& ios);
│ │ │ │ -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
│ │ │ │ -io_context::run() call mmuusstt have returned before it's safe to destruct the
│ │ │ │ -_s_e_s_s_i_o_n. Which means you MMUUSSTT call _s_e_s_s_i_o_n_:_:_a_b_o_r_t_(_) and save the _s_e_s_s_i_o_n___p_r_o_x_y
│ │ │ │ -first, then destruct the _s_e_s_s_i_o_n object, then sync with the io_context, then
│ │ │ │ -destruct the _s_e_s_s_i_o_n___p_r_o_x_y object.
│ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** ~~sseessssiioonn(()) **********
│ │ │ │ -~~sseessssiioonn ();
│ │ │ │ -The destructor of _s_e_s_s_i_o_n will notify all trackers that our torrents have been
│ │ │ │ -shut down. If some trackers are down, they will time out. All this before the
│ │ │ │ -destructor of _s_e_s_s_i_o_n returns. So, it's advised that any kind of interface
│ │ │ │ -(such as windows) are closed before destructing the _s_e_s_s_i_o_n object. Because it
│ │ │ │ -can take a few second for it to finish. The timeout can be set with
│ │ │ │ -_a_p_p_l_y___s_e_t_t_i_n_g_s_(_).
│ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** aabboorrtt(()) **********
│ │ │ │ -session_proxy aabboorrtt ();
│ │ │ │ -In case you want to destruct the _s_e_s_s_i_o_n asynchronously, you can request a
│ │ │ │ -_s_e_s_s_i_o_n destruction proxy. If you don't do this, the destructor of the _s_e_s_s_i_o_n
│ │ │ │ -object will block while the trackers are contacted. If you keep one
│ │ │ │ -session_proxy to the _s_e_s_s_i_o_n when destructing it, the destructor will not
│ │ │ │ -block, but start to close down the _s_e_s_s_i_o_n, the destructor of the proxy will
│ │ │ │ -then synchronize the threads. So, the destruction of the _s_e_s_s_i_o_n is performed
│ │ │ │ -from the session destructor call until the session_proxy destructor call. The
│ │ │ │ -session_proxy does not have any operations on it (since the _s_e_s_s_i_o_n is being
│ │ │ │ -closed down, no operations are allowed on it). The only valid operation is
│ │ │ │ -calling the destructor:
│ │ │ │ -struct session_proxy {};
│ │ │ │ -[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ************ sseessssiioonn__hhaannddllee ************
│ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n___h_a_n_d_l_e_._h_p_p"
│ │ │ │ this class provides a non-owning handle to a _s_e_s_s_i_o_n and a subset of the
│ │ │ │ interface of the _s_e_s_s_i_o_n class. If the underlying _s_e_s_s_i_o_n is destructed any
│ │ │ │ handle to it will no longer be valid. _i_s___v_a_l_i_d_(_) will return false and any
│ │ │ │ operation on it will throw a system_error exception, with error code
│ │ │ │ invalid_session_handle.
│ │ │ │ @@ -242,72 +134,72 @@
│ │ │ │ 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;
│ │ │ │ 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);
│ │ │ │ - void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params);
│ │ │ │ - torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ + std::vector ggeett__ttoorrrreennttss () const;
│ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params);
│ │ │ │ + void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code&
│ │ │ │ ec);
│ │ │ │ - void ppaauussee ();
│ │ │ │ - bool iiss__ppaauusseedd () const;
│ │ │ │ + torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ + torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec);
│ │ │ │ + void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params);
│ │ │ │ void rreessuummee ();
│ │ │ │ + bool iiss__ppaauusseedd () const;
│ │ │ │ + void ppaauussee ();
│ │ │ │ bool iiss__ddhhtt__rruunnnniinngg () const;
│ │ │ │ void sseett__ddhhtt__ssttoorraaggee (dht::dht_storage_constructor_type sc);
│ │ │ │ void aadddd__ddhhtt__nnooddee (std::pair const& node);
│ │ │ │ void ddhhtt__ggeett__iitteemm (sha1_hash const& target);
│ │ │ │ void ddhhtt__ggeett__iitteemm (std::array key
│ │ │ │ , std::string salt = std::string());
│ │ │ │ sha1_hash ddhhtt__ppuutt__iitteemm (entry data);
│ │ │ │ void ddhhtt__ppuutt__iitteemm (std::array key
│ │ │ │ , std::function&
│ │ │ │ , std::int64_t&, std::string const&)> cb
│ │ │ │ , std::string salt = std::string());
│ │ │ │ - void ddhhtt__ggeett__ppeeeerrss (sha1_hash const& info_hash);
│ │ │ │ void ddhhtt__aannnnoouunnccee (sha1_hash const& info_hash, int port = 0, dht::
│ │ │ │ announce_flags_t flags = {});
│ │ │ │ + void ddhhtt__ggeett__ppeeeerrss (sha1_hash const& info_hash);
│ │ │ │ void ddhhtt__lliivvee__nnooddeess (sha1_hash const& nid);
│ │ │ │ void ddhhtt__ssaammppllee__iinnffoohhaasshheess (udp::endpoint const& ep, sha1_hash const&
│ │ │ │ target);
│ │ │ │ void ddhhtt__ddiirreecctt__rreeqquueesstt (udp::endpoint const& ep, entry const& e,
│ │ │ │ client_data_t userdata = {});
│ │ │ │ void aadddd__eexxtteennssiioonn (std::shared_ptr ext);
│ │ │ │ void aadddd__eexxtteennssiioonn (std::function(
│ │ │ │ torrent_handle const&, client_data_t)> ext);
│ │ │ │ ip_filter ggeett__iipp__ffiilltteerr () const;
│ │ │ │ void sseett__iipp__ffiilltteerr (ip_filter f);
│ │ │ │ void sseett__ppoorrtt__ffiilltteerr (port_filter const& f);
│ │ │ │ - unsigned short ssssll__lliisstteenn__ppoorrtt () const;
│ │ │ │ bool iiss__lliisstteenniinngg () const;
│ │ │ │ + unsigned short ssssll__lliisstteenn__ppoorrtt () const;
│ │ │ │ unsigned short lliisstteenn__ppoorrtt () const;
│ │ │ │ - ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const;
│ │ │ │ void sseett__ppeeeerr__ccllaassss__ffiilltteerr (ip_filter const& f);
│ │ │ │ + ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const;
│ │ │ │ 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);
│ │ │ │ + settings_pack ggeett__sseettttiinnggss () const;
│ │ │ │ void ppoopp__aalleerrttss (std::vector* alerts);
│ │ │ │ void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun);
│ │ │ │ - void ddeelleettee__ppoorrtt__mmaappppiinngg (port_mapping_t handle);
│ │ │ │ + alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait);
│ │ │ │ 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;
│ │ │ │ @@ -398,30 +290,30 @@
│ │ │ │ void sseett__ddhhtt__ssttaattee (dht::dht_state&& st);
│ │ │ │ void sseett__ddhhtt__ssttaattee (dht::dht_state const& st);
│ │ │ │ set the DHT state for the _s_e_s_s_i_o_n. This will be taken into account the next
│ │ │ │ time the DHT is started, as if it had been passed in via the _s_e_s_s_i_o_n___p_a_r_a_m_s on
│ │ │ │ startup.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** ffiinndd__ttoorrrreenntt(()) ggeett__ttoorrrreennttss(()) **********
│ │ │ │ -std::vector ggeett__ttoorrrreennttss () const;
│ │ │ │ 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);
│ │ │ │ -void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params);
│ │ │ │ -torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params);
│ │ │ │ +void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params, error_code& ec);
│ │ │ │ +torrent_handle aadddd__ttoorrrreenntt (add_torrent_params const& params);
│ │ │ │ +torrent_handle aadddd__ttoorrrreenntt (add_torrent_params&& params, error_code& ec);
│ │ │ │ +void aassyynncc__aadddd__ttoorrrreenntt (add_torrent_params&& params);
│ │ │ │ You add torrents through the _a_d_d___t_o_r_r_e_n_t_(_) function where you give an object
│ │ │ │ with all the parameters. The _a_d_d___t_o_r_r_e_n_t_(_) overloads will block until the
│ │ │ │ torrent has been added (or failed to be added) and returns an error code and a
│ │ │ │ _t_o_r_r_e_n_t___h_a_n_d_l_e. In order to add torrents more efficiently, consider using
│ │ │ │ _a_s_y_n_c___a_d_d___t_o_r_r_e_n_t_(_) which returns immediately, without waiting for the torrent
│ │ │ │ to add. Notification of the torrent being added is sent as _a_d_d___t_o_r_r_e_n_t___a_l_e_r_t.
│ │ │ │ The save_path field in _a_d_d___t_o_r_r_e_n_t___p_a_r_a_m_s must be set to a valid path where the
│ │ │ │ @@ -442,18 +334,18 @@
│ │ │ │ torrent_flags::paused and torrent_flags::auto_managed. In order to add a magnet
│ │ │ │ link that will just download the metadata, but no payload, set the
│ │ │ │ torrent_flags::upload_mode flag.
│ │ │ │ Special consideration has to be taken when adding hybrid torrents (i.e.
│ │ │ │ torrents that are BitTorrent v2 torrents that are backwards compatible with
│ │ │ │ v1). For more details, see _B_i_t_T_o_r_r_e_n_t_ _v_2_ _t_o_r_r_e_n_t_s.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** ppaauussee(()) rreessuummee(()) iiss__ppaauusseedd(()) **********
│ │ │ │ -void ppaauussee ();
│ │ │ │ -bool iiss__ppaauusseedd () const;
│ │ │ │ +********** ppaauussee(()) iiss__ppaauusseedd(()) rreessuummee(()) **********
│ │ │ │ void rreessuummee ();
│ │ │ │ +bool iiss__ppaauusseedd () const;
│ │ │ │ +void ppaauussee ();
│ │ │ │ Pausing the _s_e_s_s_i_o_n has the same effect as pausing every torrent in it, except
│ │ │ │ that torrents will not be resumed by the auto-manage mechanism. Resuming will
│ │ │ │ restore the torrents to their previous paused state. i.e. the _s_e_s_s_i_o_n pause
│ │ │ │ state is separate from the torrent pause state. A torrent is inactive if it is
│ │ │ │ paused or if the _s_e_s_s_i_o_n is paused.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** iiss__ddhhtt__rruunnnniinngg(()) **********
│ │ │ │ @@ -529,18 +421,18 @@
│ │ │ │ and make the function entirely self-contained. The only reason data blob's
│ │ │ │ value is computed via a function instead of just passing in the new value is to
│ │ │ │ avoid race conditions. If you want to uuppddaattee the value in the DHT, you must
│ │ │ │ first retrieve it, then modify it, then write it back. The way the DHT works,
│ │ │ │ it is natural to always do a lookup before storing and calling the callback in
│ │ │ │ between is convenient.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** ddhhtt__ggeett__ppeeeerrss(()) ddhhtt__aannnnoouunnccee(()) **********
│ │ │ │ -void ddhhtt__ggeett__ppeeeerrss (sha1_hash const& info_hash);
│ │ │ │ +********** ddhhtt__aannnnoouunnccee(()) ddhhtt__ggeett__ppeeeerrss(()) **********
│ │ │ │ void ddhhtt__aannnnoouunnccee (sha1_hash const& info_hash, int port = 0, dht::
│ │ │ │ announce_flags_t flags = {});
│ │ │ │ +void ddhhtt__ggeett__ppeeeerrss (sha1_hash const& info_hash);
│ │ │ │ dht_get_peers() will issue a DHT get_peer request to the DHT for the specified
│ │ │ │ info-hash. The response (the peers) will be posted back in a
│ │ │ │ _d_h_t___g_e_t___p_e_e_r_s___r_e_p_l_y___a_l_e_r_t.
│ │ │ │ dht_announce() will issue a DHT announce request to the DHT to the specified
│ │ │ │ info-hash, advertising the specified port. If the port is left at its default,
│ │ │ │ 0, the port will be implied by the DHT message's source port (which may improve
│ │ │ │ connectivity through a NAT). dht_announce() is not affected by the
│ │ │ │ @@ -615,27 +507,27 @@
│ │ │ │ ********** sseett__ppoorrtt__ffiilltteerr(()) **********
│ │ │ │ void sseett__ppoorrtt__ffiilltteerr (port_filter const& f);
│ │ │ │ apply _p_o_r_t___f_i_l_t_e_r f to incoming and outgoing peers. a port filter will reject
│ │ │ │ making outgoing peer connections to certain remote ports. The main intention is
│ │ │ │ to be able to avoid triggering certain anti-virus software by connecting to
│ │ │ │ SMTP, FTP ports.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** iiss__lliisstteenniinngg(()) ssssll__lliisstteenn__ppoorrtt(()) lliisstteenn__ppoorrtt(()) **********
│ │ │ │ -unsigned short ssssll__lliisstteenn__ppoorrtt () const;
│ │ │ │ +********** ssssll__lliisstteenn__ppoorrtt(()) lliisstteenn__ppoorrtt(()) iiss__lliisstteenniinngg(()) **********
│ │ │ │ bool iiss__lliisstteenniinngg () const;
│ │ │ │ +unsigned short ssssll__lliisstteenn__ppoorrtt () 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(()) **********
│ │ │ │ -ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const;
│ │ │ │ void sseett__ppeeeerr__ccllaassss__ffiilltteerr (ip_filter const& f);
│ │ │ │ +ip_filter ggeett__ppeeeerr__ccllaassss__ffiilltteerr () const;
│ │ │ │ Sets the peer class filter for this _s_e_s_s_i_o_n. All new peer connections will take
│ │ │ │ this into account and be added to the peer classes specified by this filter,
│ │ │ │ based on the peer's IP address.
│ │ │ │ The ip-filter essentially maps an IP -> uint32. Each bit in that 32 bit integer
│ │ │ │ represents a peer class. The least significant bit represents class 0, the next
│ │ │ │ bit class 1 and so on.
│ │ │ │ For more info, see _i_p___f_i_l_t_e_r.
│ │ │ │ @@ -652,15 +544,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 +582,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
│ │ │ │ @@ -731,25 +623,25 @@
│ │ │ │ Note that when a queued or downloading torrent is removed, its position in the
│ │ │ │ download queue is vacated and every subsequent torrent in the queue has their
│ │ │ │ queue positions updated. This can potentially cause a large state_update to be
│ │ │ │ posted. When removing all torrents, it is advised to remove them from the back
│ │ │ │ of the queue, to minimize the shifting.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ ********** aappppllyy__sseettttiinnggss(()) ggeett__sseettttiinnggss(()) **********
│ │ │ │ -settings_pack ggeett__sseettttiinnggss () const;
│ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack&&);
│ │ │ │ void aappppllyy__sseettttiinnggss (settings_pack const&);
│ │ │ │ +settings_pack ggeett__sseettttiinnggss () const;
│ │ │ │ Applies the settings specified by the _s_e_t_t_i_n_g_s___p_a_c_k s. This is an asynchronous
│ │ │ │ operation that will return immediately and actually apply the settings to the
│ │ │ │ main thread of libtorrent some time later.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -********** sseett__aalleerrtt__nnoottiiffyy(()) wwaaiitt__ffoorr__aalleerrtt(()) ppoopp__aalleerrttss(()) **********
│ │ │ │ -alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait);
│ │ │ │ +********** ppoopp__aalleerrttss(()) sseett__aalleerrtt__nnoottiiffyy(()) wwaaiitt__ffoorr__aalleerrtt(()) **********
│ │ │ │ void ppoopp__aalleerrttss (std::vector* alerts);
│ │ │ │ void sseett__aalleerrtt__nnoottiiffyy (std::function const& fun);
│ │ │ │ +alert* wwaaiitt__ffoorr__aalleerrtt (time_duration max_wait);
│ │ │ │ Alerts is the main mechanism for libtorrent to report errors and events.
│ │ │ │ pop_alerts fills in the vector passed to it with pointers to new alerts. The
│ │ │ │ _s_e_s_s_i_o_n still owns these alerts and they will stay valid until the next time
│ │ │ │ pop_alerts is called. You may not delete the _a_l_e_r_t objects.
│ │ │ │ It is safe to call pop_alerts from multiple different threads, as long as the
│ │ │ │ alerts themselves are not accessed once another thread calls pop_alerts. Doing
│ │ │ │ this requires manual synchronization between the popping threads.
│ │ │ │ @@ -789,17 +681,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 =
│ │ │ │ @@ -845,24 +737,132 @@
│ │ │ │ protocols used by _a_d_d___p_o_r_t___m_a_p_p_i_n_g_(_)
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ reopen_map_ports
│ │ │ │ This option indicates if the ports are mapped using natpmp and upnp. If
│ │ │ │ mapping was already made, they are deleted and added again. This only
│ │ │ │ works if natpmp and/or upnp are configured to be enable.
│ │ │ │ [_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ -************ wwrriittee__sseessssiioonn__ppaarraammss__bbuuff(()) wwrriittee__sseessssiioonn__ppaarraammss(()) rreeaadd__sseessssiioonn__ppaarraammss(())
│ │ │ │ +************ sseessssiioonn__pprrooxxyy ************
│ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n_._h_p_p"
│ │ │ │ +this is a holder for the internal _s_e_s_s_i_o_n implementation object. Once the
│ │ │ │ +_s_e_s_s_i_o_n destruction is explicitly initiated, this holder is used to synchronize
│ │ │ │ +the completion of the shutdown. The lifetime of this object may outlive
│ │ │ │ +_s_e_s_s_i_o_n, causing the _s_e_s_s_i_o_n destructor to not block. The _s_e_s_s_i_o_n___p_r_o_x_y
│ │ │ │ +destructor will block however, until the underlying _s_e_s_s_i_o_n is done shutting
│ │ │ │ +down.
│ │ │ │ +struct session_proxy
│ │ │ │ +{
│ │ │ │ + sseessssiioonn__pprrooxxyy ();
│ │ │ │ + session_proxy& ooppeerraattoorr== (session_proxy const&) &;
│ │ │ │ + sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept;
│ │ │ │ + session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept;
│ │ │ │ + ~~sseessssiioonn__pprrooxxyy ();
│ │ │ │ + sseessssiioonn__pprrooxxyy (session_proxy const&);
│ │ │ │ +};
│ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ +********** sseessssiioonn__pprrooxxyy(()) ooppeerraattoorr==(()) ~~sseessssiioonn__pprrooxxyy(()) **********
│ │ │ │ +sseessssiioonn__pprrooxxyy ();
│ │ │ │ +session_proxy& ooppeerraattoorr== (session_proxy const&) &;
│ │ │ │ +sseessssiioonn__pprrooxxyy (session_proxy&&) noexcept;
│ │ │ │ +session_proxy& ooppeerraattoorr== (session_proxy&&) & noexcept;
│ │ │ │ +~~sseessssiioonn__pprrooxxyy ();
│ │ │ │ +sseessssiioonn__pprrooxxyy (session_proxy const&);
│ │ │ │ +default constructor, does not refer to any _s_e_s_s_i_o_n implementation object.
│ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ +************ sseessssiioonn ************
│ │ │ │ +Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n_._h_p_p"
│ │ │ │ +The _s_e_s_s_i_o_n holds all state that spans multiple torrents. Among other things it
│ │ │ │ +runs the network loop and manages all torrents. Once it's created, the _s_e_s_s_i_o_n
│ │ │ │ +object will spawn the main thread that will do all the work. The main thread
│ │ │ │ +will be idle as long it doesn't have any torrents to participate in.
│ │ │ │ +You have some control over _s_e_s_s_i_o_n configuration through the session_handle::
│ │ │ │ +apply_settings() member function. To change one or more configuration options,
│ │ │ │ +create a _s_e_t_t_i_n_g_s___p_a_c_k. object and fill it with the settings to be set and pass
│ │ │ │ +it in to session::apply_settings().
│ │ │ │ +see _a_p_p_l_y___s_e_t_t_i_n_g_s_(_).
│ │ │ │ +struct session : session_handle
│ │ │ │ +{
│ │ │ │ + sseessssiioonn ();
│ │ │ │ + sseessssiioonn (session_params&& params, session_flags_t flags);
│ │ │ │ + explicit sseessssiioonn (session_params&& params);
│ │ │ │ + sseessssiioonn (session_params const& params, session_flags_t flags);
│ │ │ │ + explicit sseessssiioonn (session_params const& params);
│ │ │ │ + sseessssiioonn (session_params const& params, io_context& ios, session_flags_t);
│ │ │ │ + sseessssiioonn (session_params&& params, io_context& ios);
│ │ │ │ + sseessssiioonn (session_params&& params, io_context& ios, session_flags_t);
│ │ │ │ + sseessssiioonn (session_params const& params, io_context& ios);
│ │ │ │ + ~~sseessssiioonn ();
│ │ │ │ + session_proxy aabboorrtt ();
│ │ │ │ +};
│ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ +********** sseessssiioonn(()) **********
│ │ │ │ +sseessssiioonn ();
│ │ │ │ +sseessssiioonn (session_params&& params, session_flags_t flags);
│ │ │ │ +explicit sseessssiioonn (session_params&& params);
│ │ │ │ +sseessssiioonn (session_params const& params, session_flags_t flags);
│ │ │ │ +explicit sseessssiioonn (session_params const& params);
│ │ │ │ +Constructs the _s_e_s_s_i_o_n objects which acts as the container of torrents. In
│ │ │ │ +order to avoid a race condition between starting the _s_e_s_s_i_o_n and configuring
│ │ │ │ +it, you can pass in a _s_e_s_s_i_o_n___p_a_r_a_m_s object. Its settings will take effect
│ │ │ │ +before the _s_e_s_s_i_o_n starts up.
│ │ │ │ +The overloads taking flags can be used to start a _s_e_s_s_i_o_n in paused mode (by
│ │ │ │ +passing in session::paused). Note that add_default_plugins do not have an
│ │ │ │ +affect on constructors that take a _s_e_s_s_i_o_n___p_a_r_a_m_s object. It already contains
│ │ │ │ +the plugins to use.
│ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ +********** sseessssiioonn(()) **********
│ │ │ │ +sseessssiioonn (session_params const& params, io_context& ios, session_flags_t);
│ │ │ │ +sseessssiioonn (session_params&& params, io_context& ios);
│ │ │ │ +sseessssiioonn (session_params&& params, io_context& ios, session_flags_t);
│ │ │ │ +sseessssiioonn (session_params const& params, io_context& ios);
│ │ │ │ +Overload of the constructor that takes an external io_context to run the
│ │ │ │ +_s_e_s_s_i_o_n object on. This is primarily useful for tests that may want to run
│ │ │ │ +multiple sessions on a single io_context, or low resource systems where
│ │ │ │ +additional threads are expensive and sharing an io_context with other events is
│ │ │ │ +fine.
│ │ │ │ +Warning
│ │ │ │ +The _s_e_s_s_i_o_n object does not cleanly terminate with an external io_context. The
│ │ │ │ +io_context::run() call mmuusstt have returned before it's safe to destruct the
│ │ │ │ +_s_e_s_s_i_o_n. Which means you MMUUSSTT call _s_e_s_s_i_o_n_:_:_a_b_o_r_t_(_) and save the _s_e_s_s_i_o_n___p_r_o_x_y
│ │ │ │ +first, then destruct the _s_e_s_s_i_o_n object, then sync with the io_context, then
│ │ │ │ +destruct the _s_e_s_s_i_o_n___p_r_o_x_y object.
│ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ +********** ~~sseessssiioonn(()) **********
│ │ │ │ +~~sseessssiioonn ();
│ │ │ │ +The destructor of _s_e_s_s_i_o_n will notify all trackers that our torrents have been
│ │ │ │ +shut down. If some trackers are down, they will time out. All this before the
│ │ │ │ +destructor of _s_e_s_s_i_o_n returns. So, it's advised that any kind of interface
│ │ │ │ +(such as windows) are closed before destructing the _s_e_s_s_i_o_n object. Because it
│ │ │ │ +can take a few second for it to finish. The timeout can be set with
│ │ │ │ +_a_p_p_l_y___s_e_t_t_i_n_g_s_(_).
│ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ +********** aabboorrtt(()) **********
│ │ │ │ +session_proxy aabboorrtt ();
│ │ │ │ +In case you want to destruct the _s_e_s_s_i_o_n asynchronously, you can request a
│ │ │ │ +_s_e_s_s_i_o_n destruction proxy. If you don't do this, the destructor of the _s_e_s_s_i_o_n
│ │ │ │ +object will block while the trackers are contacted. If you keep one
│ │ │ │ +session_proxy to the _s_e_s_s_i_o_n when destructing it, the destructor will not
│ │ │ │ +block, but start to close down the _s_e_s_s_i_o_n, the destructor of the proxy will
│ │ │ │ +then synchronize the threads. So, the destruction of the _s_e_s_s_i_o_n is performed
│ │ │ │ +from the session destructor call until the session_proxy destructor call. The
│ │ │ │ +session_proxy does not have any operations on it (since the _s_e_s_s_i_o_n is being
│ │ │ │ +closed down, no operations are allowed on it). The only valid operation is
│ │ │ │ +calling the destructor:
│ │ │ │ +struct session_proxy {};
│ │ │ │ +[_r_e_p_o_r_t_ _i_s_s_u_e]
│ │ │ │ +************ wwrriittee__sseessssiioonn__ppaarraammss(()) wwrriittee__sseessssiioonn__ppaarraammss__bbuuff(()) rreeaadd__sseessssiioonn__ppaarraammss(())
│ │ │ │ ************
│ │ │ │ Declared in "_l_i_b_t_o_r_r_e_n_t_/_s_e_s_s_i_o_n___p_a_r_a_m_s_._h_p_p"
│ │ │ │ -session_params rreeaadd__sseessssiioonn__ppaarraammss (bdecode_node const& e
│ │ │ │ - , save_state_flags_t flags = save_state_flags_t::all());
│ │ │ │ -entry wwrriittee__sseessssiioonn__ppaarraammss (session_params const& sp
│ │ │ │ +session_params rreeaadd__sseessssiioonn__ppaarraammss (span buf
│ │ │ │ , save_state_flags_t flags = save_state_flags_t::all());
│ │ │ │ std::vector wwrriittee__sseessssiioonn__ppaarraammss__bbuuff (session_params const& sp
│ │ │ │ , save_state_flags_t flags = save_state_flags_t::all());
│ │ │ │ -session_params rreeaadd__sseessssiioonn__ppaarraammss (span buf
│ │ │ │ +entry wwrriittee__sseessssiioonn__ppaarraammss (session_params const& sp
│ │ │ │ + , save_state_flags_t flags = save_state_flags_t::all());
│ │ │ │ +session_params rreeaadd__sseessssiioonn__ppaarraammss (bdecode_node const& e
│ │ │ │ , save_state_flags_t flags = save_state_flags_t::all());
│ │ │ │ These functions serialize and de-serialize a session_params object to and from
│ │ │ │ bencoded form. The _s_e_s_s_i_o_n___p_a_r_a_m_s object is used to initialize a new _s_e_s_s_i_o_n
│ │ │ │ using the state from a previous one (or by programmatically configure the
│ │ │ │ _s_e_s_s_i_o_n up-front). The flags parameter can be used to only save and load
│ │ │ │ certain aspects of the session's state. The _buf suffix indicates the function
│ │ │ │ operates on buffer rather than the bencoded structure. The torrents in a
│ │ ├── ./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
│ │ │ @@ -4598,24 +4598,24 @@
│ │ │