Re: libcurl and connection timeouts
Date: Wed, 23 Nov 2005 09:09:00 +0100 (CET)
On Tue, 22 Nov 2005, lostsandman wrote:
> I have app which connects to a ftp server every 30 seconds and download
> files if there is any.
> I think due to some network changes libcurl fails to connect and i mostly
> get the error " couldn't connect to server".
> Sometimes "a timeout was reached" or "failed to receive data from peer".
> So i am wondering what is the default timeout value libcurl uses?
In general, libcurl doesn't do timeouts on its own but instead let your system
decide those things. There are however a few internal timeout settings. I
figure the best way is to check the code for those. They should probably get
documented properly somewhere.
> I am guessing CURLOPT_CONNECTTIMEOUT is the option to use if i want to
> control the timeouts?
If you want to control the connection timeout, that is your friend!
-- Commercial curl and libcurl Technical Support: http://haxx.se/curl.htmlReceived on 2005-11-23