title: Why socket.io returns multiple times for an event
body: <p>I just started picking up socket.io. I'm trying to use it in angular.js and everything works fine. However, it keeps returning multiple times</p>
  
  <p><strong>in my controller.js</strong></p>
  
  <pre><code>socketio.emit('GameOver',$scope.currentPlayer.Name);
        socketio.on('GameOverEmit',function(data){
          if(data === $rootScope.user.user_name){
            var result = {
              opponent : rdyplayers.user_name,
              result : "won"
            };
              // keep getting multiple result 
            console.log(result);
          }else{
            var result = {
              opponent : rdyplayers.user_name,
              result : "lose"
            };
              // keep getting multiple result 
            console.log(result);
          }
        });
  </code></pre>
  
  <p>In my server.js</p>
  
  <pre><code>io.sockets.on('connection', function (client) {
  ​
             client.user_name = user.user_name;
  ​
            //Useful to know when someone connects
             console.log('\t socket.io:: player ' + client.user_name + ' connected');
             // playerturn
              client.on('PlayerTurn',function(data){
                   io.emit('PlayerTurnEmit',data);
  ​
              });
              // game over
              client.on('GameOver',function(data){
                   io.emit('GameOverEmit',data);
  ​
              });
              // button disabled
              client.on('PlayerButtonDisabled',function(data){
                  io.emit('PlayerButtonDisabledEmit',data);
              });
                 //When this client disconnects
             client.on('disconnect', function () {
                     //Useful to know when someone disconnects
                 console.log('\t socket.io:: client disconnected ' + client.user_name );
                 io.emit("disconnected",client.user_name);
             }); //client.on disconnect
  ​
         }); //io.sockets.on connection
  </code></pre>
  
  <p>Am I using socket.io in the correct way? In order to broadcast the data to everyone I just pass the data into an <code>emit</code> and take the data broadcast it by using <code>on</code> like pass the data to server and pass it back to the front-end?</p>