Up

NSHost class reference

Authors

Luke Howard (lukeh@xedoc.com.au)
Richard Frith-Macdonald (richard@brainstorm.co.uk)

Version: 1.47

Date: 2004/09/23 08:19:29

Copyright: (C) 1996, 1997,1999 Free Software Foundation, Inc.


Contents -

  1. Software documentation for the NSHost class
  2. Software documentation for the NSHost(GNUstep) category

Software documentation for the NSHost class

NSHost : NSObject

Declared in:
Foundation/NSHost.h
Standards:

Instances of this class encapsulate host information. Constructors based on host name or numeric address are provided.

Method summary

currentHost 

+ (NSHost*) currentHost;

Get current host object.


flushHostCache 

+ (void) flushHostCache;

Clear cache of host info instances.


hostWithAddress: 

+ (NSHost*) hostWithAddress: (NSString*)address;

Get a host object. Hosts are cached for efficiency. The address must be an IPV4 "dotted decimal" string, e.g.

  NSHost aHost = [NSHost hostWithAddress:@"192.42.172.1"];
 


hostWithName: 

+ (NSHost*) hostWithName: (NSString*)name;

Get info for host with given DNS name.


isHostCacheEnabled 

+ (BOOL) isHostCacheEnabled;

Return host cache management. If enabled, only one object representing each host will be created, and a shared instance will be returned by all methods that return a host.


setHostCacheEnabled: 

+ (void) setHostCacheEnabled: (BOOL)flag;

Set host cache management. If enabled, only one object representing each host will be created, and a shared instance will be returned by all methods that return a host.


address 

- (NSString*) address;

Return host address in "dotted decimal" notation, e.g. "192.42.172.1". Chosen arbitrarily if a host has more than one.


addresses 

- (NSArray*) addresses;

Return all known addresses for host in "dotted decimal" notation, e.g. "192.42.172.1".


isEqualToHost: 

- (BOOL) isEqualToHost: (NSHost*)aHost;

Compare hosts. Hosts are equal if they share at least one address


name 

- (NSString*) name;

Return host name. Chosen arbitrarily if a host has more than one.


names 

- (NSArray*) names;

Return all known names for host.


Software documentation for the NSHost(GNUstep) category

NSHost(GNUstep)

Declared in:
Foundation/NSHost.h
Standards:

Adds synonym for +currentHost .

Method summary

localHost 

+ (NSHost*) localHost;

Synonym for +currentHost .



Up