首页 > node.js socket.io如何知道用户已经断掉连接
我想实现一个在线的人数的统计,用socket.io,我该怎么知道用户的socket连接已经断掉?
socket.on('disconnect', function() { ... });