cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: timeout when you unplug the ethernet cable?

From: Christoph Rupp <crupp_at_umc-web.de>
Date: Tue, 21 Dec 2004 11:21:36 +0100

Hi Daniel,

Daniel Stenberg wrote:
>> i don't really want to touch the system-wide settings... is it
>> possible to implement timeouts with sigalarm or a timer or something
>> similar?
>
>
> Perhaps you want CURLOPT_TIMEOUT:
>
> http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTTIMEOUT

this option doesn't work for me. my application downloads a
radio-stream, and if i use CURLOPT_TIMEOUT = 10 then after 10 seconds of
downloading the player stops, although it still receives data.

> ... or CURLOPT_LOW_SPEED_LIMIT and friend:
>
> http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTLOWSPEEDLIMIT
> http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTLOWSPEEDTIME

i tried CURLOPT_LOW_SPEED_LIMIT but it had no effect - i started playing
the stream, pulled the ethernet cable and everything froze, but the
application didn't terminate due to a timeout.

Thanks
Chris
Received on 2004-12-21