title: How to detect when socket.io transport changes? (event or something)
body: <p>I'm trying to connect to server io.js+socket.io with socket.io client. It starts with xhr polling requests, the connect event and even first message are receiving throught xhr, then it upgrades to websocket. How can i detect when the switch of the transport happens to log it (on both sides)?</p>
  
  <p>Simplified server code:</p>
  
  <pre><code>io.on("connection",function(socket){
      console.log("transport",socket.conn.transport.name); //will print "polling"
      socket.on("join",function(data){
          console.log("transport",socket.conn.transport.name); //will print "polling" (usualy)
          console.log("userjoined",data.userInfo);
      });
      socket.on("testMsg",function(data){
          console.log("transport",socket.conn.transport.name); //will print "websocket" (if it supported and already switched)
      });
      socket.emit("hello","hello");
  })
  </code></pre>
  
  <p>Simplified client code:</p>
  
  <pre><code>var socket = io.connect();
  socket.on("hello",function(data){
      socket.emit("join",{userInfo: {name:"someName"}});
      setTimeout(function(){
          socket.emit("testMsg",{}); 
      },8000)
  });
  </code></pre>