(host=None, port=None, *,
                          limit=_DEFAULT_LIMIT, **kwds)
return reader, writer
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 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).

    (If you want to customize the StreamReader and/or
    StreamReaderProtocol classes, just copy the code -- there's
    really nothing special here except some convenience.)
A wrapper for create_connection() returning a (reader, writer) pair.
A wrapper for create_connection () returning a ( reader writer ) pair .
async def open_connection(host=None, port=None, *,
                          limit=_DEFAULT_LIMIT, **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 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).

    (If you want to customize the StreamReader and/or
    StreamReaderProtocol classes, just copy the code -- there's
    really nothing special here except some convenience.)
    """
    loop = events.get_running_loop()
    reader = StreamReader(limit=limit, loop=loop)
    protocol = StreamReaderProtocol(reader, loop=loop)
    transport, _ = await loop.create_connection(
        lambda: protocol, host, port, **kwds)
    writer = StreamWriter(transport, protocol, reader, loop)
    return reader, writer
async def open_connection ( host = None , port = None , * , limit = _DEFAULT_LIMIT , * * kwds ) : loop = events . get_running_loop ( ) reader = StreamReader ( limit = limit , loop = loop ) protocol = StreamReaderProtocol ( reader , loop = loop ) transport , _ = await loop . create_connection ( lambda : protocol , host , port , * * kwds ) writer = StreamWriter ( transport , protocol , reader , loop ) return reader , writer