This is a follow-on from a previous question, in the implementation, I have two methods, one which gets called when a particular service is found and the other when it vanishes. This might be a dumb question, but apart from the NSLog lines they are identical, what dictates which gets called?
// INTERFACE
@interface ITunesFinder : NSObject <NSNetServiceBrowserDelegate>
@end
.
// IMPLEMENT
@implementation ITunesFinder
// ------------------------------------------------------------------- **
-(void) netServiceBrowser: (NSNetServiceBrowser *) browser
didFindService: (NSNetService *) service
moreComing: (BOOL) moreComing {
[service resolveWithTimeout:10];
NSLog(@"Service Found: %@", [service name]);
}
// ------------------------------------------------------------------- **
-(void) netServiceBrowser: (NSNetServiceBrowser *) browser
didRemoveService: (NSNetService *) service
moreComing: (BOOL) moreComing {
[service resolveWithTimeout:10];
NSLog(@"Service Lost!: %@", [service name]);
}
@end
gary