我正在开发带有解析的聊天应用程序,需要知道何时在客户端关闭连接我试图将 pong 发送到服务器 put 服务器没有收到 ping 响应 pong 任何帮助请_this2.socket.send({})
我通过每 15 秒在解析套接字中为我的服务器发送心跳来解决它,这对我在 Web 应用程序中有所帮助
_this2.socket.send((0,"heartBeat"));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.