diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2015-02-12 21:49:18 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2015-02-12 21:49:18 (GMT) |
commit | bdd574d09a834f4b9935d91fe9d16a0d4a56d846 (patch) | |
tree | fc8a317993cf8681d13318e8ea7443cd46abbba1 /Doc/library/asyncio-stream.rst | |
parent | 3d6c784371bccc2407048652bce50c5bccf9b1af (diff) | |
download | cpython-bdd574d09a834f4b9935d91fe9d16a0d4a56d846.zip cpython-bdd574d09a834f4b9935d91fe9d16a0d4a56d846.tar.gz cpython-bdd574d09a834f4b9935d91fe9d16a0d4a56d846.tar.bz2 |
asyncio doc: annotate coroutine on coroutine functions and methods
Diffstat (limited to 'Doc/library/asyncio-stream.rst')
-rw-r--r-- | Doc/library/asyncio-stream.rst | 16 |
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. |