Re: straight-C DNS lookup with timeout?
Re: straight-C DNS lookup with timeout?
- Subject: Re: straight-C DNS lookup with timeout?
- From: Philip George <email@hidden>
- Date: Thu, 2 Jan 2003 09:39:13 -0600
excellent. the bind implementation seems perfect. thanks, chris.
- philip
On Thursday, January 2, 2003, at 09:03 AM, Chris Ridd wrote:
On 2/1/03 2:25 pm, Philip George <email@hidden> wrote:
Okay, I think the answer to my dns timeout problem is to go back to
the
pthread killer solution. I got the timeout to work nicely using
pthread_cancel() and contrary to popular speculation, it doesn't
unleash any havoc on my memory footprint.
Here's the hitch though... gethostbyaddr() isn't threadsafe and it
really shows. I get all kinds of whacky garbledygook from it when
executed in separate pthreads. The answer is gethostbyaddr_r(), but
no
such animal yet exists in OS X. So, I'll need to implement my own
gethostbyaddr_r(). Has anyone done this already or seen it somewhere
online?
BIND 9 (www.isc.org) contains this function in the lwres (lightweight
resolver?) lib.
FreeBSD might also have something that could be easily ported, but I
didn't
look very hard :-(
Cheers,
Chris
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.