code: def on_connect(self, connection):
          "Called when the stream connects"
          self._stream = connection._reader
          self._buffer = SocketBuffer(self._stream, self._read_size)
          if connection.decode_responses:
              self.encoding = connection.encodinf on_connect(self, connection):
          "Called when the stream connects"
          self._stream = connection._reader
          self._buffer = SocketBuffer(self._stream, self._read_size)
          if connection.decode_responses:
              self.encoding = connection.encoding
docs: Called when the stream connects