NSHost (EDExtensions)


Declared In:
NSHost+Extensions.h


Category Description

Various common extensions to NSHost.


Method Types

+ hostWithNameOrAddress:
+ localhost
+ loopbackAddress
+ broadcastAddress
+ localDomain
- fullyQualifiedName
- domain


Class Methods

broadcastAddress

+ (NSString *)broadcastAddress

Returns the broadcast address in the "typical" dotted numerical notation.


hostWithNameOrAddress:

+ (NSHost *)hostWithNameOrAddress:(NSString *)string

If string describes an internet address (in the "typical" dotted numerical notation) returns the host with that address. Otherwise returns the NSHost with the name string. In both cases, if caching is turned on and the cache already contains an NSHost with address/name, this method returns that object. Otherwise, this method creates a new instance and returns it.


localDomain

+ (NSString *)localDomain

Returns local domain name. On Windows this is simply the domain of the currentHost, on other platforms the system resolver is queried and the default domain name is returned.


localhost

+ (NSHost *)localhost

Returns the NSHost corresponding to the loopback address of the machine the process is running on.


loopbackAddress

+ (NSString *)loopbackAddress

Returns the loopback address in the "typical" dotted numerical notation.


Instance Methods

domain

- (NSString *)domain

Returns the domain part of a fully qualified name for the receiver, or nil if none can be determined.


fullyQualifiedName

- (NSString *)fullyQualifiedName

Returns a fully qualified name for the receiver, or nil if none can be determined.


Version 2.0 Copyright ©2002. All Rights Reserved.