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:
Victor Stinner 2014-02-13 09:24:37 +01:00
parent 2303fecedc
commit 1b0580b320
5 changed files with 59 additions and 13 deletions

View file

@ -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::