title: detect namespace change in socket.io
body: <p>I'm writing a nodeJS 0.12 application with express and socket.io.</p>
  
  <p>I started with a small app. the user connects to socket.io and sees a button 'join_room' that actually joins the user to room\namespace 'a_b_c'.</p>
  
  <p>so the javascript code on the client is simple:</p>
  
  <p>var socket;</p>
  
  <pre><code>$(function () {
   socket = io();
    $('#join_room_button').click(function () {
      socket.emit("change_room","/a_b_c");
    });
  });
  </code></pre>
  
  <p>so i have a button  that the onclick emits the "change_room" with a room name.</p>
  
  <p>in the server side i have the following code:</p>
  
  <pre><code>var io = require('socket.io')(server);
  io.on('connection', function (socket) {
   console.log('user connected to socket.io');
    socket.on('change_room', function (data) {
      console.log("change room request to " + data);
      socket.join(data);
    })
  });
  var nsp = io.of('/a_b_c');
  nsp.on('connection', function (socket) {
   console.log("someone connected to room a_b_c");
  });
  </code></pre>
  
  <p>so as you can see here i catch a connection, and check if 'change_room' is emitted and if it is, i join the user to the room he asked for.
  below that code i check for a connected to that same room.</p>
  
  <p>the problem is that i can't catch when the user connected to room '/a_b_c'.
  the signal or event never occurs even when the client clicks on change_room.</p>
  
  <p>which means that the client sees the output: <code>change room request to /a_b_c</code>
  but the nsp variable with the connection is never called. any ideas?</p>