Project 5: A Virtual Tea Party

Project 5: A Virtual Tea Party
复制标题

项目 5:虚拟茶会

DOI:
--
复制
发表时间:
2008
期刊:
影响因子:
--
通讯作者:
Magnus Lie Hetland
Magnus Lie Hetland
中科院分区:
--
文献类型:
--
作者:
Magnus Lie Hetland

文献摘要

被引文献

相似文献

在这个项目中,你做了一些严肃的网络编程。您将编写一个聊天服务器--一个允许多个人通过Internet连接并在真实的时间内相互聊天的程序。在Python中有很多方法可以创建这样的野兽。一个简单而自然的方法可能是使用Twisted框架(在第14章中讨论),例如,LineReceiver类占据中心舞台。在这一章中,我坚持使用标准库,程序基于模块Cockcore和Cockchat。如果你愿意,你可以尝试一些在第14章中讨论过的替代方法(比如分叉或线程)。
In this project, you do some serious network programming. You’ll write a chat server—a program that lets several people connect via the Internet and chat with each other in real time. There are many ways to create such a beast in Python. A simple and natural approach might be to use the Twisted framework (discussed in Chapter 14), for example, with the LineReceiver class taking center stage. In this chapter, I stick to the standard libraries, basing the program on the modules asyncore and asynchat. If you like, you could try out some of the alternative methods (such as forking or threading) discussed in Chapter 14.