Up
Authors
- Luke Howard (
lukeh@xedoc.com.au
)
-
- Richard Frith-Macdonald (
richard@brainstorm.co.uk
)
-
Version: 1.49
Date: 2005/10/11 19:09:25
Copyright: (C) 1996, 1997,1999 Free Software Foundation, Inc.
- Declared in:
- Foundation/NSHost.h
Availability: OpenStep
Instances of this class encapsulate host information. Constructors based on host name or numeric address are provided.
Method summary
+ (
NSHost*)
currentHost;
Availability: OpenStep
Get current host object.
+ (void)
flushHostCache;
Availability: OpenStep
Clear cache of host info instances.
+ (
NSHost*)
hostWithAddress: (
NSString*)address;
Availability: OpenStep
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"];
+ (
NSHost*)
hostWithName: (
NSString*)name;
Availability: OpenStep
Get info for host with given DNS name.
+ (BOOL)
isHostCacheEnabled;
Availability: OpenStep
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.
+ (void)
setHostCacheEnabled: (BOOL)flag;
Availability: OpenStep
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.
- (
NSString*)
address;
Availability: OpenStep
Return host address in "dotted decimal" notation, e.g. "192.42.172.1". Chosen arbitrarily if a host has more than one.
- (
NSArray*)
addresses;
Availability: OpenStep
Return all known addresses for host in "dotted decimal" notation, e.g. "192.42.172.1".
- (BOOL)
isEqualToHost: (
NSHost*)aHost;
Availability: OpenStep
Compare hosts. Hosts are equal if they share at least one address
- (
NSString*)
name;
Availability: OpenStep
Return host name. Chosen arbitrarily if a host has more than one.
- (
NSArray*)
names;
Availability: OpenStep
Return all known names for host.
- Declared in:
- Foundation/NSHost.h
Availability: OpenStep
Method summary
+ (
NSHost*)
localHost;
Availability: OpenStep
Up