Reputation: 3791
I am working on a websocket implementation based on uwsgi 2.0 in python. I am a little confused about how messages are sent from the websocket server to the client. Would appreciate if someone would clarify the following for me.
uwsgi.websocket_send(msg)
is used, is the message sent to all connected clients or the one for which the handshake is established?Upvotes: 1
Views: 1542
Reputation: 12953
the whole api is peer 2 peer, uwsgi.websocket_send send to the currently connected peer. You need an additional layer (generally redis) to have room/channels support.
This is an example (gevent + redis) https://github.com/unbit/uwsgi/blob/master/tests/websockets_chat.py
Upvotes: 3