curl / Mailing Lists / curl-library / Single Mail
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.

Re: Regarding Async DNS resolver

From: Daniel Stenberg via curl-library <>
Date: Mon, 22 Jul 2019 18:57:06 +0200 (CEST)

On Mon, 22 Jul 2019, Amit wrote:

> I have done the changes as per your suggestion - that is, to create socket
> pair during async thread initialization, return the read socket fd to client
> application and write dummy data to signal client that socket is readable.
> I did the testing on version which I am using (7.57.11) and verified the
> changes.
> Could you please review the attached patch file (generated after merging the
> changes to latest libcurl) ? .

Thanks! This is a great start.

First, I had to edit it slighly to fix some checksrc warnings and I changed
Curl_resolver_getsock() to not do the short expire things if there is a file
descriptor to wait for as that would defeat its purpose a bit.

I created a PR out of this for you so that it'll run all the tests first:

It needs to go green in all the tests to be subject for merge. Since this code
seems to be using socketpair() unconditionally (ie also on Windows) I assume
this won't build on Windows. It need to make that conditionally on the
presense of that function adding #ifdef HAVE_SOCKETPAIR perhaps?

  / | Get the best commercial curl support there is - from me
                   | Private help, bug fixes, support, ports, new features
Received on 2019-07-22