开发者

Trying to find devices on network - iOS5

Not having any luck finding devices.

I have tried the following:

 NSNetServiceBrowser *browser = [[NSNetServiceBrowser alloc] init];
    [browser setDelegate:self];
    [browser searchForBrowsableDomains];
    [browser searchForRe开发者_开发技巧gistrationDomains];



- (void)netServiceBrowser:(NSNetServiceBrowser *)netServiceBrowser didFindDomain:(NSString *)domainName moreComing:(BOOL)moreDomainsComing{

    NSLog(@"name %@", domainName);


}
- (void)netServiceBrowserDidStopSearch:(NSNetServiceBrowser *)netServiceBrowser{
    NSLog(@"stopped");   

}

From what I have read, I should be getting a list of devices on the network. It's not doing anything. None of the delegate methods are getting called.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜