asyncio.open_connection()

coroutine asyncio.open_connection(host=None, port=None, *, loop=None, limit=None, **kwds)

A wrapper for create_connection() returning a (reader, writer) pair.

The reader returned is a StreamReader instance; the writer is a StreamWriter instance.

The arguments are all the usual arguments to AbstractEventLoop.create_connection() except protocol_factory; most common are positional host and port, with various optional keyword arguments following.

Additional optional keyword arguments are loop (to set the event loop instance to use) and limit (to set the buffer limit passed to the StreamReader).

This function is a coroutine.

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

Please login to continue.