Protocol: NSNetServiceBrowserDelegate

Overview

The NSNetServiceBrowserDelegate protocol defines the optional methods implemented by delegates of NSNetServiceBrowser objects.Tells the delegate the sender found a domain.Tells the delegate the sender found a service.Tells the delegate that a search was not successful.Tells the delegate the a domain has disappeared or has become unavailable.Tells the delegate a service has disappeared or has become unavailable.Tells the delegate that a search was stopped.Tells the delegate that a search is commencing.

Instance Method Summary (collapse)

Instance Method Details

- (Object) netServiceBrowser(netServiceBrowser, didFindDomain:domainName, moreComing:moreDomainsComing)

Tells the delegate the sender found a domain. 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.

Parameters:

  • netServiceBrowser (NSNetServiceBrowser)

    Sender of this delegate message.

  • domainName (String)

    Name of the domain found by netServiceBrowser.

  • moreDomainsComing (Boolean)

    YES when netServiceBrowser is waiting for additional domains. NO when there are no additional domains.

Returns:

- (Object) netServiceBrowser(netServiceBrowser, didFindService:netService, moreComing:moreServicesComing)

Tells the delegate the sender found a service. 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.

Parameters:

  • netServiceBrowser (NSNetServiceBrowser)

    Sender of this delegate message.

  • netService (NSNetService)

    Network service found by netServiceBrowser. The delegate can use this object to connect to and use the service.

  • moreServicesComing (Boolean)

    YES when netServiceBrowser is waiting for additional services. NO when there are no additional services.

Returns:

- (Object) netServiceBrowser(netServiceBrowser, didNotSearch:errorInfo)

Tells the delegate that a search was not successful.

Parameters:

  • netServiceBrowser (NSNetServiceBrowser)

    Sender of this delegate message.

  • errorInfo (Hash)

    Dictionary with the reasons the search was unsuccessful. Use the dictionary keys NSNetServicesErrorCode and NSNetServicesErrorDomain to retrieve the error information from the dictionary.

Returns:

- (Object) netServiceBrowser(netServiceBrowser, didRemoveDomain:domainName, moreComing:moreDomainsComing)

Tells the delegate the a domain has disappeared or has become unavailable. 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.

Parameters:

  • netServiceBrowser (NSNetServiceBrowser)

    Sender of this delegate message.

  • domainName (String)

    Name of the domain that became unavailable.

  • moreDomainsComing (Boolean)

    YES when netServiceBrowser is waiting for additional domains. NO when there are no additional domains.

Returns:

- (Object) netServiceBrowser(netServiceBrowser, didRemoveService:netService, moreComing:moreServicesComing)

Tells the delegate a service has disappeared or has become unavailable. 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.

Parameters:

  • netServiceBrowser (NSNetServiceBrowser)

    Sender of this delegate message.

  • netService (NSNetService)

    Network service that has become unavailable.

  • moreServicesComing (Boolean)

    YES when netServiceBrowser is waiting for additional services. NO when there are no additional services.

Returns:

- (Object) netServiceBrowserDidStopSearch(netServiceBrowser)

Tells the delegate that a search was stopped. When netServiceBrowser receives a stop message from its client, netServiceBrowser sends a netServiceBrowserDidStopSearch: message to its delegate. The delegate then performs any necessary cleanup.

Parameters:

Returns:

- (Object) netServiceBrowserWillSearch(netServiceBrowser)

Tells the delegate that a search is commencing. 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.

Parameters:

Returns: