O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSNetServiceBrowser — Mac OS X 10.2

Synopsis

NSNetServiceBrowser is the complement to NSNetService and it serves two purposes: searching for network domains, and searching for network services advertised on a given domain. When searching for domains we can either look for all domains, or only those that we have registration authority in. These searches are performed by invoking the methods searchForAllDomains and searchForRegistrationDomains, respectively. For more information about Rendezvous and the Net Services APIs in Foundation, see Chapter 6.

image with no caption

@interface NSNetServiceBrowser : NSObject
                                  // Initializers
   - (id)init;
                                  // Accessor Methods
   - (void)setDelegate:(id)delegate;
   - (id)delegate;
                                  // Instance Methods
   - (void)removeFromRunLoop:(NSRunLoop *)aRunLoop 
                                 forMode:(NSString *)mode;
   - (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop 
                                 forMode:(NSString *)mode;
   - (void)searchForAllDomains;
   - (void)searchForRegistrationDomains;
   - (void)searchForServicesOfType:(NSString *)type 
                                 inDomain:(NSString *)domainString;
   - (void)stop;
                                 // Methods Implemented by the Delegate
   - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser 
                                 didFindDomain:(NSString *)domainString
                                 moreComing:(BOOL)moreComing;
   - (void)netServiceBrowser:(NSNetServiceBrowser *)aNetServiceBrowser 
                                 didFindService:(NSNetService *)aNetService
                                 moreComing:(BOOL)moreComing;
   - (void)netServiceBrowser ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required