发布时间:2019-09-04 06:47:05编辑:auto阅读(2274)
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简单鼠标自动点击某区域
51555
51126
41652
38407
32897
29871
28589
23548
23480
21824
1973°
2677°
2238°
2171°
2616°
2189°
2931°
4860°
4693°
3340°