[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Asynchronous DNS

From: Lars Ingebrigtsen
Subject: Re: Asynchronous DNS
Date: Mon, 01 Feb 2016 03:36:13 +0100
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux)

Both GnuTLS and normal sockets now use asynchronous DNS resolution, if

I've reworked how TLS connections are set up, too as a result, and I
think the new version is a bit more logical.

Previously you called make-network-socket, and then called gnutls-boot
on that socket to "make it into" a TLS socket, which is a kinda low
level of doing that stuff.  You can still do that, but you can now also
pass in the GnuTLS boot parameters with the new :tls-parameters keyword,
and then make-network-socket will do everything for you.

As far as I can tell, the code works both with and without getaddrinfo,
getaddrinfo_a, TLS and nowait.  That's quite a few combinations.  :-)

I've also skimmed the getaddrinfo_a source code, and it's kinda
trivial.  Perhaps it would be a good idea to just replace the
getaddrinfo_a stuff with our own little async DNS library.

Basically all it does is start a new thread that does getaddrinfo, and
then stashes the response somewhere.  The library supports doing more
than that (async callbacks etc), but we don't need all that stuff.  So
perhaps it makes more sense just to implement this ourselves, and then
it would also work on non-glibc systems...

(We'd need to support gethostbyname, too, of course.)

(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no

reply via email to

[Prev in Thread] Current Thread [Next in Thread]