• Home
  • Raw
  • Download

Lines Matching +full:srv +full:- +full:ipv6 +full:- +full:single +full:- +full:target

4 .. _asyncio-event-loop:
13 ------------------------------------
21 Application developers should typically use the high-level asyncio functions,
24 of lower-level code, libraries, and frameworks, who need finer control over
29 The following low-level functions can be used to get, set, or create
58 As noted above, consider using the higher-level :func:`asyncio.run` function,
63 In Python versions 3.10.0--3.10.8 and 3.11.0 this function
82 :ref:`setting a custom event loop policy <asyncio-policies>`.
106 .. _asyncio-event-loop-methods:
111 Event loops have **low-level** APIs for the following:
222 The optional keyword-only *context* argument specifies a
226 Unlike :meth:`call_soon_threadsafe`, this method is not thread-safe.
230 A thread-safe variant of :meth:`call_soon`. When scheduling callbacks from
232 thread-safe.
238 See the :ref:`concurrency and multithreading <asyncio-multithreading>`
242 The *context* keyword-only parameter was added. See :pep:`567`
245 .. _asyncio-pass-keywords:
261 .. _asyncio-delayed-calls:
287 An optional keyword-only *context* argument allows specifying a
292 The *context* keyword-only parameter was added. See :pep:`567`
312 The *context* keyword-only parameter was added. See :pep:`567`
343 third-party event loops provide alternative implementations of
353 Third-party event loops can use their own subclass of :class:`Task`
360 An optional keyword-only *context* argument allows specifying a
379 must return a :class:`asyncio.Future`-compatible object.
407 :ref:`asyncio protocol <asyncio-protocol>` implementation.
414 #. The connection is established and a :ref:`transport <asyncio-transport>`
418 return a :ref:`protocol <asyncio-protocol>` instance.
425 The created transport is an implementation-dependent bidirectional
436 .. seealso:: :ref:`SSL/TLS security considerations <ssl-security>`
438 * *server_hostname* sets or overrides the hostname that the target
444 risk, allowing for potential man-in-the-middle attacks).
453 be a floating-point number representing the amount of time in seconds
509 Happy Eyeballs Algorithm: Success with Dual-Stack Hosts.
511 IPv6 path and protocol are not working, a dual-stack client
513 IPv4-only client. This is undesirable because it causes the
514 dual-stack client to have a worse user experience. This document
515 specifies requirements for algorithms that reduce this user-visible
526 The :func:`open_connection` function is a high-level alternative
545 :ref:`protocol <asyncio-protocol>` implementation.
584 See :ref:`UDP echo client protocol <asyncio-udp-echo-client-protocol>` and
585 :ref:`UDP echo server protocol <asyncio-udp-echo-server-protocol>` examples.
637 The *path* parameter can now be a :term:`path-like object`.
665 :ref:`protocol <asyncio-protocol>` implementation.
670 - If *host* is a string, the TCP server is bound to a single network
673 - If *host* is a sequence of strings, the TCP server is bound to all
676 - If *host* is an empty string or ``None``, all interfaces are
678 one for IPv4 and another one for IPv6).
686 :data:`~socket.AF_INET6` to force the socket to use IPv4 or IPv6.
751 The :func:`start_server` function is a higher-level alternative API
797 :ref:`protocol <asyncio-protocol>` implementation.
841 The method uses high-performance :meth:`os.sendfile` if available.
870 Upgrade an existing transport-based connection to TLS.
873 and the *protocol*. The coder/decoder implements both *transport*-facing
874 protocol and *protocol*-facing transport.
876 Return the created two-interface instance. After *await*, the *protocol*
878 object only because the coder caches *protocol*-side data and sporadically
889 * *server_side* pass ``True`` when a server-side connection is being
892 * *server_hostname*: sets or overrides the host name that the target
932 <asyncio-pass-keywords>` to *callback*.
939 See also :ref:`Platform Support <asyncio-platform-support>` section
946 In general, protocol implementations that use transport-based APIs
960 *sock* must be a non-blocking socket.
974 *sock* must be a non-blocking socket.
985 *sock* must be a non-blocking socket.
997 *sock* must be a non-blocking socket.
1012 *sock* must be a non-blocking socket.
1027 *sock* must be a non-blocking socket.
1037 *sock* must be a non-blocking socket.
1063 *sock* must be a non-blocking socket.
1077 Send a file using high-performance :mod:`os.sendfile` if possible.
1082 *sock* must be a non-blocking :const:`socket.SOCK_STREAM`
1101 *sock* must be a non-blocking socket.
1133 :ref:`asyncio protocol <asyncio-protocol>` implementation.
1135 *pipe* is a :term:`file-like object <file object>`.
1142 non-blocking mode.
1149 :ref:`asyncio protocol <asyncio-protocol>` implementation.
1151 *pipe* is :term:`file-like object <file object>`.
1158 non-blocking mode.
1187 <asyncio-pass-keywords>` to *callback*.
1228 # CPU-bound operations will block the event loop:
1261 See :ref:`Safe importing of main module <multiprocessing-safe-main-import>`.
1266 <asyncio-pass-keywords>` to *func*.
1333 * 'protocol' (optional): :ref:`Protocol <asyncio-protocol>` instance;
1334 * 'transport' (optional): :ref:`Transport <asyncio-transport>` instance;
1353 :envvar:`PYTHONASYNCIODEBUG` is set to a non-empty string, ``False``
1367 The :ref:`debug mode of asyncio <asyncio-debug-mode>`.
1373 Methods described in this subsections are low-level. In regular
1374 async/await code consider using the high-level
1382 :ref:`Subprocess Support on Windows <asyncio-windows-subprocess>` for
1396 :ref:`filesystem encoding <filesystem-encoding>`.
1405 a single argument which is list of strings, *subprocess_exec*
1415 * a file-like object representing a pipe to be connected to the
1427 * a file-like object representing a pipe to be connected to the
1439 * a file-like object representing a pipe to be connected to the
1473 :ref:`filesystem encoding <filesystem-encoding>`,
1550 srv = await loop.create_server(...)
1552 async with srv:
1555 # At this point, srv is closed and no longer accepts new connections.
1585 The *start_serving* keyword-only parameter to
1612 srv = await asyncio.start_server(
1614 await srv.serve_forever()
1632 List of socket-like objects, ``asyncio.trsock.TransportSocket``, which
1641 .. _asyncio-event-loops:
1642 .. _asyncio-event-loop-implementations:
1685 <https://docs.microsoft.com/en-ca/windows/desktop/FileIO/i-o-completion-ports>`_.
1690 Abstract base class for asyncio-compliant event loops.
1692 The :ref:`asyncio-event-loop-methods` section lists all
1701 to use the low-level event loop APIs, such as :meth:`loop.run_forever`
1703 need to be written this way; consider using the high-level functions
1824 * Another similar :ref:`example <asyncio_example_create_connection-streams>`
1825 using the high-level :func:`asyncio.open_connection` function