Skip to content

Commit

Permalink
Fix up a number of function signatures in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
bmerry committed Sep 25, 2020
1 parent 28ddb48 commit 39b389d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions doc/py-inproc.rst
Expand Up @@ -45,15 +45,15 @@ Sending
:param thread_pool: Thread pool handling the I/O
:type thread_pool: :py:class:`spead2.ThreadPool`
:param queues: Queues holding the generated packets (one per substream).
:type queue: List[:py:class:`spead2.InprocQueue`]
:type queues: List[:py:class:`spead2.InprocQueue`]
:param config: Stream configuration
:type config: :py:class:`spead2.send.StreamConfig`

.. py:attribute:: queues
Get the queues passed to the constructor.

.. autoclass:: spead2.send.asyncio.InprocStream(thread_pool, queue, config)
.. autoclass:: spead2.send.asyncio.InprocStream(thread_pool, queues, config)

An asynchronous version of :py:class:`spead2.send.InprocStream`. Refer to
:ref:`asynchronous-send` for general details about asynchronous transport.
Expand Down
10 changes: 7 additions & 3 deletions doc/py-send.rst
Expand Up @@ -241,12 +241,16 @@ Because spead2 was originally designed for UDP, the default packet size in
:py:class:`~spead2.send.StreamConfig` is quite small. Performance can be improved by
increasing it (but be sure the receiver is configured to handle larger packets).

.. py:class:: spead2.send.TcpStream(thread_pool, hostname, port, config=spead2.send.StreamConfig(), buffer_size=DEFAULT_BUFFER_SIZE, interface_address='')
TCP/IP is also a connection-oriented protocol, and does not support substreams. The
`endpoints` must therefore contain exactly one endpoint (it takes a list for
consistency with :class:`~spead2.send.UdpStream`).

.. py:class:: spead2.send.TcpStream(thread_pool, endpoints, config=spead2.send.StreamConfig(), buffer_size=DEFAULT_BUFFER_SIZE, interface_address='')
:param thread_pool: Thread pool handling the I/O
:type thread_pool: :py:class:`spead2.ThreadPool`
:param str hostname: Peer hostname
:param int port: Peer port
:param endpoints: Peer endpoint (must contain exactly one element).
:type endpoints: List[Tuple[str, int]]
:param config: Stream configuration
:type config: :py:class:`spead2.send.StreamConfig`
:param int buffer_size: Socket buffer size. A warning is logged if this
Expand Down
8 changes: 3 additions & 5 deletions spead2/send/asyncio.py
Expand Up @@ -95,10 +95,8 @@ async def async_flush(self):
----------
thread_pool : :py:class:`spead2.ThreadPool`
Thread pool handling the I/O
hostname : str
Peer hostname
port : int
Peer port
endpoints : List[Tuple[str, int]]
Peer endpoints (one per substreams).
config : :py:class:`spead2.send.StreamConfig`
Stream configuration
buffer_size : int
Expand Down Expand Up @@ -167,7 +165,7 @@ def callback(arg):
----------
thread_pool : :py:class:`spead2.ThreadPool`
Thread pool handling the I/O
queue : :py:class:`spead2.InprocQueue`
queues : List[:py:class:`spead2.InprocQueue`]
Queue holding the data in flight
config : :py:class:`spead2.send.StreamConfig`
Stream configuration
Expand Down

0 comments on commit 39b389d

Please sign in to comment.