[Twisted-Python] async hostname resolution

Bruce Mitchener bruce at cubik.org
Thu Nov 28 00:12:14 MST 2002


Tommi Virtanen wrote:
> On Sat, Nov 23, 2002 at 12:31:21PM -0600, Glyph Lefkowitz wrote:
> 
>>>And if it supported /etc/hosts? :)
>>
>>/etc/hosts.  Windows registry keys pointing at DNS servers.  ZoneAlarm.
>>Potentially there are wacky plug-ins for the system host resolution technique
>>which use LDAP rather than DNS.  (I don't know if any exist, but there's
>>nothing to say they couldn't ^_^).  Effectively replacing the system doman name
>>lookup is tricky, especially on win32.
> 
>   Note on mordern unixes: libnss (name service switch) allows to admin
>   to use _whatever he wants_ to resolve host names.

And I've already pointed this out to exarkun since he's doing the work, 
but on Linux, glibc 2.2.4 and later expose an asynchronous name lookup 
interface already.

Docs on it can be found here:

   http://people.redhat.com/drepper/asynchnl.pdf

Windows has an asynch interface as well:

 
http://msdn.microsoft.com/library/en-us/winsock/winsock/wsaasyncgethostbyname_2.asp

  - Bruce





More information about the Twisted-Python mailing list