PyDocs

Nav

Networking and Interprocess Communication

loop.create_connection

asyncio

async methodnot WASI
  • loop.create_connection(protocol_factory, host=None, port=None, *, ssl=None, family=0, proto=0, flags=0, sock=None, local_addr=None, server_hostname=None, ssl_handshake_timeout=None, ssl_shutdown_timeout=None, happy_eyeballs_delay=None, interleave=None, all_errors=False)
Open a streaming transport connection to a given address specified by host and port.
Changed in 3.5, 3.6, 3.7, 3.8, 3.11, 3.12, 3.15
  • 3.5: Added support for SSL/TLS in ProactorEventLoop.
  • 3.6: The socket option socket.TCP_NODELAY is set by default for all TCP connections.
  • 3.7: Added the ssl_handshake_timeout parameter.
  • 3.8: Added the happy_eyeballs_delay and interleave parameters. Happy Eyeballs Algorithm: Success with Dual-Stack Hosts. When a server’s IPv4 path and protocol are working, but the server’s IPv6 path and protocol are not working, a dual-stack client application experiences significant connection delay compared to an IPv4-only client. This is undesirable because it causes the dual-stack client to have a worse user experience. This document specifies requirements for algorithms that reduce this user-visible delay and provides an algorithm. For more information: https://datatracker.ietf.org/doc/html/rfc6555
  • 3.11: Added the ssl_shutdown_timeout parameter.
  • 3.12: all_errors was added.
  • 3.15: Raises a ValueError if ssl.check_hostname is True and server_hostname is not supplied.
0 Examples
No examples for asyncio/loop.create_connection.
See Also
No see-alsos for asyncio/loop.create_connection
0 Notes
No notes for loop.create_connection