There are two events on the server side: closeand disconnect. What is the difference between the two. How and when they run accordingly. Here is the doc on socket.io
io.sockets.on('connection', function(client){
client.on('disconnect', function(){
});
client.on('close', function(){
}
source
share