[Twisted-Python] Twisted names client.getHostbyName dual-stack operation

Maciej Wasilak wasilak at gmail.com
Mon Jan 6 14:33:20 MST 2014


Hello,

6 sty 2014 12:50 "Phil Mayers" <p.mayers at imperial.ac.uk> napisał(a):
> IMO *all* applications should *always* use getaddrinfo() for resolution
of user-supplied names. It really really annoys me when people decide to
re-invent it - this is hard to get right, and apps like Chrome having their
own implementation precludes things like DHCP-based 6724 tables in the
future.
>
> So yes, use "deferToThread" and "getaddrinfo". Note that you should not,
in general, specify the address family; let the AI_ADDRCONFIG flag sort
that out for you.
>

Thank you very much for your answers. DeferToThread works fine, I just had
the (wrong) impression that names is the preferred solution.
Best Regards
Maciej Wasilak
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20140106/2565788c/attachment.html>


More information about the Twisted-Python mailing list