code: async def on_data(self, data):
          
          self._receive_buffer += data
  
          # Schedule new timeout event.
          if self._ping_checker_handle:
              self._ping_checker_handle.cancel()
  
          # create a task for the ping checker
          self._ping_checker_handle = self.eventloop.create_task(
              self._perform_ping_timeout(self.PING_TIMEOUT))
  
          while self._has_message():
              message = self._parse_message()
              self.eventloop.create_task(self.on_raw(message))
docs: Handle received data.