While I don't speak for Apple, we ran into this with Daylite Server, and found out that you shouldn't be using those calls.

I got a similar response, I had been using NSHost previously and hadn't noticed any delay so assumed it was using a local backing store. I ran the same code on the network at WWDC and observed one minute plus delays as it waited for a multicast response.

This gave rise to my new rule, test all network applications under WWDC network conditions, there's no replacement.

Basically, your computer is NOT the authority on your computer's host name. The DNS system is the authority. So these calls tend to trigger DNS lookups, at which point you're at the mercy of DNS, especially badly configured DNS, or DNS servers that are down, or what-have-you.

That's true. Perhaps the problem here lies in the interaction between DNS and mDNS. I really just want my local mDNS name, nothing more.

Perhaps it's worth noting that in 10.6 the DNS responder and mDNSResponder are one in the same. It's now the system wide lookup demon so that there's one authoritative local cache.

You haven't mentioned what you need the machine name for; as a miscellaneous networking example you can pass NULL for the host parameter to DNSServiceRegister which registers it for the current host and tracks changes; depending on wether you need it to pass to another API or if you need to display/otherwise use it you might get away with nil/NULL.

Keith
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to