asyncio.AbstractEventLoop.sock_accept()

coroutine AbstractEventLoop.sock_accept(sock)

Accept a connection. Modeled after blocking socket.socket.accept().

The socket must be bound to an address and listening for connections. The return value is a pair (conn, address) where conn is a new socket object usable to send and receive data on the connection, and address is the address bound to the socket on the other end of the connection.

The socket sock must be non-blocking.

This method is a coroutine.

See also

AbstractEventLoop.create_server() and start_server().

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

Please login to continue.