s_cm.setblocking(False)
while True:
try:
data=s_cm.recvfrom(2048)
except Exception as e:
#print str(e)
break
s_cm.setblocking(True)
s_cm.setblocking(False)
while True:
try:
data=s_cm.recvfrom(2048)
except Exception as e:
#print str(e)
break
s_cm.setblocking(True)
本文标题:Python 清空阻塞模式socket缓冲区
本文链接:https://www.haomeiwen.com/subject/odjwyhtx.html
网友评论