You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Lets say I have a complex website with multiple elements that I want to update by socket.io events. 10.000 clients are connected, but only 2 are currently at a specific side seeing a specific element and had called:
socket.on('my-event',(data)=>{ ... });
When the server now emits:
io.emit('my-event',{ ... });
Does this event gets send to only the 2 that subscribed to the event, or does it get send to all 10.000 clients and the clients filter out what they are not interested in?
In any case, I think this is an important information that should be added to the docs, maybe here
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Lets say I have a complex website with multiple elements that I want to update by socket.io events. 10.000 clients are connected, but only 2 are currently at a specific side seeing a specific element and had called:
When the server now emits:
Does this event gets send to only the 2 that subscribed to the event, or does it get send to all 10.000 clients and the clients filter out what they are not interested in?
In any case, I think this is an important information that should be added to the docs, maybe here
Beta Was this translation helpful? Give feedback.
All reactions