Skip to content

Broadcast to local instance only when using the redis-adapter #3217

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

Closed
sleimanx2 opened this issue Apr 4, 2018 · 1 comment
Closed

Broadcast to local instance only when using the redis-adapter #3217

sleimanx2 opened this issue Apr 4, 2018 · 1 comment

Comments

@sleimanx2
Copy link
Contributor

it's possible to add the local flag when emitting to a room

 // sending to all clients on this node (when using multiple nodes)
 io.to(channel).local
     .emit(message.event, channel, message.data)

however, when broadcasting from a socket instance it's not possible to add a local flag is there any way to achieve the same behavior?

// this wont work
socket.broadcast.to(channel).local
      .emit(message.event, channel, message.data);

thank you

@darrachequesne
Copy link
Member

Closed by #3219

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

2 participants