标签:targe ESS cep send enc pre list tip 并发
import socket from multiprocessing import Process def server(conn): msg = ‘连接成功‘.encode(‘utf-8‘) conn.send(msg) msg2 = conn.recv(1024).decode(‘utf-8‘) print(msg2) conn.close() if __name__ == ‘__main__‘: sk = socket.socket() sk.bind((‘‘,8080)) sk.listen() while True: conn,addr = sk.accept() p = Process(target=server,args=(conn,)) p.start() sk.close()
标签:targe ESS cep send enc pre list tip 并发
原文地址:https://www.cnblogs.com/kuraki/p/9600662.html