[Top][All Lists]

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

Re: Asynchronous DNS

From: Lars Magne Ingebrigtsen
Subject: Re: Asynchronous DNS
Date: Sun, 24 Jan 2016 14:56:30 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

Stefan Monnier <address@hidden> writes:

>> (resolve-name "foo.bar"
>>   (lambda (status ip)
>>     (make-network-process :host "foo.bar" :ip ip ...)))
> If possible, I'd rather the async-dns-resolution be done directly as
> part of make-network-process.

If we go for a C-level solution here, then that would definitely be
preferable.  `make-network-process' would then take an :async parameter
and return as soon as it's started name resolution, returning a process
object in a new "resolving" state.  The connection would be completed
from the DNS callback, or from the event loop, possibly.

Error handling would be somewhat different in :async, 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]