| getAddress |
([String host]) |
yoix.net |
| |
Returns the IP address of
host,
which should be a name that can be resolved by DNS or an IP address,
or the local host if no argument is given.
The result is an array of integers in network byte order,
so the highest order byte of the address is in the first element
of the array.
The result will be
NULL
if the host cannot be found.
| |
| Example: |
The program,
import yoix.*.*;
Array a = getAddress();
printf("%d.%d.%d.%d\n", a[0], a[1], a[2], a[3]);
writes the IP address of your local host on standard output.
| | |
| Return: |
Array
| | |
| See Also: |
getAllByName,
getHostAddress,
getHostName,
getInterfaceAddress,
getInterfaceAddresses,
isAnyLocalAddress,
isLinkLocalAddress,
isLoopbackAddress,
isMCGlobal,
isMCLinkLocal,
isMCNodeLocal,
isMCOrgLocal,
isMCSiteLocal,
isMulticastAddress,
isReachable,
isSiteLocalAddress
|
|
Yoix is a registered trademark of AT&T Inc.
|