title: Node.js Socket.IO client 'unhandled socket.io url'
body: <p>I'm attempting to have a node.js client communicate with a node.js server using Socket.IO, according to the documentation this should be pretty easy however I'm just getting a message 'info  - unhandled socket.io url' on the server whenever the clients tries to connect to the server. Here is a very basic example from the root:</p>
  
  <hr>
  
  <p>in a directory I installed the necessary Socket.IO modules using:</p>
  
  <pre><code>npm install socket.io socket.io-client
  </code></pre>
  
  <p>in a file servernode.js I put:</p>
  
  <pre><code>var app = require('http').createServer(), io = require('socket.io').listen(app);
  io.sockets.on('connection', function(socket) {
     console.log('connected');
  });
  app.listen(60000);
  </code></pre>
  
  <p>in another file clientnode.js I put:</p>
  
  <pre><code>var socket = require('socket.io-client')('http://localhost:60000');
  socket.on('connect', function(){
       console.log('socket connected.');
  });
  </code></pre>
  
  <p>in two terminals I put</p>
  
  <pre><code>node servernode.js
  </code></pre>
  
  <p>and</p>
  
  <pre><code>node clientnode.js
  </code></pre>
  
  <p>Then in the server I get this message repeated ad infinitum:</p>
  
  <pre><code> info - unhandled socket.io url
  </code></pre>
  
  <hr>
  
  <p>I've searched for this message and from what I could gather, it was related to differences between versions, but I suppose npm has those modules synched, no? In desperation I also tried getting the file from the server module at './node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js' (and using .connect - somehow in this version it's necessary) but then I get another error:</p>
  
  <pre><code>/home/work/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js:1877
  var port = global.location.port ||
                            ^
  TypeError: Cannot read property 'port' of undefined
  at Socket.isXDomain (/home/work/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js:1877:31)
  at Socket.handshake (/home/work/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js:1627:14)
  at Socket.connect (/home/work/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js:1699:10)
  at new Socket (/home/work/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js:1551:12)
  at Object.io.connect (/home/work/node_modules/socket.io/node_modules/socket.io-client/dist/socket.io.js:94:16)
  at Object.&lt;anonymous&gt; (/home/work/testnode2.js:1:160)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  </code></pre>
  
  <p>Can anyone help me out with this?</p>