diff options
| author | Victor Stinner <victor.stinner@gmail.com> | 2014-02-02 15:03:02 +0100 |
|---|---|---|
| committer | Victor Stinner <victor.stinner@gmail.com> | 2014-02-02 15:03:02 +0100 |
| commit | 9592edb834cdbf3d222f65b8c37e431c87be1792 (patch) | |
| tree | b98437c1a2e097c1fdf15a56c59b116bca0edcb4 /Doc/library/asyncio-protocol.rst | |
| parent | 2315779c5ec23145ed2420f94b05de700cf65c1f (diff) | |
| download | cpython-git-9592edb834cdbf3d222f65b8c37e431c87be1792.tar.gz | |
asyncio doc: add "asyncio-" prefix to references
Diffstat (limited to 'Doc/library/asyncio-protocol.rst')
| -rw-r--r-- | Doc/library/asyncio-protocol.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst index 8eb1d680fb..5fcce940e4 100644 --- a/Doc/library/asyncio-protocol.rst +++ b/Doc/library/asyncio-protocol.rst @@ -4,7 +4,7 @@ Transports and protocols (low-level API) +++++++++++++++++++++++++++++++++++++++++ -.. _transport: +.. _asyncio-transport: Transports ========== @@ -16,7 +16,7 @@ which will create the transport and try to initiate the underlying communication channel, calling you back when it succeeds. Once the communication channel is established, a transport is always -paired with a :ref:`protocol <protocol>` instance. The protocol can +paired with a :ref:`protocol <asyncio-protocol>` instance. The protocol can then call the transport's methods for various purposes. :mod:`asyncio` currently implements transports for TCP, UDP, SSL, and @@ -228,14 +228,14 @@ BaseSubprocessTransport stop the subprocess. -.. _protocol: +.. _asyncio-protocol: Protocols ========= :mod:`asyncio` provides base classes that you can subclass to implement your network protocols. Those classes are used in conjunction with -:ref:`transports <transport>` (see below): the protocol parses incoming +:ref:`transports <asyncio-transport>` (see below): the protocol parses incoming data and asks for the writing of outgoing data, while the transport is responsible for the actual I/O and buffering. @@ -410,7 +410,7 @@ Coroutines can be scheduled in a protocol method using :func:`async`, but there is not guarantee on the execution order. Protocols are not aware of coroutines created in protocol methods and so will not wait for them. -To have a reliable execution order, use :ref:`stream objects <streams>` in a +To have a reliable execution order, use :ref:`stream objects <asyncio-streams>` in a coroutine with ``yield from``. For example, the :meth:`StreamWriter.drain` coroutine can be used to wait until the write buffer is flushed. |
