cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: how long will libcurl wait to get response?

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Tue, 24 Aug 2004 14:40:57 +0200 (CEST)

On Tue, 24 Aug 2004, nkb wrote:

> 1. Is there a way to specify how long would libcurl wait to get the response
> from server?

By default it waits as long as the connection is still alive. You can timeout
it by setting CURLOPT_TIMEOUT which limits the entire transfer to a set time,
or you can make the progress callback return error when you think enough time
has passed.

> I did a POST via https using libcurl. I would like it to wait for as long as
> possible before return with a failure. (my connection isnt very stable and
> sometimes it takes a long time to route to the right address)

libcurl does that by default.

> If my data from the server is rather huge (a few MB of text), how do I tell
> libcurl to wait and keep receving the data until the complete data is
> received before returning to me with the complete data?

libcurl does that by default.

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-08-24