A tutorial for a web-based chat server in Python [closed]

A tutorial for a web-based chat server in Python [closed],第1张

A tutorial for a web-based chat server in Python [closed]

You can look at using TornadIO. Its a
python implementation of Socket.io, for
Tornado, Tornado is an event-driven python web
server.

https://github.com/MrJoes/tornadio2

http://www.tornadoweb.org/

Socket.io is a cross-browser solution to socket/socket-
like connections from the web client to the server. This will pretty much give
you all the tools you need to do a chat server since it supports pub-sub
subscriptions and messages. The nice thing about using socket.io for your
purposes is that it tries a number of transports in order to ensure that new
and old browsers can all communicate: Websocket, Flashsocket, xhr polling,
jsonp, htmlfile. They all are attempted and used in a way that looks the same
to the client.

Tornadio2 is the newer version that is compatible with the newer Socket.io
0.7+. This version added a lot of features that broke compatibility with 0.6.
However, the original TornadIO contains a chatroom example which you could
review and translate pretty easily to the newer version to get you started:

https://github.com/MrJoes/tornadio/tree/master/examples/chatroom



欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/zaji/5674896.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-12-16
下一篇 2022-12-17

发表评论

登录后才能评论

评论列表(0条)

保存