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
a note, broadcast has signature broadcast(name, ...args), so we can't fit a options object { excludeSelf: true } at the last param.
One way of going about this is to have two methods, broadcast(name, ...args) and broadcastWith(opts, name, ...args) aka broadcastWithOptions(opts, name, ...args) . where broadcast just wraps around broadcastWith({}, name, …args)
Motivation
Add ability to broadcast to conns except for the conn that sent the RPC request. Only available on
ActionContext
.Implementation
excludeSelf
naming could use some work.Alternative Implementations
exclude
Add a more generic option for just excluding connection IDs.
It might make sense to implement both, since broadcast to all but self is a very common operation.
broadcastToOthers
Same functionality as
excludeSelf
but a separate method name.Prior Art
Socket.io:
The text was updated successfully, but these errors were encountered: