rfm@gnu.org
)Copyright: (C) 2012 Free Software Foundation, Inc.
- Declared in:
- EcHost.h
This category provides additional methods to
standardise host names so that software can
consistently refer to a host by a single well
known name.
This mechanism, as well as
ensuring naming consistency, can be used to work
with logical names for hosts when the actual naming of
the hosts (ie in the domain name system) is not under
your control.
This operates by managing a map from the various names and addresses a host may be known by, to a single well known name. This host name may, but need not, be a public domain name.
The well known name methods are thread-safe, and on
initial use the NSUserDefaults system is queried to
set up two well known names automatically:
The
value of EcCurrentHost specifies the well known name
for the current host (the machine on which the software
is running).
The value of EcControlHost specifies
the well known name for the control host (the machine
on which control functions for your software are
centralised). If this is specified without
EcControlDomain, it is used as both the
well known name and the domain name.
The value
of EcControlDomain specifies the fully qualified domain
name (ie the name provided by the operating system) of
the control host. If it is specified without
EcControlHost, then it is used as the well
known name for the control host.
NB. the
defaults system is accessed via EcUserDefaults, so
if a defaults prefix other than Ec has been set, these
keys will use that alternative prefix.
nil
.
nil
if no such
association exists.