title: Why doesn't emit event fire by socket.io
body: <p>I'm using socket.io + express.
  I want to emit 'start' and 'user_info' event to server from client. But it doesn't work. I wrote like this...</p>
  <h3>server.js</h3>
  <pre><code>var express = require(&quot;express&quot;);
  var http = require(&quot;http&quot;);
  var socket = require(&quot;socket.io&quot;);
  var app = express();
  var ejs = require(&quot;ejs&quot;);
  var server = http.createServer(app);
  var io = require(&quot;socket.io&quot;).listen(server);
  var redis = require(&quot;redis&quot;);
  var _ = require(&quot;underscore&quot;);
  require(&quot;./models/User&quot;);
  
  app.get(&quot;/&quot;,function(req,res){
  
    res.render(&quot;index&quot;,{});
  
  });
  
    
    socket.on(&quot;start&quot;,function(data){
      console.log(&quot;Started&quot;);
    });
  
     socket.on(&quot;user_info&quot;,function(user_info){
      var self = this;
          var name = user_info.name;
          var password = user_info.password;
      user.name = name;
      user.password = password;
      var data = JSON.stringify({name: name,password: password});
    });
  
  
  
  ### client.js
  
  
  $(document).ready(function(){
      var socket = io.connect(&quot;http://localhost:8080&quot;);
  
    
   
  
      $(&quot;#register-btn&quot;).on(&quot;click&quot;,function(data){
          $(&quot;#notice&quot;).html(&quot;Registerd&quot;);
          var name = $(&quot;#name&quot;).val();
          var password = $(&quot;#password&quot;).val();
          var confirmPassword = $(&quot;#confirm-password&quot;).val();
  
          if (name &amp;&amp; (password === confirmPassword)){
                      // user_info event is works.
              socket.emit(&quot;user_info&quot;,{&quot;name&quot;: name,&quot;password&quot;: password});
                      // I wonder why  start event does not works.
                      socket.emit(&quot;start&quot;,{&quot;name&quot;: &quot;yahoo&quot;});
  
          }else{
              $(&quot;#notice&quot;).html(&quot;try again&quot;);
          }
      });
  });
  </code></pre>
  <p>I don't know why 'start' event is not being fired. Do you have any idea?</p>