You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.
flask-socketio: Works with the popular socket.io library, which provides fallbacks for browsers that don't support WebSockets, but only with old versions of the library and only under Python 2.
flask-sockets: Only provides plain WebSocket support, still doesn't work with Python 3. Main problem for these two libraries is that gevent isn't supported under Python 3.
sockjs: Doesn't seem to integrate with Flask directly. Instead, tornado/cyclone would serve the app, delegating to sockjs's Python bindings for a WebSocket connection and to Flask otherwise.
Sockjs seems like the best bet right now, as it works with Python 3.
Thanks. It would be good to have a 2/3 solution. Usually either the first or the later is supported. I was playing with another option, autobahn, which claims to support both.
Both autobahn and Tornado/SockJS look comparable, so I guess the issue is whether we prefer Twisted (the asyncio version doesn't have WSGI integration?) or Tornado for the server.
Just giving each a cursory glance, sockjs looks more Pythonic. (on_message vs onMessage). All things being equal, I would lean toward a library that follows the underscore naming just because I would expect less surprise from it.
That said, neither of these libraries have any testing -- so tread lightly with them.
This may require websockets.
The text was updated successfully, but these errors were encountered: