title: How can I detect disconnects on socket.io?
body: <p>I am using socket.io in my project. I turned on reconnect feature. I want to if user disconnects from server show an alert (Your internet connection loss. Trying reconnect). And if  the user reconnects again I want to show one more alert (Don't worry, you are connected).</p>
  
  <p>How can I do it?</p>