Up
Authors
- Luke Howard (
lukeh@xedoc.com.au
)
-
- Richard Frith-Macdonald (
richard@brainstorm.co.uk
)
-
Version: 38442
Date: 2015-03-31 03:14:01 -0600 (Tue, 31 Mar 2015)
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*)
localizedName;
Availability: MacOS-X 10.6.0
If the receiver is the currentHost, returns the default
name of the computer, otherwise returns
nil
.
- (
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: Base
Likely to be changed/moved/removed at 1.17.0
Method summary
+ (
NSHost*)
localHost;
Availability: Base
Likely to be changed/moved/removed at 1.17.0
Up