async def get_message(self, websocket, path):
        """

        :param websocket: websocket
        :param path: path
        :return:
        """

        self.websocket = websocket
        try:
            while True:
                payload = await self.websocket.recv()

                # cmd_dict = json.loads(payload.decode('utf8'))
                cmd_dict = json.loads(payload)
                client_cmd = cmd_dict.get("method")

                if client_cmd in self.command_map:
                    cmd = self.command_map.get(client_cmd)
                    params = cmd_dict.get("params")
                    if params[0] != "null":
                        await cmd(params)
                    else:
                        await cmd()
        except websockets.exceptions.ConnectionClosed:
            sys.exit()
async def get_message ( self , websocket , path ) : self . websocket = websocket try : while True : payload = await self . websocket . recv ( ) cmd_dict = json . loads ( payload ) client_cmd = cmd_dict . get ( "method" ) if client_cmd in self . command_map : cmd = self . command_map . get ( client_cmd ) params = cmd_dict . get ( "params" ) if params [ 0 ] != "null" : await cmd ( params ) else : await cmd ( ) except websockets . exceptions . ConnectionClosed : sys . exit ( )
:param websocket: websocket
        :param path: path
        :return: