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

NSNetService — Mac OS X 10.2

Synopsis

NSNetService represents a network service that applications either publish or use as a client. A network service can be anything such as FTP, Telnet, SSH, HTTP, or any of the well-known services. A service can also be something of your own design. NSNetService provides application level access to the low-level Multicast DNS responder APIs. For more information about Rendezvous and the Net Services APIs in Foundation, see Chapter 6.

image with no caption

@interface NSNetService : NSObject
                                  // Initializers
   - (id)initWithDomain:(NSString *)domain 
                                 type:(NSString *)type 
                                 name:(NSString *)name;
   - (id)initWithDomain:(NSString *)domain 
                                 type:(NSString *)type 
                                 name:(NSString *)name 
                                 port:(int)port;
                                  // Accessor Methods
   - (void)setDelegate:(id)delegate;
   - (id)delegate;
   - (void)setProtocolSpecificInformation:(NSString *)specificInformation;
   - (NSString *)protocolSpecificInformation;
                                  // Instance Methods
   - (NSString *)name;
   - (NSArray *)addresses;
   - (NSString *)domain;
   - (void)publish;
   - (void)removeFromRunLoop:(NSRunLoop *)aRunLoop 
                                 forMode:(NSString *)mode;
   - (void)resolve;
   - (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop 
                                 forMode:(NSString *)mode;
   - (void)stop;
   - (NSString *)type;
                                 // Methods Implemented by the Delegate
   - (void)netService:(NSNetService *)sender 
                                 didNotPublish:(NSDictionary *)errorDict;
   - (void)netService:(NSNetService ...

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