0

I have got a little different scenario. I will need to send to all (excluding sender) except particular client:

// sending to all clients except sender
socket.broadcast.emit('send');

Now, how would I exclude few or one client something like below?

socket.broadcast.except(id).emit('send')
// And/Or,
socket.broadcast.not([id,id]).emit('send')

I didn't see if there's except or not.

gacat
  • 116
  • 1
  • 13
  • Does this answer your question? [Send response to all clients except sender](https://stackoverflow.com/questions/10058226/send-response-to-all-clients-except-sender) – kmoser May 11 '20 at 19:12
  • No. I have checked that already. – gacat May 11 '20 at 19:15
  • `namespace.clients(callback)` will return all user in `namespace`, then you can filter out the one(s) you don't want. – Jack Ting May 11 '20 at 20:03

0 Answers0