Conforms to | |
Framework | /System/Library/Frameworks/Foundation.framework |
Availability | Available in iOS 4.0 and later. |
Declared in | NSNetServices.h |
Companion guides | |
The NSNetServiceBrowserDelegate
protocol defines the optional methods implemented by delegates of NSNetServiceBrowser
objects.
Tells the delegate the sender found a domain.
- (void)netServiceBrowser:(NSNetServiceBrowser *)netServiceBrowser didFindDomain:(NSString *)domainName moreComing:(BOOL)moreDomainsComing
Sender of this delegate message.
Name of the domain found by netServiceBrowser.
YES
when netServiceBrowser is waiting for additional domains. NO
when there are no additional domains.
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.
– searchForBrowsableDomains
(NSNetServiceBrowser)– searchForRegistrationDomains
(NSNetServiceBrowser)NSNetServices.h
Tells the delegate the sender found a service.
- (void)netServiceBrowser:(NSNetServiceBrowser *)netServiceBrowser didFindService:(NSNetService *)netService moreComing:(BOOL)moreServicesComing
Sender of this delegate message.
Network service found by netServiceBrowser. The delegate can use this object to connect to and use the service.
YES
when netServiceBrowser is waiting for additional services. NO
when there are no additional services.
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.
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.
– searchForServicesOfType:inDomain:
(NSNetServiceBrowser)NSNetServices.h
Tells the delegate that a search was not successful.
- (void)netServiceBrowser:(NSNetServiceBrowser *)netServiceBrowser didNotSearch:(NSDictionary *)errorInfo
Sender of this delegate message.
Dictionary with the reasons the search was unsuccessful. Use the dictionary keys NSNetServicesErrorCode
and NSNetServicesErrorDomain
to retrieve the error information from the dictionary.
NSNetServices.h
Tells the delegate the a domain has disappeared or has become unavailable.
- (void)netServiceBrowser:(NSNetServiceBrowser *)netServiceBrowser didRemoveDomain:(NSString *)domainName moreComing:(BOOL)moreDomainsComing
Sender of this delegate message.
Name of the domain that became unavailable.
YES
when netServiceBrowser is waiting for additional domains. NO
when there are no additional domains.
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.
NSNetServices.h
Tells the delegate a service has disappeared or has become unavailable.
- (void)netServiceBrowser:(NSNetServiceBrowser *)netServiceBrowser didRemoveService:(NSNetService *)netService moreComing:(BOOL)moreServicesComing
Sender of this delegate message.
Network service that has become unavailable.
YES
when netServiceBrowser is waiting for additional services. NO
when there are no additional services.
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.
NSNetServices.h
Tells the delegate that a search was stopped.
- (void)netServiceBrowserDidStopSearch:(NSNetServiceBrowser *)netServiceBrowser
Sender of this delegate message.
When netServiceBrowser receives a stop
message from its client, netServiceBrowser sends a netServiceBrowserDidStopSearch:
message to its delegate. The delegate then performs any necessary cleanup.
– stop
(NSNetServiceBrowser)NSNetServices.h
Tells the delegate that a search is commencing.
- (void)netServiceBrowserWillSearch:(NSNetServiceBrowser *)netServiceBrowser
Sender of this delegate message.
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.
NSNetServices.h
Last updated: 2010-03-22