title: socket.emit back for sending data to same client who sent it is not working
body: <p>In my program I am trying to make the client send data over to the server and after this the data that was sent to the server is sent back to the client who sent the request originally. The only problem I am having is that once the data is sent over to the server it does not seem to want to be sent back to the client who sent it.</p>
  <p>client side HTML</p>
  <pre><code> &lt;form id=&quot;name_form&quot;&gt;
        &lt;div class=&quot;row&quot;&gt;
             Name:
             &lt;input id=&quot;name_input&quot; type = &quot;text&quot; required maxlength=&quot;40&quot;&gt;
             &lt;button class=&quot;btn btn-info&quot; id=&quot;submit_button&quot;&gt;submit &lt;i class=&quot;fa fa-user-plus&quot; style=&quot;font-size:48px;&quot;&gt;&lt;/i&gt;&lt;/button&gt;
              &lt;/div&gt;
   &lt;/form&gt;
  </code></pre>
  <p>client side JS:</p>
  <pre><code>var name = document.getElementById(&quot;name_input&quot;).value;
  socket = io.connect(&quot;http://localhost:8080&quot;); 
  socket.emit(&quot;new-user&quot;, name); 
  
  socket.on(&quot;welcome&quot;, function(data) 
  { 
  console.log(&quot;recived welcome&quot;); 
  });
  </code></pre>
  <p>Server side</p>
  <pre><code>var name_list = [&quot;bob&quot;, &quot;sam&quot;, &quot;jim&quot;]
  io.on(&quot;connection&quot;, function(socket) 
  {
      socket.on(&quot;new-user&quot;, function(data)
      { 
      socket.emit('welcome', name_list); 
      });
  });
  </code></pre>
  <p>When I look at the console on the client side in my web browser, the message <code>&quot;received welcome&quot;</code> does not come up. With the <code>socket.emit()</code> on the server side, this makes me think that the data that the client sent over to the server will be sent directly back over to the client that sent it.</p>