推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
arbipher
V2EX  ›  Python

网页客户端 WebSocket 的 ws.send 函数 和 tornado 的 WebSocketHandler 的 self.write_message 函数 保证消息的先后次序吗?

  •  
  •   arbipher · Apr 14, 2014 · 6217 views
    This topic created in 4437 days ago, the information mentioned may be changed or developed.
    客户端先 send 的消息一定先到服务器,服务器先 write_message 的消息一定先到客户端吗?

    如果不保证,有什么推荐的办法解决这个问题?
    3 replies    1970-01-01 08:00:00 +08:00
    gfreezy
        1
    gfreezy  
       Apr 14, 2014   ❤️ 1
    我猜走的是TCP连接,有TCP协议保证的吧
    dndx
        2
    dndx  
       Apr 15, 2014   ❤️ 1
    WS 走的是 TCP 链接,TCP 保证包序一致,不用担心。
    arbipher
        3
    arbipher  
    OP
       Apr 15, 2014
    @gfreezy
    @dndx

    知道了,谢谢~
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3168 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 53ms · UTC 12:51 · PVG 20:51 · LAX 05:51 · JFK 08:51
    ♥ Do have faith in what you're doing.