curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: timeouts

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 9 Oct 2017 15:31:27 +0200 (CEST)

On Mon, 9 Oct 2017, folkert wrote:

> I use curl to retrieve a video-stream of semi-infinite length.
> Now sometimes if the camera crashes, the video stream stops.
> I would like curl to timeout then.
> Is this possible?

I think this is answered in the FAQ here:

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

> From the manual I understood that CURLOPT_TIMEOUT_MS is for the whole
> session. I need a t/o for a single read.

libcurl doesn't expose the concept of individual reads so I don't understand
how that would work. It even uses non-blocking sockets internally so it
actually never really times out on a per-read level.

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2017-10-09