libxev icon indicating copy to clipboard operation
libxev copied to clipboard

Feature Request: async dns

Open binarycraft007 opened this issue 2 years ago • 3 comments

Hi Mitchell,

Nice library, can we add async dns to the roadmap, because it's really helpful for network programming.

Thanks

binarycraft007 avatar Apr 04 '23 06:04 binarycraft007

I'd be happy to add this if there is a reasonable way to do this by operating system. I'm unfamiliar with the low level APIs available since I always used a higher level library for async DNS. It would help if you could suggest the low-level APIs on Linux, Windows, and Mac that could enable this.

mitchellh avatar Apr 18 '23 22:04 mitchellh

libuv seems to just run getaddrinfo (Unix-like, GetAddrInfoW for Windows) in a thread pool.

https://github.com/c-ares/c-ares is what libcurl uses and seems to be manually constructing the DNS requests and directly communicating with the nameserver over TCP. Didn't see how it's getting the nameservers.

rsepassi avatar Aug 31 '23 22:08 rsepassi