|
|
binary encoded internet host addresses are held in this special class object. This class represents the 'generic' internet address data type. Other InetAddress derived objects hold addresses which are used only for specific purposes, such as for network masks, broadcast addresses, etc.
InetAddress () |
Create an Internet Address object with an empty (0.0.0.0) address.
InetAddress (struct in_addr) |
Convert the system internet address data type (struct in_addr) into an APE InetAddress object.
Parameters:
addr | struct of system used binary internet address. |
InetAddress (const char *address) |
Convert a null terminated ASCII host address string (example: "127.0.0.1") directly into an APE InetAddress object.
Parameters:
address | null terminated C string. |
char * getHostname (void) |
Provide a string representation of the value (Internet Address) held in the InetAddress object.
Returns: string representation of InetAddress.
bool isInetAddress (void) |
May be used to verify if a given InetAddress returned by another function contains a "valid" address, or "0.0.0.0" which is often used to mark "invalid" InetAddress values.
Returns: true if address != 0.0.0.0.
inline struct in_addr getAddress (void) |
Provide a low level system usable struct in_addr object from the contents of InetAddress. This is needed for services such as bind() and connect().
Returns: system binary coded internet address.