When a client needs to find a service, it multicasts a message onto the network. The published servers respond. Notice, however, that with busy servers on a busy or slow network, this might take some time. So a browser is told to start a search, and then, as responses come in, the delegate is informed.
NSNetServiceBrowser has the following method:
- (void)searchForServicesOfType:(NSString *)type inDomain:(NSString *)domainString
This method kicks off the search for services of the given type in the given domain. Once again, @"" can be supplied as the domain.
The delegate gets sent these messages:
- (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser didFindService:(NSNetService *)aNetService moreComing:(BOOL)moreComing ...