adds ut_pex, ut_metadata and smart_ban by default in session constructor. Also starts upnp and nat-pmp by default. Fixes #399
This commit is contained in:
@@ -155,6 +155,7 @@ namespace libtorrent
|
||||
|
||||
session(fingerprint const& print = fingerprint("LT"
|
||||
, LIBTORRENT_VERSION_MAJOR, LIBTORRENT_VERSION_MINOR, 0, 0)
|
||||
, int flags = start_default_features | add_default_plugins
|
||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
, fs::path logpath = "."
|
||||
#endif
|
||||
@@ -163,6 +164,7 @@ namespace libtorrent
|
||||
fingerprint const& print
|
||||
, std::pair<int, int> listen_port_range
|
||||
, char const* listen_interface = "0.0.0.0"
|
||||
, int flags = start_default_features | add_default_plugins
|
||||
#if defined TORRENT_VERBOSE_LOGGING || defined TORRENT_LOGGING || defined TORRENT_ERROR_LOGGING
|
||||
, fs::path logpath = "."
|
||||
#endif
|
||||
@@ -290,6 +292,12 @@ namespace libtorrent
|
||||
delete_files = 1
|
||||
};
|
||||
|
||||
enum session_flags_t
|
||||
{
|
||||
add_default_plugins = 1,
|
||||
start_default_features = 2
|
||||
};
|
||||
|
||||
void remove_torrent(const torrent_handle& h, int options = none);
|
||||
|
||||
void set_settings(session_settings const& s);
|
||||
|
Reference in New Issue
Block a user