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