导航

2012年8月25日

摘要: 14-1 服务器import sockets = socket.socket()host = socket.gethostname()port = 10234s.bind((host,port))s.listen(5)while True: c, addr = s.accept() print 'Got connection from', addr c.send('Thank you for connecting') c.close() 14-2 客户机import sockets = socket.socket()host = socket.gethostna 阅读全文

posted @ 2012-08-25 21:08 immiki 阅读(158) 评论(0) 推荐(0) 编辑