title: connecting two clients with socket.io through node.js
body: <p>I'm trying to make two clients (players) contact each other (exchanging for example strings) through socket.io. I have this code on the clients (gameId is defined back in the code):</p>
  
  <pre><code>var chat = io.connect('http://localhost/play');
  chat.emit(gameId+"", {
      guess: "ciao"
  });
  chat.on(gameId+"", function (data) {
      alert(data.guess);
  });
  </code></pre>
  
  <p>While on the server I have this (which is one of the first things I do, not in routing of course)</p>
  
  <pre><code>var messageExchange = io
      .of('/play')
      .on('connection', function (socket) {
          socket.emit('message', {
              test: 'mex'
          });
        });
  </code></pre>
  
  <p>Basically I create the channel, then when users connect they use the channel to exchange a message of the king "gameId" that only the both of them can read (using the <code>on.(gameId+"" ...</code> stuff. 
  My problem is that when players connect (first one, then the other), the first one that connected should alert the data received (because the second one that connected emitted a message). Does anyone of you know why this is not happening?</p>
  
  <p>Thanks.</p>