我下载了PyCurl。在tarball的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秒。