title: socket.io client unable to emit message to server
body: <p>I can't figure out why my socket.io server isn't receiving messages from the client. Here is my server JS file:</p>
  
  <pre><code>var app = require('express')();
  var http = require('http').Server(app);
  var io = require('socket.io')(http);
  
  io.on('connection', function(socket){
  
      console.log('a user connected');
  
      socket.on('bid', function(msg){
          console.log('received:' + msg);
      });
  
      socket.on('disconnect', function(){
          console.log('user disconnected');
      });
  });
  
  http.listen(3000, function(){
      console.log('listening on *:3000');
  });
  </code></pre>
  
  <p>And here is the client-side code:</p>
  
  <pre><code>$(function () {
  
      var socket = io(':3000/socket.io/socket.io.js');
  
      $('#bid-form').on('submit',function(){
          socket.emit('bid', 'test');
          console.log('emit');
          return false;
      });
  });
  </code></pre>
  
  <p>When I open and close the browser page I see the "user connected" and "user disconnected" messages on the server console so I know it's making the connection.</p>
  
  <p>When I submit the form I see the "emit" message in the browser console so I know the form submit event is firing but I'm not receiving the test message on the server. Nothing seems to happen on the client or sever end, it seems like the "socket.emit" function isn't doing anything.</p>
  
  <p>What am I doing wrong?</p>