如题,有类似Node.js中Socket.io一样的或者别的模块吗?
ringa_lee
Finally adopted Flask-Socketio
Then continue to use Socket.io, python is also available.
Flask also has socketio related extensions
If you want to write it yourself, pay attention to the payload length network byte order
tornado 支持 websocket
tornado
websocket
In the source code package of tornado, there is the chat room source code for websocket implementation. The code is very small. Read it tornado/demos/websocket/chatdemo.py
If you are using PHP, you can use swoole or workerman. If you are using python, I am also wondering if there is anything easier to get started with.
https://github.com/miguelgrinberg/python-socketio
If you use python3.4/3.5, you can try aiohttp
Finally adopted Flask-Socketio
Then continue to use Socket.io, python is also available.
Flask also has socketio related extensions
If you want to write it yourself, pay attention to the payload length network byte order
tornado
支持websocket
In the source code package of tornado, there is the chat room source code for websocket implementation. The code is very small. Read it
tornado/demos/websocket/chatdemo.py
If you are using PHP, you can use swoole or workerman. If you are using python, I am also wondering if there is anything easier to get started with.
https://github.com/miguelgrinberg/python-socketio
If you use python3.4/3.5, you can try aiohttp