API Proposal for broadcasting messages customizing payload for each socket #4827
Unanswered
giovanni-bertoncelli
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sometimes there is the necessity to customize a broadcasted event payload according to the socket that's receiving the event.
For example when you want to send an event and indicate for each socket if it's the sender itself, I have to loop all the sockets in a room and change the payload for each one of them.
I was thinking about some sort of API like this, with a callback for each socket:
The callback should return an object or a valid payload to send.
Can it be a good idea? Or is it just a rare use case?
Beta Was this translation helpful? Give feedback.
All reactions