Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: Bonjour for Windows - Service IP Address
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bonjour for Windows - Service IP Address



Hey Chad,

I've been using the winsock API to get the ip address for a service on
the Windows platform but the dns lookup is painfully slow. On Mac, I'm
using CFNetServiceGetAddressing and it appears to be much faster. Is the
ip address for resolved services cached on the local machine by Bonjour?

The IP address is cached for around 2 to 4 minutes by mDNSResponder on both Mac OS X and Windows.




Is DNSServiceQueryRecord a faster alternative to getting a resolved
services' IP address on Windows (instead of using winsock)?

Yes, we recommend people use DNSServiceQueryRecord on Windows instead of gethostbyname. For some reason, the way the NSP architecture works, it waits for the built in Windows resolver to timeout before delivering the mDNS results to the client. This causes a minimum 2 second delay when resolving mDNS hostnames using gethostbyname. Using DNSServiceQueryRecord is the way to bypass this problem.


Best Regards,

-Marc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Bonjour-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Bonjour for Windows - Service IP Address (From: "Slater, Chad" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.