class asyncio.StreamReaderProtocol(stream_reader, client_connected_cb=None, loop=None)
Trivial helper class to adapt between Protocol
and StreamReader
. Subclass of Protocol
.
stream_reader is a StreamReader
instance, client_connected_cb is an optional function called with (stream_reader, stream_writer) when a connection is made, loop is the event loop instance to use.
(This is a helper class instead of making StreamReader
itself a Protocol
subclass, because the StreamReader
has other potential uses, and to prevent the user of the StreamReader
from accidentally calling inappropriate methods of the protocol.)
Please login to continue.