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)
|
||||
* 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
|
||||
torrents
|
||||
|
||||
|
|
|
@ -664,6 +664,7 @@ void bind_session()
|
|||
)
|
||||
.def("is_dht_running", allow_threads(<::session::is_dht_running))
|
||||
.def("set_dht_settings", allow_threads(<::session::set_dht_settings))
|
||||
.def("get_dht_settings", allow_threads(<::session::get_dht_settings))
|
||||
#endif
|
||||
.def("add_torrent", &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("restrict_routing_ips", &dht_settings::restrict_routing_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
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ namespace libtorrent
|
|||
}
|
||||
start(flags, pack);
|
||||
}
|
||||
|
||||
|
||||
// The destructor of session 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 session returns. So, it's advised
|
||||
|
@ -534,8 +534,11 @@ namespace libtorrent
|
|||
// ``is_dht_running()`` returns true if the DHT support has been started
|
||||
// and false
|
||||
// otherwise.
|
||||
//
|
||||
// ``get_dht_settings()`` returns the current settings
|
||||
void set_dht_settings(dht_settings const& settings);
|
||||
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
|
||||
// pinged, and if a valid DHT reply is received, the node will be added to
|
||||
|
|
|
@ -1498,7 +1498,7 @@ namespace libtorrent
|
|||
, block_timeout(5 * 60)
|
||||
, block_ratelimit(5)
|
||||
{}
|
||||
|
||||
|
||||
// the maximum number of peers to send in a reply to ``get_peers``
|
||||
int max_peers_reply;
|
||||
|
||||
|
@ -1506,13 +1506,13 @@ namespace libtorrent
|
|||
// announcing and refreshing the routing table. This parameter is called
|
||||
// alpha in the kademlia paper
|
||||
int search_branching;
|
||||
|
||||
|
||||
#ifndef TORRENT_NO_DEPRECATE
|
||||
// the listen port for the dht. This is a UDP port. zero means use the
|
||||
// same as the tcp interface
|
||||
int service_port;
|
||||
#endif
|
||||
|
||||
|
||||
// the maximum number of failed tries to contact a node before it is
|
||||
// removed from the routing table. If there are known working nodes that
|
||||
// are ready to replace a failing node, it will be replaced immediately,
|
||||
|
|
|
@ -816,6 +816,16 @@ namespace libtorrent
|
|||
#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
|
||||
void session::start_dht(entry const& startup_state)
|
||||
{
|
||||
|
@ -833,7 +843,7 @@ namespace libtorrent
|
|||
#endif
|
||||
}
|
||||
#endif // TORRENT_NO_DEPRECATE
|
||||
|
||||
|
||||
void session::add_dht_node(std::pair<std::string, int> const& node)
|
||||
{
|
||||
#ifndef TORRENT_DISABLE_DHT
|
||||
|
|
Loading…
Reference in New Issue