mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
ayncio, Tulip issue 129: BaseEventLoop.sock_connect() now raises an error if
the address is not resolved (hostname instead of an IP address) for AF_INET and AF_INET6 address families.
This commit is contained in:
parent
2303fecedc
commit
1b0580b320
5 changed files with 59 additions and 13 deletions
|
@ -366,6 +366,12 @@ Low-level socket operations
|
|||
|
||||
Connect to a remote socket at *address*.
|
||||
|
||||
The *address* must be already resolved to avoid the trap of hanging the
|
||||
entire event loop when the address requires doing a DNS lookup. For
|
||||
example, it must be an IP address, not an hostname, for
|
||||
:py:data:`~socket.AF_INET` and :py:data:`~socket.AF_INET6` address families.
|
||||
Use :meth:`getaddrinfo` to resolve the hostname asynchronously.
|
||||
|
||||
This method returns a :ref:`coroutine object <coroutine>`.
|
||||
|
||||
.. seealso::
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue