• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: straight-C DNS lookup with timeout?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

References: 
 >Re: straight-C DNS lookup with timeout? (From: Chris Ridd <email@hidden>)

  • Prev by Date: Re: straight-C DNS lookup with timeout?
  • Next by Date: Re: [basic] retain an NSTextView object and update a window
  • Previous by thread: Re: straight-C DNS lookup with timeout?
  • Next by thread: Re: straight-C DNS lookup with timeout?
  • Index(es):
    • Date
    • Thread