官方文档对socket模块下的socket.send()和socket.sendall()的解释如下:
sk.setblocking(False)方法
1 import socket 2 sk = socket.socket() 3 sk.setblocking(False) 4 sk.bind(('127.0.0.1', 8080)) 5 sk.listen() 6 7 try: 8 conn,addr = sk.accept() 9 except BlockingIOError: 10 pass 11 print('+++++++')