forked from premiere/premiere-libtorrent
merged RC_1_0 into trunk
This commit is contained in:
parent
0aca01543b
commit
34f6b1ca19
|
@ -70,6 +70,8 @@
|
||||||
* almost completely changed the storage interface (for custom storage)
|
* almost completely changed the storage interface (for custom storage)
|
||||||
* added support for hashing pieces in multiple threads
|
* added support for hashing pieces in multiple threads
|
||||||
|
|
||||||
|
* expose missing dht_settings fields to python
|
||||||
|
* add function to query the DHT settings
|
||||||
* fix bug in 'dont_count_slow_torrents' feature, which would start too many
|
* fix bug in 'dont_count_slow_torrents' feature, which would start too many
|
||||||
torrents
|
torrents
|
||||||
|
|
||||||
|
|
|
@ -664,6 +664,7 @@ void bind_session()
|
||||||
)
|
)
|
||||||
.def("is_dht_running", allow_threads(<::session::is_dht_running))
|
.def("is_dht_running", allow_threads(<::session::is_dht_running))
|
||||||
.def("set_dht_settings", allow_threads(<::session::set_dht_settings))
|
.def("set_dht_settings", allow_threads(<::session::set_dht_settings))
|
||||||
|
.def("get_dht_settings", allow_threads(<::session::get_dht_settings))
|
||||||
#endif
|
#endif
|
||||||
.def("add_torrent", &add_torrent)
|
.def("add_torrent", &add_torrent)
|
||||||
.def("async_add_torrent", &async_add_torrent)
|
.def("async_add_torrent", &async_add_torrent)
|
||||||
|
|
|
@ -284,6 +284,12 @@ void bind_session_settings()
|
||||||
.def_readwrite("max_dht_items", &dht_settings::max_dht_items)
|
.def_readwrite("max_dht_items", &dht_settings::max_dht_items)
|
||||||
.def_readwrite("restrict_routing_ips", &dht_settings::restrict_routing_ips)
|
.def_readwrite("restrict_routing_ips", &dht_settings::restrict_routing_ips)
|
||||||
.def_readwrite("restrict_search_ips", &dht_settings::restrict_search_ips)
|
.def_readwrite("restrict_search_ips", &dht_settings::restrict_search_ips)
|
||||||
|
.def_readwrite("max_torrent_search_reply", &dht_settings::max_torrent_search_reply)
|
||||||
|
.def_readwrite("extended_routing_table", &dht_settings::extended_routing_table)
|
||||||
|
.def_readwrite("aggressive_lookups", &dht_settings::aggressive_lookups)
|
||||||
|
.def_readwrite("privacy_lookups", &dht_settings::privacy_lookups)
|
||||||
|
.def_readwrite("enforce_node_id", &dht_settings::enforce_node_id)
|
||||||
|
.def_readwrite("ignore_dark_internet", &dht_settings::ignore_dark_internet)
|
||||||
;
|
;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -534,8 +534,11 @@ namespace libtorrent
|
||||||
// ``is_dht_running()`` returns true if the DHT support has been started
|
// ``is_dht_running()`` returns true if the DHT support has been started
|
||||||
// and false
|
// and false
|
||||||
// otherwise.
|
// otherwise.
|
||||||
|
//
|
||||||
|
// ``get_dht_settings()`` returns the current settings
|
||||||
void set_dht_settings(dht_settings const& settings);
|
void set_dht_settings(dht_settings const& settings);
|
||||||
bool is_dht_running() const;
|
bool is_dht_running() const;
|
||||||
|
dht_settings get_dht_settings() const;
|
||||||
|
|
||||||
// ``add_dht_node`` takes a host name and port pair. That endpoint will be
|
// ``add_dht_node`` takes a host name and port pair. That endpoint will be
|
||||||
// pinged, and if a valid DHT reply is received, the node will be added to
|
// pinged, and if a valid DHT reply is received, the node will be added to
|
||||||
|
|
|
@ -816,6 +816,16 @@ namespace libtorrent
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dht_settings session::get_dht_settings() const
|
||||||
|
{
|
||||||
|
#ifndef TORRENT_DISABLE_DHT
|
||||||
|
return TORRENT_SYNC_CALL_RET(dht_settings, get_dht_settings);
|
||||||
|
#else
|
||||||
|
return dht_settings();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifndef TORRENT_NO_DEPRECATE
|
#ifndef TORRENT_NO_DEPRECATE
|
||||||
void session::start_dht(entry const& startup_state)
|
void session::start_dht(entry const& startup_state)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue