简体   繁体   中英

Maximum value of CURLOPT_TIMEOUT

I use cURL library to get the content of current URL. So I wonder, what is the maximum value for CURLOPT_TIMEOUT option of curl_setopt function ? I also looked at manual page but found nothing about it. Is it possible to set no time limit to this option?
Thanks in advance.

It is possible to set no time limit to CURLOPT_TIMEOUT by simply setting the timeout to 0 .

Do take into account that good programming normally expects the unexpected. So if you want to make sure your code doesn't hang... and you want to wait extra-long, double or triple what you are expecting to be your maximum value but don't leave that thread there hanging eternally if something goes wrong.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM