有了文章2的分析以后下面需要做的事情是选择1个TCP服务器。
自己写1个TCP服务器考虑到快速实现,不现实。
最终有3个框架
twisted
gevent
tornado
google了一下资料以后。
考虑gevent tornado
比较理想的目标是gevent,不过测试1天,作为tcp服务器时候。read函数并没有补丁为非阻塞方法。放弃
剩下的就是tornado
google一下tornado tcp服务器资料,发现1篇http://pannidage.blogspot.com/2011/07/tornado-tcp-server.html 粗略看了一下,配合tornado 的 echoserver.py方法。
确认可行。
ok

本文探讨了在实现TCP服务器时,如何在twisted、gevent和tornado框架中选择合适的技术方案。通过对比分析,作者最终决定采用Tornado框架,并提供了验证其可行性的实践案例。

被折叠的 条评论
为什么被折叠?



