如下所示,在vue中我共用一个websocket连接,一次发送多条指令,那么,此时onmessage会得到四个返回的结果集,如何去区分这四个结果集对应的是哪条指令呢,求解惑~
ws.send(JSON.stringify(this.$Command.subscribe))
ws.send(JSON.stringify(this.$Command.mode))
ws.send(JSON.stringify(this.$Command.basicstatus))
ws.send(JSON.stringify(this.$Command.groupstatus))
ws.send(JSON.stringify(this.$Command.detailedStatus))