asyncio.StreamReader.readline()

coroutine readline() Read one line, where “line” is a sequence of bytes ending with \n. If EOF is received, and \n was not found, the method will return the partial read bytes. If the EOF was received and the internal buffer is empty, return an empty bytes object. This method is a coroutine.

asyncio.StreamReader.set_exception()

set_exception(exc) Set the exception.

asyncio.StreamReader

class asyncio.StreamReader(limit=None, loop=None) This class is not thread safe. exception() Get the exception. feed_eof() Acknowledge the EOF. feed_data(data) Feed data bytes in the internal buffer. Any operations waiting for the data will be resumed. set_exception(exc) Set the exception. set_transport(transport) Set the transport. coroutine read(n=-1) Read up to n bytes. If n is not provided, or set to -1, read until EOF and return all read bytes. If the EO

asyncio.start_unix_server()

coroutine asyncio.start_unix_server(client_connected_cb, path=None, *, loop=None, limit=None, **kwds) Start a UNIX Domain Socket server, with a callback for each client connected. See start_server() for information about return value and other details. This function is a coroutine. Availability: UNIX.

asyncio.StreamReader.at_eof()

at_eof() Return True if the buffer is empty and feed_eof() was called.

asyncio.StreamReader.feed_eof()

feed_eof() Acknowledge the EOF.

asyncio.StreamReader.exception()

exception() Get the exception.

asyncio.StreamReader.feed_data()

feed_data(data) Feed data bytes in the internal buffer. Any operations waiting for the data will be resumed.

asyncio.shield()

asyncio.shield(arg, *, loop=None) Wait for a future, shielding it from cancellation. The statement: res = yield from shield(something()) is exactly equivalent to the statement: res = yield from something() except that if the coroutine containing it is cancelled, the task running in something() is not cancelled. From the point of view of something(), the cancellation did not happen. But its caller is still cancelled, so the yield-from expression still raises CancelledError. Note: If somethi

asyncio.set_event_loop()

asyncio.set_event_loop(loop) Equivalent to calling get_event_loop_policy().set_event_loop(loop).