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 ...

Get Cocoa in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.