becvert/cordova-plugin-websocket-server

How to broadcast message to all client using current web-socket server?

Danijel-Mekiho opened this issue · 1 comments

I have setup one device as a web-socket server and I'm going to broadcast message to 5~10 client devices.
But there isn't any function to implement above one in this plugin.
Please give me your opinion.

for now, keep the connection objects from the onOpen handler in an array and then loop the array and use send with the connections.
I may add a broadcast method in the future that would do exactly that.