Home  >  Q&A  >  body text

html5 - 想用Python写一个在线聊天系统,有什么模块能用来处理WebSocket吗?

如题,有类似Node.js中Socket.io一样的或者别的模块吗?

ringa_leeringa_lee2718 days ago445

reply all(9)I'll reply

  • 迷茫

    迷茫2017-04-17 16:45:04

    Finally adopted Flask-Socketio

    reply
    0
  • PHPz

    PHPz2017-04-17 16:45:04

    Then continue to use Socket.io, python is also available.

    reply
    0
  • ringa_lee

    ringa_lee2017-04-17 16:45:04

    Flask also has socketio related extensions

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 16:45:04

    If you want to write it yourself, pay attention to the payload length network byte order

    reply
    0
  • 天蓬老师

    天蓬老师2017-04-17 16:45:04

    tornado 支持 websocket

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 16:45:04

    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

    reply
    0
  • 高洛峰

    高洛峰2017-04-17 16:45:04

    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.

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 16:45:04

    https://github.com/miguelgrinberg/python-socketio

    reply
    0
  • 阿神

    阿神2017-04-17 16:45:04

    If you use python3.4/3.5, you can try aiohttp

    reply
    0
  • Cancelreply