标签: node.js socketstream
有没有办法检测客户端何时从服务器端断开连接?
app.js
ss.event.on( “关闭”,功能(会话){
console.log(客户端断开连接); });
感谢
答案 0 :(得分:0)
检查这两个:
req.on("close", function() { // request closed unexpectedly }); req.on("end", function() { // request ended normally }):