def on_message(self, message):
        if self.application.verbose:
            print(message)
        msg = tornado.escape.json_decode(message)

        if msg["type"] == "get_step":
            step = int(msg["step"])
            if step < len(self.application.viz_states):
                return_message = {"type": "viz_state"}
                return_message["data"] = self.application.viz_states[step]
            else:
                return_message = {"type": "end"}
            self.write_message(return_message)

        elif msg["type"] == "reset":
            self.application.reset_model()
            return_message = {"type": "viz_state"}
            return_message["data"] = self.application.viz_states[0]

            self.write_message(return_message)
            self.application.run_model()

        else:
            if self.application.verbose:
                print("Unexpected message!")
Performs a search query.
dataset/ETHPy150Open projectmesa/mesa/mesa/visualization/ModularVisualization.py/SocketHandler.on_message--crossover with--dataset/ETHPy150Open basho/riak-python-client/riak/transports/http/transport.py/HttpTransport.search