PyCurl的默认超时时间是多少
1 个回答
7
我下载了PyCurl。在压缩包的doc/
文件夹里,有几个文档文件。其中一个是doc/curlobject.html
,上面提到setup
和libcurl里的curl_easy_setopt
对应。点击那个链接,你会看到一个页面,地址是http://curl.haxx.se/libcurl/c/curl_easy_setopt.html,在页面上搜索'CONNECTTIMEOUT',你会发现:
CURLOPT_CONNECTTIMEOUT
Pass a long. It should contain the maximum time in seconds that you allow the connection to the server to take.
This only limits the connection phase, once it has connected, this option is of no more use.
Set to zero to switch to the default built-in connection timeout - 300 seconds.
See also the CURLOPT_TIMEOUT option.
所以,我可以说默认的超时时间是300秒。