[Twisted-Python] async hostname resolution

Jp Calderone exarkun at meson.dyndns.org
Sat Nov 23 17:10:07 EST 2002

On Sat, Nov 23, 2002 at 10:17:05AM +0100, Matthias Urlichs wrote:
> Hi,

  Hello :)

> Jp Calderone:
> >   I removed the type argument, since it complicates implementation for other
> > reactors, isn't really useful in 99% of cases, and never worked when set to
> > anything other than A (1) anyway.  Maybe it should be deprecated first for a
> > while, but I doubt anyone's using it anyway so it may not matter.
> > 
> What -- you never look up records other than A?
> I've got a bunch of useful candidates here -- PTR, NS, SOA, CNAME, MX ...
> and, guess what, I'm going to need all of them (except MX ;-) early
> next year.

  All record types are supported ;)  The question is just whether you should
go through the reactor interface to make queries about them, or if you
should use the "real" name lookup API instead.  Essentially..

    from twisted.internet import reactor
    from twisted.protocols import dns
    reactor.resolve('somehost.com', dns.MX).addCallback(whatever)


    from twisted.names import client

  I can't envision any circumstances where the core would want to do lookups
other than of A records, so supporting them /without/ adding a dependancy of
twisted.internet on twisted.names (something there are good reasons to want
to avoid) seems like an unecessary burden on anyone else who wants to
implement the reactor API.


 5:00pm up 22 days, 3:54, 3 users, load average: 0.00, 0.00, 0.00
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20021123/9ca4467c/attachment.pgp 

More information about the Twisted-Python mailing list