emacs-devel
[Top][All Lists]
Advanced

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

Re: Asynchronous DNS resolving


From: Eli Zaretskii
Subject: Re: Asynchronous DNS resolving
Date: Fri, 13 Feb 2015 10:46:04 +0200

> From: Lars Ingebrigtsen <address@hidden>
> Date: Fri, 13 Feb 2015 18:10:24 +1100
> 
> So perhaps doing what Firefox used to do in the 90s would be a possibly
> solution, anyway?  That is, have a teensy multi-threaded executable that
> reads commands from STDIN and outputs the replies on STDOUT.  Like
> lib-src/dns-helper.c or something.
> 
> The command format would be something like
> 
> <tag> <command> <data>
> 
> I.e.,
> 
> 45 lookup fsf.org
> 46 lookup images.fsf.org
> ...
> 
> (Tags for streaming commands and matching up the responses with the
> requests, a la IMAP.)
> 
> We'd then have something like
> 
> (with-domain-name-lookup (ip "fsf.org")
>   (message "We got %s and now we're going to connect" ip)
>   (with-url ("http://fsf.org"; :ip-address ip ...)
>     (pop-to-buffer (current-buffer))))
> 
> to do a completely asynchronous web request.
> 
> Or does anybody have a better idea for solving this problem?

Can't you simulate async resolution with timers?  Or even by opening a
network-process to the DNS server and talking to it directly (which
can be done asynchronously with filters and sentinels and stuff)?



reply via email to

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