In the different SockJS examples for a client to notify all other clients of something, the client uses its 'broadcast' method.
For example, inside an on_data (just an example name, forget about correct naming for now) or similar callback, client calls 'broadcast'.
What happens if my server wants to initiate such a broadcast?
What I tried is to keep a list of all my connections and pass it so some other function in my code, and then that code selects one connection randomly and uses its 'broadcast'.
I did that on a sockjs-tornado test-app.
Is this sane? I think I'm missing something.
Thanks.