Broken pipe 客户端关闭写后,继续发数据:

Broken pipe  客户端关闭写后,继续发数据:

node2:/root/test#cat t18.py 
import socket
import time
import struct
s = socket.socket(socket.AF_INET,socket.SOCK_STREAM)
# SEND_BUF_SIZE = 2
s.connect(("192.168.137.2",8080))
s.send('4444')
s.shutdown(1)
s.send('4444')
node2:/root/test#python t18.py 
Traceback (most recent call last):
  File "t18.py", line 9, in <module>
    s.send('4444')
socket.error: [Errno 32] Broken pipe
原文地址:https://www.cnblogs.com/hzcya1995/p/13348481.html