made max half open connections default to 8 on windows and added query function for that limit on session.
This commit is contained in:
@@ -215,12 +215,18 @@ with the libtorrent package.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">pe-support</span></tt></td>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">openssl</span></tt></td>
|
||||
<td><ul class="first last simple">
|
||||
<li><tt class="docutils literal"><span class="pre">on</span></tt> - turns on support for encrypted
|
||||
<li><tt class="docutils literal"><span class="pre">pe</span></tt> - turns on support for encrypted
|
||||
connections. requires openssl (libcrypto)</li>
|
||||
<li><tt class="docutils literal"><span class="pre">sha-1</span></tt> - openssl will be used instead of the
|
||||
public domain SHA-1 implementation shipped with
|
||||
libtorrent. <tt class="docutils literal"><span class="pre">libcrypto.a</span></tt> will be required for
|
||||
linking. Encryption support is still turned off.</li>
|
||||
<li><tt class="docutils literal"><span class="pre">off</span></tt> - turns off support for encrypted
|
||||
connections. openssl is not linked in.</li>
|
||||
connections. openssl is not linked in. The
|
||||
shipped public domain SHA-1 implementation is
|
||||
used.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -254,18 +260,6 @@ information.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">openssl</span></tt></td>
|
||||
<td><ul class="first last simple">
|
||||
<li><tt class="docutils literal"><span class="pre">on</span></tt> - openssl will be used instead of the
|
||||
public domain SHA-1 implementation shipped with
|
||||
libtorrent. <tt class="docutils literal"><span class="pre">crypto.lib</span></tt> or <tt class="docutils literal"><span class="pre">libcrypto.a</span></tt>
|
||||
will be required for linking.</li>
|
||||
<li><tt class="docutils literal"><span class="pre">off</span></tt> - the shipped SHA-1 implementation will
|
||||
be used, and there will be no dependency on
|
||||
openssl.</li>
|
||||
</ul>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">character-set</span></tt></td>
|
||||
<td><p class="first">This setting will only have an affect on windows.
|
||||
Other platforms are expected to support UTF-8.</p>
|
||||
@@ -292,7 +286,8 @@ sure all build variants will actually compile), you can invoke this command:</p>
|
||||
<pre class="literal-block">
|
||||
bjam debug release link=shared link=static logging=verbose logging=default \
|
||||
logging=none dht-support=on dht-support=logging dht-support=off pe-support=on \
|
||||
pe-support=off zlib=shipped zlib=system
|
||||
pe-support=off zlib=shipped zlib=system openssl=on openssl=off \
|
||||
character-set=ansi character-set=unicode
|
||||
</pre>
|
||||
</div>
|
||||
</div>
|
||||
@@ -504,6 +499,13 @@ torrents will be disabled.</td>
|
||||
<td>This will enable verbose logging of the DHT
|
||||
protocol traffic.</td>
|
||||
</tr>
|
||||
<tr><td><tt class="docutils literal"><span class="pre">TORRENT_DISABLE_ENCRYPTION</span></tt></td>
|
||||
<td>This will disable any encryption support and
|
||||
the openssl dependency that comes with it.
|
||||
Encryption support is the peer connection
|
||||
encrypted supported by clients such as
|
||||
uTorrent, Azureus and KTorrent.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>If you experience that libtorrent uses unreasonable amounts of cpu, it will
|
||||
|
@@ -141,8 +141,8 @@ client than relying on the peer id encoding.</td>
|
||||
<td>A string containing the compact representation of the ip
|
||||
address this peer sees you as. i.e. this is the
|
||||
receiver's external ip address (no port is included).
|
||||
This may be both an IPv4 (4 bytes) or an IPv6 (16 bytes)
|
||||
address.</td>
|
||||
This may be either an IPv4 (4 bytes) or an IPv6
|
||||
(16 bytes) address.</td>
|
||||
</tr>
|
||||
<tr><td>reqq</td>
|
||||
<td>An integer, the number of outstanding request messages
|
||||
|
@@ -35,7 +35,7 @@
|
||||
<li><a class="reference" href="#set-upload-rate-limit-set-download-rate-limit-upload-rate-limit-download-rate-limit" id="id24" name="id24">set_upload_rate_limit() set_download_rate_limit() upload_rate_limit() download_rate_limit()</a></li>
|
||||
<li><a class="reference" href="#set-max-uploads-set-max-connections" id="id25" name="id25">set_max_uploads() set_max_connections()</a></li>
|
||||
<li><a class="reference" href="#num-uploads-num-connections" id="id26" name="id26">num_uploads() num_connections()</a></li>
|
||||
<li><a class="reference" href="#set-max-half-open-connections" id="id27" name="id27">set_max_half_open_connections()</a></li>
|
||||
<li><a class="reference" href="#set-max-half-open-connections-max-half-open-connections" id="id27" name="id27">set_max_half_open_connections() max_half_open_connections()</a></li>
|
||||
<li><a class="reference" href="#set-ip-filter" id="id28" name="id28">set_ip_filter()</a></li>
|
||||
<li><a class="reference" href="#status" id="id29" name="id29">status()</a></li>
|
||||
<li><a class="reference" href="#is-listening-listen-port-listen-on" id="id30" name="id30">is_listening() listen_port() listen_on()</a></li>
|
||||
@@ -272,6 +272,7 @@ class session: public boost::noncopyable
|
||||
void set_max_uploads(int limit);
|
||||
void set_max_connections(int limit);
|
||||
void set_max_half_open_connections(int limit);
|
||||
int max_half_open_connections() const;
|
||||
|
||||
void set_peer_proxy(proxy_settings const& s);
|
||||
void set_web_seed_proxy(proxy_settings const& s);
|
||||
@@ -477,10 +478,11 @@ int num_connections() const;
|
||||
(including half-open ones) respectively.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="set-max-half-open-connections" name="set-max-half-open-connections">set_max_half_open_connections()</a></h2>
|
||||
<h2><a id="set-max-half-open-connections-max-half-open-connections" name="set-max-half-open-connections-max-half-open-connections">set_max_half_open_connections() max_half_open_connections()</a></h2>
|
||||
<blockquote>
|
||||
<pre class="literal-block">
|
||||
void set_max_half_open_connections(int limit);
|
||||
int max_half_open_connections() const;
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>Sets the maximum number of half-open connections libtorrent will have when
|
||||
@@ -492,6 +494,8 @@ other network applications on that system. The default is to have no limit,
|
||||
and passing -1 as the limit, means to have no limit. When limiting the number
|
||||
of simultaneous connection attempts, peers will be put in a queue waiting for
|
||||
their turn to get connected.</p>
|
||||
<p><tt class="docutils literal"><span class="pre">max_half_open_connections()</span></tt> returns the set limit. This limit defaults
|
||||
to 8 on windows.</p>
|
||||
</div>
|
||||
<div class="section">
|
||||
<h2><a id="set-ip-filter" name="set-ip-filter">set_ip_filter()</a></h2>
|
||||
|
@@ -102,6 +102,7 @@ The ``session`` class has the following synopsis::
|
||||
void set_max_uploads(int limit);
|
||||
void set_max_connections(int limit);
|
||||
void set_max_half_open_connections(int limit);
|
||||
int max_half_open_connections() const;
|
||||
|
||||
void set_peer_proxy(proxy_settings const& s);
|
||||
void set_web_seed_proxy(proxy_settings const& s);
|
||||
@@ -323,12 +324,13 @@ Returns the number of currently unchoked peers and the number of connections
|
||||
(including half-open ones) respectively.
|
||||
|
||||
|
||||
set_max_half_open_connections()
|
||||
-------------------------------
|
||||
set_max_half_open_connections() max_half_open_connections()
|
||||
-----------------------------------------------------------
|
||||
|
||||
::
|
||||
|
||||
void set_max_half_open_connections(int limit);
|
||||
int max_half_open_connections() const;
|
||||
|
||||
Sets the maximum number of half-open connections libtorrent will have when
|
||||
connecting to peers. A half-open connection is one where connect() has been
|
||||
@@ -340,6 +342,9 @@ and passing -1 as the limit, means to have no limit. When limiting the number
|
||||
of simultaneous connection attempts, peers will be put in a queue waiting for
|
||||
their turn to get connected.
|
||||
|
||||
``max_half_open_connections()`` returns the set limit. This limit defaults
|
||||
to 8 on windows.
|
||||
|
||||
|
||||
set_ip_filter()
|
||||
---------------
|
||||
|
Reference in New Issue
Block a user