heroku-python / flask-sockets

[DEPRECATED] Alternative: https://github.com/miguelgrinberg/flask-sock
MIT License
1.74k stars 167 forks source link

Is flask-sockets supports broadcasting? #40

Closed rajasimon closed 7 years ago

rajasimon commented 7 years ago

All web sockets connected to the same endpoint but ws.send(message) will receive by only one client which is initiated socket.send('message')

mariotti commented 7 years ago

If I am not wrong WS are peer to peer by definition. Meaning you can open as many connections as you want and your server can support, but it is not exactly "broadcasting".

If you can expand the question with examples maybe it becomes more clear.

o3bvv commented 7 years ago

Will it be OK for you to keep a pool of open connections and to send messages to clients kept in it?

rajasimon commented 7 years ago

@oblalex yes I'm thinking the same.

rajasimon commented 7 years ago

In the mean time I found this very helpful. I have modified lot of code to adapt my need. I wish flask-sockets will have these feature inbuilt.

Ref: https://github.com/heroku-examples/python-websockets-chat