def on_message(self, message):
        """
        Called when we receive a message from our client.

        We proxy it to the backend.
        """
        self._record_activity()
        if hasattr(self, 'ws'):
            self.ws.write_message(message, binary=isinstance(message, bytes))
def on_message ( self , message ) : self . _record_activity ( ) if hasattr ( self , 'ws' ) : self . ws . write_message ( message , binary = isinstance ( message , bytes ) )
Called when we receive a message from our client.

        We proxy it to the backend.