cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Timeout on receiving data from a HTTP POST

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 15 Aug 2006 21:09:29 +0200 (CEST)

On Tue, 15 Aug 2006, jessica rearick wrote:

> I am using the a callback function in the following code to receive the
> response from a HTTP POST. The majority of the time it works. I have run
> into a case where I have not received a response back for some reason, and I
> dont know why. Now my process is stuck in a loop waiting for a response. Is
> there some option that I can set so that the read will timeout when trying
> to recieve the response??

Sure, there's a bunch of options: CURLOPT_TIMEOUT, CURLOPT_PROGRESSFUNCTION
(by returning error from the callback) or even the CURLOPT_LOW_SPEED_LIMIT and
CURLOPT_LOW_SPEED_TIME combo.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-08-15