This worked; thanks.  I missed that about the timer callback being 
non-repeating.

-----Original Message-----
From: curl-library <[email protected]> On Behalf Of Daniel 
Stenberg via curl-library
Sent: Tuesday, December 3, 2019 11:26 PM
To: Sean Burford via curl-library <[email protected]>
Cc: Daniel Stenberg <[email protected]>
Subject: Re: Problem where timer callback keeps setting a 0 timer

On Wed, 4 Dec 2019, Sean Burford via curl-library wrote:

> Reading the man page
> <https://urldefense.com/v3/__https://curl.haxx.se/libcurl/c/CURLMOPT_T
> IMERFUNCTION.html__;!2E0gRdhhnqPNNL0!3Xdhcwu1h6hZBNAFO6IP4zXJSEvr46d9v
> gCclyOfy6p3AI55AHA7Yx-5ygd1SRGv$ >, it looks like calls to the timer 
> function request a single shot timer.  Your description makes it sound 
> like you set up a periodic timer that fires every timeout_ms 
> milliseconds.  It shouldn't be necessary for curl to provide a -1 
> cancellation because the timer was meant to be a single shot, it's only 
> specified to fire once.

That's exactly right. The man page calls it "a non-repeating timer". A timeout 
value 0 then means fire ONCE right away. -1 means cancel the current existing 
timer and all other (positive) values means fire off a single-time timer in 
this many milliseconds.

> The example on the man page may be a source of confusion.

Yah, I'm not overly happy with that one. If someone can come up with a nicer 
and cleaner example to use there, I'm interested!

-- 

  / daniel.haxx.se | Get the best commercial curl support there is - from me
                   | Private help, bug fixes, support, ports, new features
                   | 
https://urldefense.com/v3/__https://www.wolfssl.com/contact/__;!2E0gRdhhnqPNNL0!3Xdhcwu1h6hZBNAFO6IP4zXJSEvr46d9vgCclyOfy6p3AI55AHA7Yx-5yj0m2ASn$
-------------------------------------------------------------------
Unsubscribe: 
https://urldefense.com/v3/__https://cool.haxx.se/list/listinfo/curl-library__;!2E0gRdhhnqPNNL0!3Xdhcwu1h6hZBNAFO6IP4zXJSEvr46d9vgCclyOfy6p3AI55AHA7Yx-5yqTl5K9a$
 
Etiquette:   
https://urldefense.com/v3/__https://curl.haxx.se/mail/etiquette.html__;!2E0gRdhhnqPNNL0!3Xdhcwu1h6hZBNAFO6IP4zXJSEvr46d9vgCclyOfy6p3AI55AHA7Yx-5yor5ekiw$
 

-------------------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-library
Etiquette:   https://curl.haxx.se/mail/etiquette.html

Reply via email to