reflow some comments
This commit is contained in:
parent
cf16399346
commit
062e0f0510
|
@ -591,8 +591,9 @@ class session: public boost::noncopyable
|
||||||
void <strong>set_dht_settings</strong> (dht_settings const& settings);
|
void <strong>set_dht_settings</strong> (dht_settings const& settings);
|
||||||
void <strong>add_dht_router</strong> (std::pair<std::string, int> const& node);
|
void <strong>add_dht_router</strong> (std::pair<std::string, int> const& node);
|
||||||
void <strong>add_dht_node</strong> (std::pair<std::string, int> const& node);
|
void <strong>add_dht_node</strong> (std::pair<std::string, int> const& node);
|
||||||
|
void <strong>add_extension</strong> (boost::function<boost::shared_ptr<torrent_plugin>(
|
||||||
|
torrent*, void*)> ext);
|
||||||
void <strong>add_extension</strong> (boost::shared_ptr<plugin> ext);
|
void <strong>add_extension</strong> (boost::shared_ptr<plugin> ext);
|
||||||
void <strong>add_extension</strong> (boost::function<boost::shared_ptr<torrent_plugin>(torrent*, void*)> ext);
|
|
||||||
void <strong>load_country_db</strong> (char const* file);
|
void <strong>load_country_db</strong> (char const* file);
|
||||||
void <strong>load_asnum_db</strong> (char const* file);
|
void <strong>load_asnum_db</strong> (char const* file);
|
||||||
int <strong>as_for_ip</strong> (address const& addr);
|
int <strong>as_for_ip</strong> (address const& addr);
|
||||||
|
@ -979,14 +980,16 @@ for bootstrapping, to keep the load off them.</p>
|
||||||
<div class="section" id="add-extension">
|
<div class="section" id="add-extension">
|
||||||
<h2>add_extension()</h2>
|
<h2>add_extension()</h2>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
|
void <strong>add_extension</strong> (boost::function<boost::shared_ptr<torrent_plugin>(
|
||||||
|
torrent*, void*)> ext);
|
||||||
void <strong>add_extension</strong> (boost::shared_ptr<plugin> ext);
|
void <strong>add_extension</strong> (boost::shared_ptr<plugin> ext);
|
||||||
void <strong>add_extension</strong> (boost::function<boost::shared_ptr<torrent_plugin>(torrent*, void*)> ext);
|
|
||||||
</pre>
|
</pre>
|
||||||
<p>This function adds an extension to this <a class="reference external" href="reference-Session.html#session">session</a>. The argument is a function
|
<p>This function adds an extension to this <a class="reference external" href="reference-Session.html#session">session</a>. The argument is a
|
||||||
object that is called with a <tt class="docutils literal">torrent*</tt> and which should return a
|
function object that is called with a <tt class="docutils literal">torrent*</tt> and which should
|
||||||
<tt class="docutils literal"><span class="pre">boost::shared_ptr<torrent_plugin></span></tt>. To write custom plugins, see
|
return a <tt class="docutils literal"><span class="pre">boost::shared_ptr<torrent_plugin></span></tt>. To write custom
|
||||||
<a class="reference external" href="libtorrent_plugins.html">libtorrent plugins</a>. For the typical bittorrent client all of these
|
plugins, see <a class="reference external" href="libtorrent_plugins.html">libtorrent plugins</a>. For the typical bittorrent client
|
||||||
extensions should be added. The main plugins implemented in libtorrent are:</p>
|
all of these extensions should be added. The main plugins implemented
|
||||||
|
in libtorrent are:</p>
|
||||||
<dl class="docutils">
|
<dl class="docutils">
|
||||||
<dt>metadata extension</dt>
|
<dt>metadata extension</dt>
|
||||||
<dd>Allows peers to download the metadata (.torren files) from the swarm
|
<dd>Allows peers to download the metadata (.torren files) from the swarm
|
||||||
|
@ -1033,11 +1036,13 @@ void <strong>load_country_db</strong> (char const* file);
|
||||||
void <strong>load_asnum_db</strong> (char const* file);
|
void <strong>load_asnum_db</strong> (char const* file);
|
||||||
int <strong>as_for_ip</strong> (address const& addr);
|
int <strong>as_for_ip</strong> (address const& addr);
|
||||||
</pre>
|
</pre>
|
||||||
<p>These functions are not available if <tt class="docutils literal">TORRENT_DISABLE_GEO_IP</tt> is defined. They
|
<p>These functions are not available if <tt class="docutils literal">TORRENT_DISABLE_GEO_IP</tt> is
|
||||||
expects a path to the <a class="reference external" href="http://www.maxmind.com/app/asnum">MaxMind ASN database</a> and <a class="reference external" href="http://www.maxmind.com/app/geolitecountry">MaxMind GeoIP database</a>
|
defined. They expects a path to the <a class="reference external" href="http://www.maxmind.com/app/asnum">MaxMind ASN database</a> and
|
||||||
respectively. This will be used to look up which AS and country peers belong to.</p>
|
<a class="reference external" href="http://www.maxmind.com/app/geolitecountry">MaxMind GeoIP database</a> respectively. This will be used to look up
|
||||||
<p><tt class="docutils literal">as_for_ip</tt> returns the AS number for the IP address specified. If the IP is not
|
which AS and country peers belong to.</p>
|
||||||
in the database or the ASN database is not loaded, 0 is returned.</p>
|
<p><tt class="docutils literal">as_for_ip</tt> returns the AS number for the IP address specified. If
|
||||||
|
the IP is not in the database or the ASN database is not loaded, 0 is
|
||||||
|
returned.</p>
|
||||||
<a name="get_ip_filter()"></a>
|
<a name="get_ip_filter()"></a>
|
||||||
<a name="set_ip_filter()"></a></div>
|
<a name="set_ip_filter()"></a></div>
|
||||||
<div class="section" id="get-ip-filter-set-ip-filter">
|
<div class="section" id="get-ip-filter-set-ip-filter">
|
||||||
|
@ -1183,9 +1188,9 @@ void <strong>set_settings</strong> (session_settings const& s);
|
||||||
pe_settings <strong>get_pe_settings</strong> () const;
|
pe_settings <strong>get_pe_settings</strong> () const;
|
||||||
void <strong>set_pe_settings</strong> (pe_settings const& settings);
|
void <strong>set_pe_settings</strong> (pe_settings const& settings);
|
||||||
</pre>
|
</pre>
|
||||||
<p>Sets the <a class="reference external" href="reference-Session.html#session">session</a> settings and the packet encryption settings respectively.
|
<p>Sets the <a class="reference external" href="reference-Session.html#session">session</a> settings and the packet encryption settings
|
||||||
See <a class="reference external" href="reference-Settings.html#session_settings">session_settings</a> and <a class="reference external" href="reference-Settings.html#pe_settings">pe_settings</a> for more information on available
|
respectively. See <a class="reference external" href="reference-Settings.html#session_settings">session_settings</a> and <a class="reference external" href="reference-Settings.html#pe_settings">pe_settings</a> for more
|
||||||
options.</p>
|
information on available options.</p>
|
||||||
<a name="set_proxy()"></a>
|
<a name="set_proxy()"></a>
|
||||||
<a name="proxy()"></a></div>
|
<a name="proxy()"></a></div>
|
||||||
<div class="section" id="set-proxy-proxy">
|
<div class="section" id="set-proxy-proxy">
|
||||||
|
|
|
@ -511,11 +511,12 @@ namespace libtorrent
|
||||||
void start_dht(entry const& startup_state) TORRENT_DEPRECATED;
|
void start_dht(entry const& startup_state) TORRENT_DEPRECATED;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// This function adds an extension to this session. The argument is a function
|
// This function adds an extension to this session. The argument is a
|
||||||
// object that is called with a ``torrent*`` and which should return a
|
// function object that is called with a ``torrent*`` and which should
|
||||||
// ``boost::shared_ptr<torrent_plugin>``. To write custom plugins, see
|
// return a ``boost::shared_ptr<torrent_plugin>``. To write custom
|
||||||
// `libtorrent plugins`_. For the typical bittorrent client all of these
|
// plugins, see `libtorrent plugins`_. For the typical bittorrent client
|
||||||
// extensions should be added. The main plugins implemented in libtorrent are:
|
// all of these extensions should be added. The main plugins implemented
|
||||||
|
// in libtorrent are:
|
||||||
//
|
//
|
||||||
// metadata extension
|
// metadata extension
|
||||||
// Allows peers to download the metadata (.torren files) from the swarm
|
// Allows peers to download the metadata (.torren files) from the swarm
|
||||||
|
@ -555,15 +556,18 @@ namespace libtorrent
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// .. _`libtorrent plugins`: libtorrent_plugins.html
|
// .. _`libtorrent plugins`: libtorrent_plugins.html
|
||||||
void add_extension(boost::function<boost::shared_ptr<torrent_plugin>(torrent*, void*)> ext);
|
void add_extension(boost::function<boost::shared_ptr<torrent_plugin>(
|
||||||
|
torrent*, void*)> ext);
|
||||||
void add_extension(boost::shared_ptr<plugin> ext);
|
void add_extension(boost::shared_ptr<plugin> ext);
|
||||||
|
|
||||||
// These functions are not available if ``TORRENT_DISABLE_GEO_IP`` is defined. They
|
// These functions are not available if ``TORRENT_DISABLE_GEO_IP`` is
|
||||||
// expects a path to the `MaxMind ASN database`_ and `MaxMind GeoIP database`_
|
// defined. They expects a path to the `MaxMind ASN database`_ and
|
||||||
// respectively. This will be used to look up which AS and country peers belong to.
|
// `MaxMind GeoIP database`_ respectively. This will be used to look up
|
||||||
|
// which AS and country peers belong to.
|
||||||
//
|
//
|
||||||
// ``as_for_ip`` returns the AS number for the IP address specified. If the IP is not
|
// ``as_for_ip`` returns the AS number for the IP address specified. If
|
||||||
// in the database or the ASN database is not loaded, 0 is returned.
|
// the IP is not in the database or the ASN database is not loaded, 0 is
|
||||||
|
// returned.
|
||||||
//
|
//
|
||||||
// .. _`MaxMind ASN database`: http://www.maxmind.com/app/asnum
|
// .. _`MaxMind ASN database`: http://www.maxmind.com/app/asnum
|
||||||
// .. _`MaxMind GeoIP database`: http://www.maxmind.com/app/geolitecountry
|
// .. _`MaxMind GeoIP database`: http://www.maxmind.com/app/geolitecountry
|
||||||
|
@ -751,9 +755,9 @@ namespace libtorrent
|
||||||
// the torrent is deleted, a torrent_deleted_alert is posted.
|
// the torrent is deleted, a torrent_deleted_alert is posted.
|
||||||
void remove_torrent(const torrent_handle& h, int options = 0);
|
void remove_torrent(const torrent_handle& h, int options = 0);
|
||||||
|
|
||||||
// Sets the session settings and the packet encryption settings respectively.
|
// Sets the session settings and the packet encryption settings
|
||||||
// See session_settings and pe_settings for more information on available
|
// respectively. See session_settings and pe_settings for more
|
||||||
// options.
|
// information on available options.
|
||||||
void set_settings(session_settings const& s);
|
void set_settings(session_settings const& s);
|
||||||
session_settings settings() const;
|
session_settings settings() const;
|
||||||
void set_pe_settings(pe_settings const& settings);
|
void set_pe_settings(pe_settings const& settings);
|
||||||
|
|
Loading…
Reference in New Issue