I'm trying to get a listing of machines in my local domain, specifically ones running a administrative web se开发者_StackOverflowrvice (_asip-webadmin). I've been fooling with NSNetService but it would seem that it's only good for Bonjour listings (as I can trap them just fine). I've tried something along the lines of:
[mySearch searchForServicesOfType:@"_asip-webadmin._tcp." inDomain:@"local."];
which results in utter failure, or should I say the debugger gives me a blank stare back. A point in the right direction is all I need. Thanks!
I was on the right track. The problem was I was using the wrong service name.
I mistakenly looked in etc/services
for the service name, whereas I should have looked here:
http://www.dns-sd.org/servicetypes.html
The following line does work for what I needed:
[mySearch searchForServicesOfType:@"_servermgr._tcp." inDomain:@"local."];
Assume mySearch
is of type NSNetServiceBrowser
.
精彩评论