Best strategy for overcoming excessive gethostbyname timeout.
Gabriel Genellina
gagsl-py2 at yahoo.com.ar
Fri Nov 27 21:15:09 EST 2009
En Fri, 27 Nov 2009 22:35:36 -0300, r0g <aioe.org at technicalbloke.com>
escribió:
> gethostbyname ignores setdefaulttimeout.
>
> How big a job is it to use non-blocking sockets to write a DNS lookup
> function with a customisable timeout? A few lines? A few hundred? I'd
> only need to resolve v4 addresses for the foreseeable.
This guy reports good results using GNU adns to perform asynchronous
queries:
http://www.catonmat.net/blog/asynchronous-dns-resolution/
Also, look for pydns. Don't be afraid of its age; it always worked fine
for me.
--
Gabriel Genellina
More information about the Python-list
mailing list