Open gaxolio opened 6 years ago
Hi. Please, could you provide an example for the method channel.send(msg, [clients]) with the optional parameter [clients]? Thank you.
Any news on this?
Just needed the same. The documentation does not explain what to use but in the source-code it does. You simply have to give it the response objects of the clients you want to send the data to. So simply keep it around from the time when they connect and then supply it there when you want to send them data. Hope it helps.
You can find the information here in the source code: https://github.com/rexxars/sse-channel/blob/master/lib/sse-channel.js#L195
Hi. This is not a issue but I need to send a message only to a client. Could you describe better how use this method? What do you mean with [clients]? Could you provide an example. Is it an array of what? How can I match my client in the list of clients. Thanks for support. Sergio