I\'m using Socket.io, and I\'d like to know the status of connection to the server from the client-side.
Something like this:
socket.status // return
You can check whether the connection was lost or not by using this function:-
var socket = io( /**connection**/ ); socket.on('disconnect', function(){ //Your Code Here });
Hope it will help you.