title: Sending data to specific user via node.js and socket.io
body: <p>In referrer to <a href="https://stackoverflow.com/questions/12246829/node-js-routing-data-with-socket-io">https://stackoverflow.com/questions/12246829/node-js-routing-data-with-socket-io</a></p>
  
  <p>On client:</p>
  
  <pre><code> // send data on some event
   socket.emit('send', { u: user_id, a: action, v: value });
  </code></pre>
  
  <p>I have user_id and i could add user_id sender</p>
  
  <p>On server:</p>
  
  <pre><code>socket.on('send', function (data) {
      socket.broadcast.emit('request', { request: data });
  });
  </code></pre>
  
  <p>Now the data is sent to all users listening to port, but I would like to only 2 by 2 users can get data.</p>
  
  <p>So, users 1 &amp; 2 are having there "channel", and users 3 &amp; 4 theirs.</p>