[svlug] gethostbyname()

Seth Daniel seth-svlug at sethdaniel.org
Sun Jan 27 11:07:01 PST 2002


On Sat, Jan 26, 2002 at 08:04:22PM -0800, Erik Fears wrote:
> The problem I found is that gethostbyname() blocks ( I have no idea what the
> timeout is ). I'm wondering if any linux C programmers (or UNIX programmers)
> on this list know a way to resolve a host in a way that will not block 
> (without using a seperate thread, or writing the DNS client from scratch).

You might try adns:

Home page:

I don't have any experience with this package.  The few times
I've needed non-blocking DNS lookups I've written my own.

Good luck.


More information about the svlug mailing list