code: def feed_data(self, data):
          '''Implements the :meth:`~.ProtocolConsumer.data_received` method.
  
          It simply search for the :attr:`separator` and, if found, it invokes
          the :meth:`response` method with the value of the message.
          '''
          if self.buffer is None:
              self.buffer = bytearray(data)
          else:
              self.buffer.extend(data)
          data = self.buffer
  
          idx = data.find(self.separator)
          if idx >= 0:    # we have a full message
              idx += len(self.separator)
              data, rest = data[:idx], data[idx:]
              self.buffer = self.response(data, rest)
              self.event('post_request').fire()
              return resf feed_data(self, data):
          '''Implements the :meth:`~.ProtocolConsumer.data_received` method.
  
          It simply search for the :attr:`separator` and, if found, it invokes
          the :meth:`response` method with the value of the message.
          '''
          if self.buffer is None:
              self.buffer = bytearray(data)
          else:
              self.buffer.extend(data)
          data = self.buffer
  
          idx = data.find(self.separator)
          if idx >= 0:    # we have a full message
              idx += len(self.separator)
              data, rest = data[:idx], data[idx:]
              self.buffer = self.response(data, rest)
              self.event('post_request').fire()
              return rest
docs: Implements the :meth:`~.ProtocolConsumer.data_received` method.
  
          It simply search for the :attr:`separator` and, if found, it invokes
          the :meth:`response` method with the value of the message.