summaryrefslogtreecommitdiffstats
path: root/Doc/library/asyncio-protocol.rst
diff options
context:
space:
mode:
authorYury Selivanov <yury@magic.io>2018-09-17 19:35:24 (GMT)
committerGitHub <noreply@github.com>2018-09-17 19:35:24 (GMT)
commit394374e30c85f6eacddbbfc7471aab62b54ce021 (patch)
tree8f40e320a7eb6093fcee25d3cd8456a3ccf1bb9f /Doc/library/asyncio-protocol.rst
parentc6fd1c1c3a65217958b68df3a4991e4f306e9b7d (diff)
downloadcpython-394374e30c85f6eacddbbfc7471aab62b54ce021.zip
cpython-394374e30c85f6eacddbbfc7471aab62b54ce021.tar.gz
cpython-394374e30c85f6eacddbbfc7471aab62b54ce021.tar.bz2
bpo-33649: Add low-level APIs index. (GH-9364)
Diffstat (limited to 'Doc/library/asyncio-protocol.rst')
-rw-r--r--Doc/library/asyncio-protocol.rst15
1 files changed, 9 insertions, 6 deletions
diff --git a/Doc/library/asyncio-protocol.rst b/Doc/library/asyncio-protocol.rst
index e4aed64..cb16acd 100644
--- a/Doc/library/asyncio-protocol.rst
+++ b/Doc/library/asyncio-protocol.rst
@@ -707,7 +707,7 @@ factories passed to the :meth:`loop.subprocess_exec` and
Examples
========
-.. _asyncio-tcp-echo-server-protocol:
+.. _asyncio_example_tcp_echo_server_protocol:
TCP Echo Server
---------------
@@ -756,7 +756,7 @@ received data, and close the connection::
The :ref:`TCP echo server using streams <asyncio-tcp-echo-server-streams>`
example uses the high-level :func:`asyncio.start_server` function.
-.. _asyncio-tcp-echo-client-protocol:
+.. _asyncio_example_tcp_echo_client_protocol:
TCP Echo Client
---------------
@@ -914,7 +914,7 @@ method, sends data and closes the transport when it receives the answer::
asyncio.run(main())
-.. _asyncio-register-socket:
+.. _asyncio_example_create_connection:
Connecting Existing Sockets
---------------------------
@@ -973,14 +973,14 @@ Wait until a socket receives data using the
.. seealso::
The :ref:`watch a file descriptor for read events
- <asyncio-watch-read-event>` example uses the low-level
+ <asyncio_example_watch_fd>` example uses the low-level
:meth:`loop.add_reader` method to register an FD.
The :ref:`register an open socket to wait for data using streams
- <asyncio-register-socket-streams>` example uses high-level streams
+ <asyncio_example_create_connection-streams>` example uses high-level streams
created by the :func:`open_connection` function in a coroutine.
-.. _asyncio-subprocess-proto-example:
+.. _asyncio_example_subprocess_proto:
loop.subprocess_exec() and SubprocessProtocol
---------------------------------------------
@@ -1037,3 +1037,6 @@ The subprocess is created by th :meth:`loop.subprocess_exec` method::
date = asyncio.run(get_date())
print(f"Current date: {date}")
+
+See also the :ref:`same example <asyncio_example_create_subprocess_exec>`
+written using high-level APIs.