Python
共 1 篇文章
学习python后写的关于网络编程,线程的例子
该例子综合了python的网络编程,线程,异常处理,字符串处理,函数,类,做为入门级的例子,很 实用 服务器端server.py #coding=utf-8 import socket import threading from time import sleep class ThreadClass(threading.Thread): def setClient(self,client): self.client = client def run(self): print('threadname-->',self.getName()) s = self.client.recv(1024).…
2011-06-29 17:43 · Python