<script src="/socket.io/socket.io.js"></script>
<script>
  var socket = io.connect('http://localhost');
  var socket2 = io.connect('http://localhost/rnd');

  setInterval(function() {
    var req = {
      val: ~~(Math.random() * 10)
    };

    var req2 = {
      val: ~~(Math.random() * 10)
    };

    socket.emit('randomRequest', req, function(data) {
      console.log('normal', req.val, data);
    });

    socket2.emit('randomRequest', req2, function(data) {
      console.log('ns', req2.val, data);
    });
  }, 3000)

</script>

<script src="/socket.io/socket.io.js"></script>
<script>
  var socket = io.connect();
  var socket2 = io.connect('/rnd');

  setInterval(function() {
    var req = {
      val: ~~(Math.random() * 10)
    };

    var req2 = {
      val: ~~(Math.random() * 10)
    };

    socket.emit('randomRequest', req, function(data) {
      console.log('normal', req.val, data);
    });

    socket2.emit('randomRequest', req2, function(data) {
      console.log('ns', req2.val, data);
    });
  }, 3000)

</script>

Use relative urls in sockend example
Use relative urls in sockend example
