AnyEvent::DNS questions
Marc Lehmann
schmorp at schmorp.de
Tue Mar 22 15:32:56 CET 2011
On Mon, Mar 21, 2011 at 08:30:43PM +0100, "Brane F. Gračnar" <brane.gracnar at planet9.si> wrote:
> Hmm, ok, what about specifying it as a last argument of callback?
Breaks existing users who expect resource data there.
I do plan to re-add it as second argument and break the API on the next
major version.
> What about patching resolve() to check hosts hash (which would be re-read
> every n seconds) in AnyEvent::DNS for 'a' and 'aaaa' request types before
> sending actual query to nameserver?
Well, first of all, reading the hosts file can block your process
indefinitely, so is only accaptable durign startup, or when doing
it asynchronously. Secondly, the hosts file does not contain any
dns information, so faking dns entries for them would *badly* break
AnyEvent::DNS.
The only place where hosts files could be used is during name lookup,
before DNS, as I explained before.
Patching DNS also breaks compatibility with basically all other existing
systems, none of which mix the hosts file into their DNS resolvers, so
it's really a bad idea to do it differently in AnyEvent.
--
The choice of a Deliantra, the free code+content MORPG
-----==- _GNU_ http://www.deliantra.net
----==-- _ generation
---==---(_)__ __ ____ __ Marc Lehmann
--==---/ / _ \/ // /\ \/ / schmorp at schmorp.de
-=====/_/_//_/\_,_/ /_/\_\
More information about the anyevent
mailing list