On Jul 1, 2010, at 7:42 PM, Michael Jackson wrote: > Is there any way to bypass the system network preferences for DNS > servers to perform all DNS lookups from within a Cocoa app? For > example, I would like my app to always make DNS queries to a > particular pair of DNS servers.
I’m pretty sure that’s not directly possible, since DNS lookups are done by a shared daemon process, not by individual apps. What you could do is incorporate direct DNS-lookup code into your app (I’m sure there are open-source libraries for it), use that to resolve the hostname to an IP address, and then use that IP address with your favorite networking APIs instead of the hostname. (If you’re using NSURLConnection, you’d need to transform the raw address into dotted-quad form, or the equivalent for IPv6.) —Jens_______________________________________________ Cocoa-dev mailing list ([email protected]) 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 [email protected]
