Skip to content

Commit

Permalink
cmd-ref: Update some commands, mostly networking (closes #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
kannibalox authored and pyroscope committed Mar 26, 2017
1 parent 76a083c commit 718668b
Show file tree
Hide file tree
Showing 2 changed files with 103 additions and 11 deletions.
23 changes: 23 additions & 0 deletions docs/include-cmd-items.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
`d.*` commands
^^^^^^^^^^^^^^^^^^^^^^^^^^

All `d.*` commands take an info hash as the first argument when called over the XMLRPC API.

.. code-block:: ini
d.name = ‹hash› ≫ 0
.. glossary::

d.accepting_seeders
Expand All @@ -13,7 +19,18 @@
d.bitfield
d.bytes_done
d.check_hash

**TODO**

d.chunk_size

Returns the chunk size of the item (also known as the
"peice size") in bytes.

.. code-block:: ini
d.chunk_size = ‹hash› ≫ 0
d.chunks_hashed
d.chunks_seen
d.close
Expand Down Expand Up @@ -109,7 +126,13 @@
d.priority_str
d.ratio
d.resume

**TODO**

d.save_full_session

Flushes the item's state to files in the session directory (if enabled).

d.save_resume
d.size_bytes
d.size_chunks
Expand Down
91 changes: 80 additions & 11 deletions docs/include-cmd-network.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,29 @@
network.http.dns_cache_timeout
network.http.dns_cache_timeout.set

**TODO**
.. code-block:: ini
network.http.dns_cache_timeout.set = ‹seconds› ≫ 0
network.http.dns_cache_timeout ≫ ‹seconds›
Controls the `DNS cache expiry <https://curl.haxx.se/libcurl/c/CURLOPT_DNS_CACHE_TIMEOUT.html>`_ (in seconds) for HTTP requests. The default is 60 seconds.
Set to zero to completely disable caching, or set to -1 to
make the cached entries remain forever.

network.http.current_open
network.http.max_open
network.http.max_open.set

**TODO**
.. code-block:: ini
network.http.max_open.set = ‹max› ≫ 0
network.http.max_open ≫ ‹max›
network.http.current_open ≫ ‹num›
Commands to control the amount of simultaneous HTTP connections
rTorrent will generate, while ``network.http.current_open`` will return the number of
current open connections. Be wary of setting this too high, as even if your connection can support
that many requests, the target host may not be able to respond quickly enough, leading to timeouts.

network.http.proxy_address
network.http.proxy_address.set
Expand Down Expand Up @@ -78,33 +94,87 @@

network.receive_buffer.size
network.receive_buffer.size.set
network.send_buffer.size
network.send_buffer.size.set

**TODO**
.. code-block:: ini
network.receive_buffer.size ≫ ‹size›
network.receive_buffer.size.set = ‹size› ≫ 0
network.send_buffer.size ≫ ‹size›
network.send_buffer.size.set = ‹size› ≫ 0
Sets or gets the maximum socket receive/send buffer in bytes.
On Linux, the default buffer size for receives is set by the /proc/sys/net/core/rmem_default file (wmem_default for sends),
and the maximum allowed value is set by the /proc/sys/net/core/rmem_max file (wmem_max for sends).
See the `tuning guide <https://github.com/rakshasa/rtorrent/wiki/Performance-Tuning#networking-tweaks>`_ for possible tweaks to these values

network.scgi.dont_route
network.scgi.dont_route.set

**TODO**
.. code-block:: ini
network.scgi.dont_route ≫ ‹bool›
network.scgi.dont_route.set = ‹bool› ≫ 0
Enable / disable routing on SCGI connections. ``bool`` is actually either ``1`` or ``0``.
This directly calls `setsockopt <https://linux.die.net/man/3/setsockopt>`_ to modify the SO_DONTROUTE flag.

network.scgi.open_local
network.scgi.open_port

**TODO**
.. code-block:: ini
network.send_buffer.size
network.send_buffer.size.set
network.scgi.open_local = ‹path› ≫ 0
network.scgi.open_port = ‹port› ≫ 0
**TODO**
Open up a port or Unix socket file for SCGI communication.

network.tos.set

**TODO**
.. code-block:: ini
network.tos.set = ‹flag› ≫ 0
Set the `type of service <https://en.wikipedia.org/wiki/Type_of_service>`_ flag to use in IP packets.
The options as pulled from :term:`strings.ip_tos` are:

- default
- lowdelay
- throughput
- reliability
- mincost

``default`` uses the system default setting. A raw hexadecimal value can also be passed in for custom flags.

network.xmlrpc.dialect.set

.. code-block:: ini
network.xmlrpc.dialect.set = ‹dialect_int› ≫ 0
Set the XMLRPC dialect to use. The ``dialect`` parameter corresponds to these values:

- 0: dialect_generic
- 1: dialect_i8
- 2: dialect_apache

``dialect_i8`` is the default value, which means the XMLRPC API
will use the `xmlrpc-c i8 extension type <http://xmlrpc-c.sourceforge.net/doc/libxmlrpc.html#extensiontype>`_ for returning integers.

See http://xmlrpc-c.sourceforge.net/doc/libgeneral.html#dialect for
more information on how xmlrpc-c handles dialects.

network.xmlrpc.size_limit
network.xmlrpc.size_limit.set

.. code-block:: ini
**TODO**
network.xmlrpc.size_limit = ≫ ‹bytes›
network.xmlrpc.size_limit.set = ‹bytes› ≫ 0
Set or return the maximum size of any XMLRPC requests in bytes.
Human-readable formats such as "2M" (for 2 mebibytes i.e. 2097152 bytes) are also allowd


The following are only available in *rTorrent-PS*!
Expand Down Expand Up @@ -175,5 +245,4 @@ The following are only available in *rTorrent-PS*!

**TODO**


.. END cmd-network

0 comments on commit 718668b

Please sign in to comment.