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:
Arvid Norberg
2008-09-21 23:19:58 +00:00
parent 13b343c1af
commit ea578a6acf
5 changed files with 197 additions and 59 deletions

View File

@@ -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);