Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Never broadcast without a namespace #8

Open
athoune opened this issue Feb 27, 2021 · 0 comments
Open

Never broadcast without a namespace #8

athoune opened this issue Feb 27, 2021 · 0 comments

Comments

@athoune
Copy link

athoune commented Feb 27, 2021

https://github.com/reveal/multiplex/blob/master/client.js#L8

// ignore data from sockets that aren't ours
if (data.socketId !== socketId) { return; }

Please, never do that : you're broadcasting messages for everybody, and ask clients for not listening what the others are shouting.

See https://socket.io/docs/v3/server-api/#server-of-nsp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant