Skip to content

Instantly share code, notes, and snippets.

@dennda
Created September 12, 2011 20:49
Show Gist options
  • Save dennda/1212363 to your computer and use it in GitHub Desktop.
Save dennda/1212363 to your computer and use it in GitHub Desktop.
This is how not to do callbacks / resolveWithTimeout
- (void)netServiceBrowser:(NSNetServiceBrowser *)netServiceBrowser
didFindService:(NSNetService *)netService
moreComing:(BOOL)moreServicesComing {
netService.delegate = self;
[netService scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
[netService resolveWithTimeout:3.0];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment