V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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
yunson
V2EX  ›  Python

基于 websocket 的聊天小应用

  •  
  •   yunson · 2017-01-04 19:45:45 +08:00 · 3006 次点击
    这是一个创建于 2675 天前的主题,其中的信息可能已经有所发展或是发生改变。
    • 开发语言
      • 后端: python
      • 前端: html
    • 流程图简介

    流程图

    重点在于应用 websocket ,界面有点丑。

    原文链接

    9 条回复    2017-01-05 09:27:38 +08:00
    az999
        1
    az999  
       2017-01-04 20:29:08 +08:00
    我前段时间在学校和我的前端哥们也是这么设计的,写的一个 1 对多的类似阿里旺旺的功能,聊天数据的持久化我们当时没做。
    yunson
        2
    yunson  
    OP
       2017-01-04 22:24:50 +08:00 via Android
    @az999 👍
    wwqgtxx
        3
    wwqgtxx  
       2017-01-05 00:26:51 +08:00
    socket.io 做起来更方便
    crazycabbage
        4
    crazycabbage  
       2017-01-05 01:04:55 +08:00 via Android
    之前也使用 Python 建了一个,只不过用的 tornado 框架搞的,自带 websocket
    hiro0729
        5
    hiro0729  
       2017-01-05 07:46:22 +08:00 via Android
    目前公司一个项目我用的 netty 和 websocket ,实现了 iOS ,安卓,微信 h5 和 pcweb 多端通信,客户端实现心跳和断线重连,开发正式项目完全没问题的
    yunson
        6
    yunson  
    OP
       2017-01-05 08:07:58 +08:00 via Android
    @crazycabbage 回头用下 tornado
    yunson
        7
    yunson  
    OP
       2017-01-05 08:09:57 +08:00 via Android
    @hiro0729 嗯,心跳有好多好处,能确定客户端是否还存在、确保连接可用等等
    yuxuan
        8
    yuxuan  
       2017-01-05 09:17:10 +08:00
    去年毕业设计就搞得这个 后端是 node 写的 socket.io 很好用~
    iakisey
        9
    iakisey  
       2017-01-05 09:27:38 +08:00
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2266 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 10:13 · PVG 18:13 · LAX 03:13 · JFK 06:13
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.