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

How i can broadcast to all client in rooms except sender? #27

Open
phongloihong opened this issue Dec 28, 2017 · 3 comments
Open

How i can broadcast to all client in rooms except sender? #27

phongloihong opened this issue Dec 28, 2017 · 3 comments

Comments

@phongloihong
Copy link

I want to send broadcast to room but except sender.
I'm try server.BroadcastTo but it sending to all clients in room not except sender.

@AhmedX6
Copy link

AhmedX6 commented Feb 5, 2018

Did you find a solution ?

@Danesz
Copy link

Danesz commented Feb 15, 2018

// sending to all clients in 'game' room except sender
socket.to('game').emit('nice game', "let's play a game");

Isn't this a solution for you?

https://socket.io/docs/emit-cheatsheet/

@Danesz
Copy link

Danesz commented Feb 15, 2018

The logic should be the same in all implementations.

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

3 participants