asyncio.AbstractEventLoop.sock_connect()

coroutine AbstractEventLoop.sock_connect(sock, address)

Connect to a remote socket at address. Modeled after blocking socket.socket.connect() method.

With SelectorEventLoop event loop, the socket sock must be non-blocking.

This method is a coroutine.

Changed in version 3.5.2: address no longer needs to be resolved. sock_connect will try to check if the address is already resolved by calling socket.inet_pton(). If not, AbstractEventLoop.getaddrinfo() will be used to resolve the address.

See also

AbstractEventLoop.create_connection() and asyncio.open_connection().

doc_python
2016-10-07 17:26:34
Comments
Leave a Comment

Please login to continue.