title: Working with Socket.io sending and receiving objects
body: <p>Here is my app.js file</p>
  
  <pre><code>io.on('connection', function(socket){
  
  socket.on('ujwal', function (data) {
      socket.emit('news', function(){
          console.log('testing');
      });
  });
  
  socket.on('disconnect', function(){
      console.log('user disconnected');
  });
  </code></pre>
  
  <p>On ujwal event i am emitting another event to the client 
  here is my index.html i have included socket lib too</p>
  
  <pre><code>var socket = io('http://localhost:3000');
      $('#test').click(function(){
  
          var as = "object";
          socket.emit('ujwal',as);
  
  
      });
  
      socket.on('news', function (a) {
          alert('receiving msgs');
      });
  </code></pre>
  
  <p>Now i am opening two windows whenever a user click a test id they are getting but who are not clicking they are not receiving the object in front end why? why code means whenever u get name event ujwal please fire news A and B are connected to server A click the test ujwal is fired and checking by server and again send back news now all the user connected should see the alert ?</p>
  
  <p>This what i know so please make it work so that all user can get alert.</p>