|
|
This class manages an internet address.
|
Constructor for an empty internet address.
|
Constructor for an internet address from an internet address.
Parameters:
address | Internet address. |
|
Constructor for a internet address given by a string. Examples: "gaffel:7500", "12.34.56.78:7500", "3ffe:4711::0!7500", "odin:7500", "ipv6-odin:7500".
Parameters:
address | Address string. |
|
Constructor for a internet address given by host name and port.
Parameters:
hostName | Host name. |
port | Port number. |
|
Constructor for INADDR_ANY address with given port.
Parameters:
port | Port number. |
|
Constructor for a internet address from the system's sockaddr structure. The sockaddr structure may be sockaddr_in (IPv4) or sockaddr_in6 (IPv6).
Parameters:
address | sockaddr. |
length | Length of sockaddr (sizeof(sockaddr_in) or sizeof(sockaddr_in6)). |
~ |
Destructor.
void |
Reset internet address.
Reimplemented from SocketAddress.
void |
Initialize internet address from internet address.
void |
Initialize internet address with INADDR_ANY and given port.
Parameters:
port | Port number. |
void |
Initialize internet address with given host name and port.
Parameters:
hostName | Host name. |
port | Port number. |
inline InternetAddress& |
Implementation of = operator.
inline card16 |
[const]
Get port of address.
inline void |
Set port of address.
enum |
setPrintFormat() printing formats.
inline PrintFormat |
[const]
Get printing format.
Returns: Print format.
inline void |
Set printing format.
Parameters:
format | Print format. |
bool |
[const]
isValid() implementation of SocketAddress.
Reimplemented from SocketAddress.
inline bool |
[const]
Check, if the address is null.
Returns: true, if the address is not null; false otherwise.
String |
[const]
Get address string.
Returns: Address string.
Reimplemented from SocketAddress.
inline bool |
[const]
Check, if internet address is an IPv4 or IPv4-mapped address.
Returns: true, if address is an IPv4 or IPv4-mapped address; false otherwise.
inline bool |
[const]
Check, if internet address is a real (not IPv4-mapped) IPv6 address. Addresses which return true here can be used with labeled flows by class Socket.
Returns: true, if address is real IPv6; false otherwise.
InternetAddress |
[static]
Get the local host address. The parameter peer gives the address of the other host.
Examples: localhost => localhost address (127.0.0.1 or ::1). ethernet-host => ethernet interface address. internet-address => dynamic-ip address set by pppd.
Parameters:
address | Reference to SocketAddress to write address to. |
peer | Address of peer. |
Returns: true, if call was successful; false otherwise.
cardinal |
[const]
getSystemAddress() implementation of SocketAddress
Reimplemented from SocketAddress.
bool |
setSystemAddress() implementation of SocketAddress.
Reimplemented from SocketAddress.
cardinal |
[static]
Wrapper for system's gethostbyname() function. This version does support IPv6 addresses even if the system itself does not support IPv6. IPv6 addresses are then converted to IPv4 if possible (IPv4-mapped IPv6).
Parameters:
name | Host name. |
myadr | Storage space to save a IPv6 address (16 bytes). |
length | Length of the address saved in myaddr or 0 in case of failure. |
inline bool |
[static]
Check, if IPv6 support is available.
Returns: true, if IPv6 support is available; false otherwise.
static bool |
Static variable which shows the availability of IPv6. Setting this variable to false on an IPv6 system simulates an IPv4-only system.
Do *not* change this variable if Socket or InternetAddress objects are already in use!!!
int |
[const]
Implementation of == operator.
inline int |
[const]
Implementation of != operator.
int |
[const]
Implementation of < operator.
inline int |
[const]
Implementation of <= operator.
int |
[const]
Implementation of > operator.
inline int |
[const]
Implementation of >= operator.
inline PortableAddress |
[const]
Get PortableAddress from InternetAddress.
Returns: PortableAddress.
|
Constructor for InternetAddress from PortableAddress.
Parameters:
address | PortableAddress. |
void |
Initialize InternetAddress from PortableAddress.
Parameters:
address | PortableAddress. |