cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: how to do the equivalent of a socket read timeout

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 28 Sep 2012 15:53:19 +0200 (CEST)

On Thu, 27 Sep 2012, Joel Firehammer wrote:

> I have code that can download a file that can be quite large. I would rather
> not set the CURLOPT_TIMEOUT, as I don't know how large it is. In java, I can
> use blocking IO and the combination of the connect and read timeouts. As I
> understand the cURL libraries use non-blocking IO, and does not have a read
> timeout equivalent. Can anyone recommend how I would do this, that is, after
> connect, timeout if I have not received any data for X amount if time?

I decided it was about time I added a new section to the FAQ:

    http://curl.haxx.se/docs/faq.html#I_want_a_different_time_out

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-28