Reputation: 1243
I am using an NSNetServiceBrowser to find services on my network. It can find them, but is unable to resolve any of them, neither mine nor the ones built in to my computer. When I check the domain of the unresolved service, I get "." for each one. The host is also always "(null)" when I NSLog it. In addition, it appears that the name of the service is actually the first part of the type (eg. I publish my service with type "_iListen._tcp." and the name shows up as "_iListen". The type also shows up as "_tcp.local."). My code for searching for services is:
[browser searchForServicesOfType:@"_services._dns-sd._udp." inDomain:@""];
Note: This is being done on an iPhone.
Upvotes: 1
Views: 404
Reputation: 539815
Browsing for "_services._dns-sd._udp." is a meta-query which lists all service types in the network. It makes no sense to resolve the responses. See Technical Q&A QA1337.
You have to browse for "_iListen._tcp." to find services of your type.
The "dns-sd" tool can be used on the OS X command line to test browsing/lookup/resolving.
Upvotes: 2