Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Better resolver callbacks.

From: John Wiseman via curl-library <curl-library_at_cool.haxx.se>
Date: Thu, 15 Oct 2020 22:07:43 +0000

hi, list

I'm trying to avoid flooding the dns resolver when using multi interface. I know it's on the TODO list, but I think it may be doable from user side with callbacks.

For example, a callback to inform the start of lookup which passes in the name to be resolved. User can return some value in this callback to inform curl to pause on the beginning of lookup. Another callback to inform the end of lookup which passes in the name being resolved and the result.

With those 2 callbacks, when encountering the first lookup of a name, user can set a flag for this name and pause subsequent callbacks with same name, and put their handles in a waiting queue. When the first lookup finished successfully, all waiting handles are unpaused. When the first lookup failed, all waiting handles also fail.

regards, John Wiseman

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