class_docstr: Helper class to adapt between Protocol and StreamReader.
  
  (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 to accidentally
  call inappropriate methods of the protocol.)
class_docstr_tok: ["Helper","class","to","adapt","between","Protocol","and","StreamReader",".","(","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","to","accidentally","call","inappropriate","methods","of","the","protocol",".",")"]
code: def __init__(
      self, stream_reader, client_connected_cb=None, loop=None
  ):
      super().__init__(loop=loop)
      if stream_reader is not None:
          self._stream_reader_wr = weakref.ref(stream_reader)
          self._source_traceback = stream_reader._source_traceback
      else:
          self._stream_reader_wr = None
      if client_connected_cb is not None:
          # This is a stream created by the `create_server()` function.
          # Keep a strong reference to the reader until a connection
          # is established.
          self._strong_reader = stream_reader
      self._reject_connection = False
      self._stream_writer = None
      self._task = None
      self._transport = None
      self._client_connected_cb = client_connected_cb
      self._over_ssl = False
      self._closed = self._loop.create_future()
  
imports: import collections
  import socket
  import sys
  import warnings
  import weakref
  from .None import coroutines
  from .None import events
  from .None import exceptions
  from .None import format_helpers
  from .None import protocols
  from .log import logger
  from .tasks import sleep
label_desc: Use image node_id 1 to create a new StreamReaderProtocol object from inherited base classes: FlowControlMixin, protocols with example: obj = StreamReaderProtocol(stream_reader, client_connected_cb, loop)