curl / Mailing Lists / curl-library / Single Mail

curl-library

Re: curl_multi_timeout and curl_multi_wait

From: Mradula Nayak via curl-library <curl-library_at_cool.haxx.se>
Date: Fri, 9 Jun 2017 16:06:40 -0700

I am using 100 ms as timeout on curl_multi_wait.It runs fine with 100 ms. I
am trying to optimize it so that the activity doesn't have to wait 100ms if
there is no activity. I want to know thw optimal timeout for it, any
suggestions how I can find it?

Thanks,
Mradula

On Jun 9, 2017 2:55 PM, "Daniel Stenberg" <daniel_at_haxx.se> wrote:

On Fri, 9 Jun 2017, Mradula Nayak via curl-library wrote:

I am trying to determine the timeout for my curl_multi_wait. I was thinking
> of using curl_multi_timout to get the maximum time to wait for and then use
> that timeout for curl_multi_wait. Is this approach correct?
>

curl_multi_timout() already uses the "maximum time to wait" (for tranfer
purposes on that multi handle) internally so that it will never wait longer
than what's suitable. The timeout you should pass to this function is the
maximum time your app is fine to have the function lock up.

-- 
 / daniel.haxx.se

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