Example #1
0
	session_settings::session_settings(std::string const& user_agent_)
	{
		aux::session_settings def;
		initialize_default_settings(def);
		def.set_str(settings_pack::user_agent, user_agent_);
		load_struct_from_settings(def, *this);
	}
Example #2
0
	TORRENT_EXPORT session_settings high_performance_seed()
	{
		aux::session_settings def;
		initialize_default_settings(def);
		settings_pack pack;
		high_performance_seed(pack);
		apply_pack(&pack, def, nullptr);
		session_settings ret;
		load_struct_from_settings(def, ret);
		return ret;
	}
Example #3
0
	// this function returns a session_settings object
	// which will optimize libtorrent for minimum memory
	// usage, with no consideration of performance.
	TORRENT_EXPORT session_settings min_memory_usage()
	{
		aux::session_settings def;
		initialize_default_settings(def);
		settings_pack pack;
		min_memory_usage(pack);
		apply_pack(&pack, def, nullptr);
		session_settings ret;
		load_struct_from_settings(def, ret);
		return ret;
	}
	session_settings::session_settings(settings_pack const& p)
	{
		initialize_default_settings(*this);
		apply_pack(&p, *this);
	}
	session_settings::session_settings()
	{
		initialize_default_settings(*this);
	}