发布时间:2019-09-04 06:47:05编辑:auto阅读(2294)
1.python写法
import socket
def test_socket_timeout():
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print "Default socket timeout: %s" %s.gettimeout()
s.settimeout(100)
print "Current socket timeout: %s" %s.gettimeout()
if __name__ == '__main__':
#针对单个socket实例的超时
test_socket_timeout()
上一篇: SublimeText3自动补全pyth
下一篇: python简单鼠标自动点击某区域
51659
51281
41746
38519
32999
30001
28686
23660
23588
21941
2124°
2831°
2359°
2299°
2825°
2318°
3100°
5079°
4919°
3509°