code: def on_message(self, data):
          
          # Trying to parse response
          data = json.loads(data)
          if not data["name"] is None:
              logging.debug("%s: receiving message %s" % (data["name"], data["data"]))
              fct = getattr(self, "on_" + data["name"])
              try:
                  res = fct(Struct(data["data"]))
              except:
                  # We try without Struct item (on transaction request this can happend)
                  res = fct(data["data"])
              if res is not None:
                  self.write_message(res)
          else:
              logging.error("SockJSDefaultHandler: data.name was null")
docs: Parsing data, and try to call responding message