cURL / Mailing Lists / curl-library / Single Mail

curl-library

how to do the equivalent of a socket read timeout

From: Joel Firehammer <jfireham_at_tibco.com>
Date: Thu, 27 Sep 2012 16:02:40 +0000

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?

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