summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-stream.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/asyncio-stream.rst')
-rw-r--r--Doc/library/asyncio-stream.rst16
1 files changed, 8 insertions, 8 deletions
diff --git a/Doc/library/asyncio-stream.rst b/Doc/library/asyncio-stream.rst
index 3809d94..22b7341 100644
--- a/Doc/library/asyncio-stream.rst
+++ b/Doc/library/asyncio-stream.rst
@@ -9,7 +9,7 @@ Streams (high-level API)
Stream functions
================
-.. function:: open_connection(host=None, port=None, \*, loop=None, limit=None, **kwds)
+.. coroutinefunction:: open_connection(host=None, port=None, \*, loop=None, limit=None, \*\*kwds)
A wrapper for :meth:`~BaseEventLoop.create_connection()` returning a (reader,
writer) pair.
@@ -32,7 +32,7 @@ Stream functions
This function is a :ref:`coroutine <coroutine>`.
-.. function:: start_server(client_connected_cb, host=None, port=None, \*, loop=None, limit=None, **kwds)
+.. coroutinefunction:: start_server(client_connected_cb, host=None, port=None, \*, loop=None, limit=None, \*\*kwds)
Start a socket server, with a callback for each client connected. The return
value is the same as :meth:`~BaseEventLoop.create_server()`.
@@ -56,7 +56,7 @@ Stream functions
This function is a :ref:`coroutine <coroutine>`.
-.. function:: open_unix_connection(path=None, \*, loop=None, limit=None, **kwds)
+.. coroutinefunction:: open_unix_connection(path=None, \*, loop=None, limit=None, **kwds)
A wrapper for :meth:`~BaseEventLoop.create_unix_connection()` returning
a (reader, writer) pair.
@@ -68,7 +68,7 @@ Stream functions
Availability: UNIX.
-.. function:: start_unix_server(client_connected_cb, path=None, \*, loop=None, limit=None, **kwds)
+.. coroutinefunction:: start_unix_server(client_connected_cb, path=None, \*, loop=None, limit=None, **kwds)
Start a UNIX Domain Socket server, with a callback for each client connected.
@@ -106,7 +106,7 @@ StreamReader
Set the transport.
- .. method:: read(n=-1)
+ .. coroutinemethod:: read(n=-1)
Read up to *n* bytes. If *n* is not provided, or set to ``-1``,
read until EOF and return all read bytes.
@@ -116,7 +116,7 @@ StreamReader
This method is a :ref:`coroutine <coroutine>`.
- .. method:: readline()
+ .. coroutinemethod:: readline()
Read one line, where "line" is a sequence of bytes ending with ``\n``.
@@ -128,7 +128,7 @@ StreamReader
This method is a :ref:`coroutine <coroutine>`.
- .. method:: readexactly(n)
+ .. coroutinemethod:: readexactly(n)
Read exactly *n* bytes. Raise an :exc:`IncompleteReadError` if the end of
the stream is reached before *n* can be read, the
@@ -168,7 +168,7 @@ StreamWriter
Close the transport: see :meth:`BaseTransport.close`.
- .. method:: drain()
+ .. coroutinemethod:: drain()
Let the write buffer of the underlying transport a chance to be flushed.