Server-Sent Events "channel" where all messages are broadcasted to all connected clients, history is maintained automatically and server attempts to keep clients alive by sending "keep-alive" packets automatically.
I Would like to add a new method for the channel API that will get all current connections of a channel.
The motivation to do that comes from a use case which i need to send a message to specific clients
channel.send allows me to do that by sending an array of clients but how to i get this array? it seems like i need to manage it by myself by adding and removing clients with the help of connect and disconnect events, do my filtering logic and then pass this array of clients to the send method. am i missing something here?
EDIT: i figured it out. i missed the fact that i can access the connections property of a channel directly which is what i was looking for. this issue can be closed
Hi,
I Would like to add a new method for the channel API that will get all current connections of a channel.
The motivation to do that comes from a use case which i need to send a message to specific clients
channel.send
allows me to do that by sending an array of clients but how to i get this array? it seems like i need to manage it by myself by adding and removing clients with the help ofconnect
anddisconnect
events, do my filtering logic and then pass this array of clients to the send method. am i missing something here?EDIT: i figured it out. i missed the fact that i can access the connections property of a channel directly which is what i was looking for. this issue can be closed