added session::is_dht_running
This commit is contained in:
parent
042e8ad011
commit
65eb4db727
|
@ -73,6 +73,7 @@
|
|||
* added ability to give seeding torrents preference to active slots
|
||||
* added torrent_status::finished_time
|
||||
* automatically caps files and connections by default to rlimit
|
||||
* added session::is_dht_running() function
|
||||
|
||||
release 0.14.7
|
||||
|
||||
|
|
|
@ -213,6 +213,7 @@ The ``session`` class has the following synopsis::
|
|||
, int> const& node);
|
||||
void add_dht_router(std::pair<std::string
|
||||
, int> const& node);
|
||||
bool is_dht_running() const;
|
||||
|
||||
void start_lsd();
|
||||
void stop_lsd();
|
||||
|
@ -1064,8 +1065,8 @@ are ``hostname`` and ``port``.
|
|||
.. _i2p: http://www.i2p2.de
|
||||
|
||||
|
||||
start_dht() stop_dht() set_dht_settings() dht_state()
|
||||
-----------------------------------------------------
|
||||
start_dht() stop_dht() set_dht_settings() dht_state() is_dht_running()
|
||||
----------------------------------------------------------------------
|
||||
|
||||
::
|
||||
|
||||
|
@ -1073,6 +1074,7 @@ start_dht() stop_dht() set_dht_settings() dht_state()
|
|||
void stop_dht();
|
||||
void set_dht_settings(dht_settings const& settings);
|
||||
entry dht_state() const;
|
||||
bool is_dht_running() const;
|
||||
|
||||
These functions are not available in case ``TORRENT_DISABLE_DHT`` is
|
||||
defined. ``start_dht`` starts the dht node and makes the trackerless service
|
||||
|
@ -1133,6 +1135,9 @@ that are ready to replace a failing node, it will be replaced immediately,
|
|||
this limit is only used to clear out nodes that don't have any node that can
|
||||
replace them.
|
||||
|
||||
``is_dht_running`` returns true if the DHT support has been started and false
|
||||
otherwise.
|
||||
|
||||
|
||||
add_dht_node() add_dht_router()
|
||||
-------------------------------
|
||||
|
|
|
@ -285,6 +285,7 @@ namespace libtorrent
|
|||
entry dht_state() const;
|
||||
void add_dht_node(std::pair<std::string, int> const& node);
|
||||
void add_dht_router(std::pair<std::string, int> const& node);
|
||||
bool is_dht_running() const;
|
||||
#endif
|
||||
|
||||
#ifndef TORRENT_DISABLE_ENCRYPTION
|
||||
|
|
|
@ -618,6 +618,12 @@ namespace libtorrent
|
|||
m_impl->add_dht_router(node);
|
||||
}
|
||||
|
||||
bool session::is_dht_running() const
|
||||
{
|
||||
mutex::scoped_lock l(m_impl->m_mutex);
|
||||
return m_impl->m_dht;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef TORRENT_DISABLE_ENCRYPTION
|
||||
|
|
Loading…
Reference in New Issue