added async_add_torrent for increased performance when adding many torrents (no documentation yet though)

This commit is contained in:
Arvid Norberg
2011-10-12 10:27:17 +00:00
parent 268ea59876
commit 01405f32ee
10 changed files with 100 additions and 19 deletions

View File

@@ -4251,6 +4251,17 @@ namespace aux {
return torrent_handle(find_torrent(info_hash));
}
void session_impl::async_add_torrent(add_torrent_params* params)
{
error_code ec;
torrent_handle handle = add_torrent(*params, ec);
m_alerts.post_alert(add_torrent_alert(handle, *params, ec));
delete params->resume_data;
free((char*)params->tracker_url);
free((char*)params->name);
delete params;
}
torrent_handle session_impl::add_torrent(add_torrent_params const& params
, error_code& ec)
{