Closed tanhangbo closed 4 years ago
(chinese)我在用C实现一个Socket.io协议。但是这里的协议看不懂,代码实现也看不懂,抓包贡献下我知道的例子:
42["message"]
42["message", "message1"]
42["message", "message1", "message2"]
42["message",{"hello":"world"}]
42/hardware,["message","hello world"]
451-["level5","xxx",{"_placeholder":true,"num":0}] //这里的二进制消息变成了一个placeholder 0468656c6c6f3132333435 //前面是0x04,后面是内容hello12345
452-[{"_placeholder":true,"num":0},{"_placeholder":true,"num":1}] 0468656c6c6f3132333435 //前面是0x04,后面是内容hello12345 0468656c6c6f3132333435 //前面是0x04,后面是内容hello12345
451-/admin,["level5","xxx",{"_placeholder":true,"num":0}] 0468656c6c6f3132333435 //前面是0x04,后面是内容hello12345
42["message"]
42["message", "message1"]
42["message", "message1", "message2"]
42["message",{"hello":"world"}]
42/hardware,["message","hello world"]
451-["level5","xxx",{"_placeholder":true,"num":0}] //这里的二进制消息变成了一个placeholder 0468656c6c6f3132333435 //前面是0x04,后面是内容hello12345
452-[{"_placeholder":true,"num":0},{"_placeholder":true,"num":1}] 0468656c6c6f3132333435 //前面是0x04,后面是内容hello12345 0468656c6c6f3132333435 //前面是0x04,后面是内容hello12345
451-/admin,["level5","xxx",{"_placeholder":true,"num":0}] 0468656c6c6f3132333435 //前面是0x04,后面是内容hello12345