标签:技术 == close f11 spl ide alt list style
import socket sk = socket.socket() sk.bind((‘127.0.0.1‘,8080)) sk.listen() conn,addr = sk.accept() while True: ret = conn.recv(1024).decode(‘utf-8‘) if ret == ‘bye‘: break print(ret) info = input(‘>>>‘) conn.send(bytes(info,encoding=‘utf-8‘)) conn.close() sk.close()
import socket sk = socket.socket() sk.connect((‘127.0.0.1‘,8080)) while True: info = input(‘>>>‘) sk.send(bytes(info,encoding=‘utf-8‘)) ret = sk.recv(1024).decode(‘utf-8‘) print(ret) if ret ==‘bye‘: sk.send(b‘bye‘) break sk.close()
标签:技术 == close f11 spl ide alt list style
原文地址:https://www.cnblogs.com/ivanxy/p/9329171.html