curl / Mailing Lists / curl-library / Single Mail

curl-library

RE: timeouts

From: Erik Janssen <erik.janssen_at_axis.com>
Date: Mon, 9 Oct 2017 15:03:54 +0000

>> Is there some way to see at what timestamp the last read succeeded?

> Not really, but CURLOPT_WRITEFUNCTION is called every time there is data so you know that there hasn't been any data
> read since the last callback.

That is how I solved it, keep a timer of your own, restart it from the write function and when the timer fires the stream is considered dead. You need that logic anyway when not using TCP tunneling and payload comes in over a UDP socket.

Erik

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