Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

only call netServiceBrowserWillSearch Method, don't call other delagete mathods #30

Open
zichengbohan opened this issue Jul 5, 2022 · 0 comments

Comments

@zichengbohan
Copy link

I use DIscovery with this:
DiscoveryConfiguration *configurations = [[DiscoveryConfiguration alloc] initWithServiceType:@"_ptp.tcp." serviceNamePrefix:@""];
Discovery *discover = [[Discovery alloc] initWith:@[configurations] delegate:self serviceResolveTimeout:10];
[discover startDiscovery];
but, it only call netServiceBrowserWillSearch Method, don't call other delagete mathods.
public func netServiceBrowserWillSearch(
browser: NetServiceBrowser) {
print("11111111111will");
}

public func netServiceDidStop(_ sender: NetService) {
    print("11111111111WillSearch");
}

public func netServiceBrowser(_ browser: NetServiceBrowser, didFind service: NetService, moreComing: Bool) {
    print("11111111111");
    guard let item = item(serviceBrowser: browser) else { return }
    
    if item.isValidForService(netService: service) {
        item.netServices.insert(service)
        service.delegate = self
        service.resolve(withTimeout: serviceResolveTimeout)
    }
}

public func netServiceBrowser(_ browser: NetServiceBrowser, didNotSearch errorDict: [String: NSNumber]) {
    print("11111111111");
 }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant