Ping Pong Socket.io不起作用

时间:2016-06-29 11:41:48

标签: node.js socket.io

我试图解决这个问题problem,有些事情并不顺利,我也不了解发生了什么。

这是服务器脚本的调试输出:

engine:ws received "2" +25s
engine:socket packet +0ms
engine:socket got ping +1ms
engine:socket sending packet "pong" (undefined) +0ms
engine:socket flushing buffer to transport +0ms
engine:ws writing "3" +0ms

engine:socket sending packet "pong" (undefined) +0ms是什么意思?

非常感谢!

1 个答案:

答案 0 :(得分:0)

undefined是数据包的数据,未定义。

socket.io的默认ping / pong机制会导致这种情况,这是正常的。