optimized session::add_torrent() by putting more info in torrent_info, to make it possible to reproduce the exact info section from an torrent_info object. The result is that the .torrent file is only parsed once.
This commit is contained in:
@@ -555,7 +555,7 @@ class session: public boost::noncopyable
|
||||
, const char* listen_interface = 0);
|
||||
|
||||
torrent_handle add_torrent(
|
||||
entry const& e
|
||||
torrent_info const& ti
|
||||
, boost::filesystem::path const& save_path
|
||||
, entry const& resume_data = entry()
|
||||
, bool compact_mode = true
|
||||
@@ -630,7 +630,7 @@ timeout can be set with <tt class="docutils literal"><span class="pre">set_http_
|
||||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
torrent_handle add_torrent(
|
||||
entry const& e
|
||||
torrent_info const& ti
|
||||
, boost::filesystem::path const& save_path
|
||||
, entry const& resume_data = entry()
|
||||
, bool compact_mode = true
|
||||
@@ -667,10 +667,10 @@ size is an even power of 2, so must the block size be. If the block size given h
|
||||
out to be greater than the piece size, it will simply be clamped to the piece size.</p>
|
||||
<p>The <a class="reference" href="#torrent-handle">torrent_handle</a> returned by <tt class="docutils literal"><span class="pre">add_torrent()</span></tt> can be used to retrieve information
|
||||
about the torrent's progress, its peers etc. It is also used to abort a torrent.</p>
|
||||
<p>The second overload that takes a tracker url and an info-hash instead of metadata (<tt class="docutils literal"><span class="pre">entry</span></tt>)
|
||||
can be used with torrents where (at least some) peers support the metadata extension. For
|
||||
the overload to be available, libtorrent must be built with extensions enabled
|
||||
(<tt class="docutils literal"><span class="pre">TORRENT_ENABLE_EXTENSIONS</span></tt> defined).</p>
|
||||
<p>The second overload that takes a tracker url and an info-hash instead of metadata
|
||||
(<tt class="docutils literal"><span class="pre">torrent_info</span></tt>) can be used with torrents where (at least some) peers support
|
||||
the metadata extension. For the overload to be available, libtorrent must be built
|
||||
with extensions enabled (<tt class="docutils literal"><span class="pre">TORRENT_ENABLE_EXTENSIONS</span></tt> defined).</p>
|
||||
</div>
|
||||
<div class="section" id="remove-torrent">
|
||||
<h2><a name="remove-torrent">remove_torrent()</a></h2>
|
||||
|
@@ -433,7 +433,7 @@ The ``session`` class has the following synopsis::
|
||||
, const char* listen_interface = 0);
|
||||
|
||||
torrent_handle add_torrent(
|
||||
entry const& e
|
||||
torrent_info const& ti
|
||||
, boost::filesystem::path const& save_path
|
||||
, entry const& resume_data = entry()
|
||||
, bool compact_mode = true
|
||||
@@ -512,7 +512,7 @@ add_torrent()
|
||||
::
|
||||
|
||||
torrent_handle add_torrent(
|
||||
entry const& e
|
||||
torrent_info const& ti
|
||||
, boost::filesystem::path const& save_path
|
||||
, entry const& resume_data = entry()
|
||||
, bool compact_mode = true
|
||||
@@ -554,10 +554,10 @@ out to be greater than the piece size, it will simply be clamped to the piece si
|
||||
The torrent_handle_ returned by ``add_torrent()`` can be used to retrieve information
|
||||
about the torrent's progress, its peers etc. It is also used to abort a torrent.
|
||||
|
||||
The second overload that takes a tracker url and an info-hash instead of metadata (``entry``)
|
||||
can be used with torrents where (at least some) peers support the metadata extension. For
|
||||
the overload to be available, libtorrent must be built with extensions enabled
|
||||
(``TORRENT_ENABLE_EXTENSIONS`` defined).
|
||||
The second overload that takes a tracker url and an info-hash instead of metadata
|
||||
(``torrent_info``) can be used with torrents where (at least some) peers support
|
||||
the metadata extension. For the overload to be available, libtorrent must be built
|
||||
with extensions enabled (``TORRENT_ENABLE_EXTENSIONS`` defined).
|
||||
|
||||
remove_torrent()
|
||||
----------------
|
||||
|
Reference in New Issue
Block a user