title: Reset Socket.io Client connection
body: <p>I write a Google Chrome Extension that uses Socket.io capabilities. More precisely, it's an AngularJS app with angular-socket.io on board.</p>
  
  <p>I allow users to set up socket.io server address and port in the options page. Everything works fine until a user wants to change the address because I don't know how to reset the Socket.io connection. Ideally, I would like to close previous connection and reconnect with new connection without restarting the app (remember, it's an Chrome Extension, I cannot restart it by itself).</p>
  
  <p>So my question is: <strong>How to reset the Socket.io client connection and reconnect with new DSN</strong>?</p>
  
  <p>PS. I'm using socket.io-client#1.3.6</p>