]> git.meshlink.io Git - meshlink/commitdiff
Add an asynchronous DNS thread.
authorGuus Sliepen <guus@meshlink.io>
Thu, 23 May 2019 21:02:43 +0000 (23:02 +0200)
committerGuus Sliepen <guus@meshlink.io>
Tue, 7 Apr 2020 22:51:51 +0000 (00:51 +0200)
Add a thread dedicated to making DNS lookups. There are two queues, one
for pending DNS requests and one for done DNS requests. The async DNS
thread reads from the pending request queue, checks for each request if
the deadline has not been met yet, and if so calls getaddrinfo(). Once
the result is obtained, it adds that to the done request queue and
signals the main meshlink thread, which will then call the callback
function associated with the DNS request.


No differences found