NSNetService

NSNetService Mac OS X 10.2

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.

figs/cocn_1365.gif

@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 *)sender didNotResolve:(NSDictionary *)errorDict;
   - (void)netServiceDidResolveAddress:(NSNetService *)sender;
   - (void)netServiceDidStop:(NSNetService *)sender;
   - (void)netServiceWillPublish:(NSNetService *)sender;
   - (void)netServiceWillResolve:(NSNetService *)sender;



    Part II: API Quick Reference
    Chapter 13. Foundation Classes