NSNetServiceBrowserDelegate Protocol Reference
| Conforms to | |
| Framework | /System/Library/Frameworks/Foundation.framework |
| Availability | Available in iOS 4.0 and later. |
| Declared in | NSNetServices.h |
| Companion guides | |
Overview
The NSNetServiceBrowserDelegate protocol defines the optional methods implemented by delegates of NSNetServiceBrowser objects.
Instance Methods
netServiceBrowser:didFindDomain:moreComing:
Tells the delegate the sender found a domain.
Parameters
- netServiceBrowser
Sender of this delegate message.
- domainName
Name of the domain found by netServiceBrowser.
- moreDomainsComing
YESwhen netServiceBrowser is waiting for additional domains.NOwhen there are no additional domains.
Discussion
The delegate uses this message to compile a list of available domains. It should wait until moreDomainsComing is NO to do a bulk update of user interface elements.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
See Also
-
– searchForBrowsableDomains(NSNetServiceBrowser) -
– searchForRegistrationDomains(NSNetServiceBrowser)
Declared In
NSNetServices.hnetServiceBrowser:didFindService:moreComing:
Tells the delegate the sender found a service.
Parameters
- netServiceBrowser
Sender of this delegate message.
- netService
Network service found by netServiceBrowser. The delegate can use this object to connect to and use the service.
- moreServicesComing
YESwhen netServiceBrowser is waiting for additional services.NOwhen there are no additional services.
Discussion
The delegate uses this message to compile a list of available services. It should wait until moreServicesComing is NO to do a bulk update of user interface elements.
Special Considerations
If the delegate chooses to resolve netService, it should retain netService and set itself as that service’s delegate. The delegate should, therefore, release that service when it receives the netServiceDidResolveAddress: or netService:didNotResolve: delegate messages of the NSNetService class.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
See Also
-
– searchForServicesOfType:inDomain:(NSNetServiceBrowser)
Declared In
NSNetServices.hnetServiceBrowser:didNotSearch:
Tells the delegate that a search was not successful.
Parameters
- netServiceBrowser
Sender of this delegate message.
- errorInfo
Dictionary with the reasons the search was unsuccessful. Use the dictionary keys
NSNetServicesErrorCodeandNSNetServicesErrorDomainto retrieve the error information from the dictionary.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
See Also
Declared In
NSNetServices.hnetServiceBrowser:didRemoveDomain:moreComing:
Tells the delegate the a domain has disappeared or has become unavailable.
Parameters
- netServiceBrowser
Sender of this delegate message.
- domainName
Name of the domain that became unavailable.
- moreDomainsComing
YESwhen netServiceBrowser is waiting for additional domains.NOwhen there are no additional domains.
Discussion
The delegate uses this message to compile a list of unavailable domains. It should wait until moreDomainsComing is NO to do a bulk update of user interface elements.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
Declared In
NSNetServices.hnetServiceBrowser:didRemoveService:moreComing:
Tells the delegate a service has disappeared or has become unavailable.
Parameters
- netServiceBrowser
Sender of this delegate message.
- netService
Network service that has become unavailable.
- moreServicesComing
YESwhen netServiceBrowser is waiting for additional services.NOwhen there are no additional services.
Discussion
The delegate uses this message to compile a list of unavailable services. It should wait until moreServicesComing is NO to do a bulk update of user interface elements.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
Declared In
NSNetServices.hnetServiceBrowserDidStopSearch:
Tells the delegate that a search was stopped.
Parameters
- netServiceBrowser
Sender of this delegate message.
Discussion
When netServiceBrowser receives a stop message from its client, netServiceBrowser sends a netServiceBrowserDidStopSearch: message to its delegate. The delegate then performs any necessary cleanup.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
See Also
-
– stop(NSNetServiceBrowser)
Declared In
NSNetServices.hnetServiceBrowserWillSearch:
Tells the delegate that a search is commencing.
Parameters
- netServiceBrowser
Sender of this delegate message.
Discussion
This message is sent to the delegate only if the underlying network layer is ready to begin a search. The delegate can use this notification to prepare its data structures to receive data.
Availability
- Available in iOS 2.0 and later.
- Available as part of an informal protocol prior to iOS 4.0.
See Also
Declared In
NSNetServices.h© 2010 Apple Inc. All Rights Reserved. (Last updated: 2010-03-22)