摘要: 文档地址:https://www.cse.huji.ac.il/course/2004/com1/Exercises/Ex4/I.O.models.pdf 五种I/O模型: 1. blocking I/O 阻塞I/O 2. nonblocking I/O 非阻塞I/O 3. I/O multiple 阅读全文
posted @ 2019-12-22 23:42 wztshine 阅读(540) 评论(0) 推荐(0) 编辑
摘要: 套接字(socket)是一个抽象层,应用程序可以通过它发送或接收数据,可对其进行像对文件一样的打开、读写和关闭等操作。 1. 实现客户端发送字符,服务器返回大写的字符: 服务器: import socketserver class MyTCPHandler(socketserver.BaseRequ 阅读全文
posted @ 2019-12-22 12:50 wztshine 阅读(1320) 评论(0) 推荐(0) 编辑