#include <IPAddress.h>
Public Member Functions | |
| TIPAddress () | |
| TIPAddress (const IString &rHostAddress, Uint uiPort) | |
| virtual | ~TIPAddress () |
| virtual Uint | getPort () const |
| virtual TString | getHostAddress () const |
| virtual bool | isEqual (const TIPAddress &rAddress) const |
| virtual TIPAddress * | createNewAddress ()=0 |
| virtual TString | getHostName () const =0 |
| virtual bool | getRawAddress (IList< Uint16 > &rArray) const =0 |
| virtual bool | isValid () const =0 |
| virtual struct sockaddr & | getSocketAddress () const =0 |
| virtual Int | getSocketAddressSize () const =0 |
| virtual int | getSocketFamily () const =0 |
| virtual void | reset ()=0 |
| virtual void | setPort (Uint uiPort) |
| bool | operator== (const TIPAddress &rAddress) const |
Static Public Member Functions | |
| static Retval | createAddress (const IString &rstrAddr, Uint uiPort, TIPAddress *&rpAddress) |
Protected Attributes | |
| Uint | m_uiPort |
| Port addresse. | |
| TString | m_strHostAddress |
| IP Addresse. | |
This class implememts the datatype to wrapp a IP address. IPv4 and IPv6 are supported.
| TIPAddress::TIPAddress | ( | ) |
Creates an empty address object
| TIPAddress::TIPAddress | ( | const IString & | rHostAddress, |
| Uint | uiPort | ||
| ) |
Creates an address out of the ip address and the port
| rHostAddress | : Host address as a string |
| uiPort | : Port |
| TIPAddress::~TIPAddress | ( | ) | [virtual] |
Destroys the address object
| Retval TIPAddress::createAddress | ( | const IString & | rstrAddr, |
| Uint | uiPort, | ||
| TIPAddress *& | rpAddress | ||
| ) | [static] |
Creates a new IP address out of a host address and port number. The host address can also be a host name only.
isalpha(rstrAddr.getChar(0))
| virtual TIPAddress* zeus::TIPAddress::createNewAddress | ( | ) | [pure virtual] |
Creates and returns a new address. This is abstract since the IPv4 or IPv6 address can be created
Implemented in zeus::TBTAddress, zeus::TIPv4Address, and zeus::TIPv6Address.
| TString zeus::TIPAddress::getHostAddress | ( | ) | const [inline, virtual] |
Returns the host address
| virtual TString zeus::TIPAddress::getHostName | ( | ) | const [pure virtual] |
Returns the host name of this ip. This is done with a reverse lookup.
Implemented in zeus::TBTAddress, zeus::TIPv4Address, and zeus::TIPv6Address.
| Uint zeus::TIPAddress::getPort | ( | ) | const [inline, virtual] |
Returns the port
Returns the raw byte address of the ip address
| rArray | : Return parameter |
| true | : IP address returned |
| false,: | error returning address (invalid address) |
Implemented in zeus::TBTAddress, zeus::TIPv4Address, and zeus::TIPv6Address.
| virtual struct sockaddr& zeus::TIPAddress::getSocketAddress | ( | ) | const [read, pure virtual] |
returns the socket address
Implemented in zeus::TBTAddress, zeus::TIPv4Address, and zeus::TIPv6Address.
| virtual Int zeus::TIPAddress::getSocketAddressSize | ( | ) | const [pure virtual] |
returns the size of the socket address
Implemented in zeus::TBTAddress, zeus::TIPv4Address, and zeus::TIPv6Address.
| virtual int zeus::TIPAddress::getSocketFamily | ( | ) | const [pure virtual] |
returns the family of the socket address
Implemented in zeus::TBTAddress, zeus::TIPv4Address, and zeus::TIPv6Address.
| bool zeus::TIPAddress::isEqual | ( | const TIPAddress & | rAddress ) | const [inline, virtual] |
checks if the address is equal to this address.
| rAddress | : Address instance |
| true | : Addresses are equal |
| false,: | Addresses are not equal |
| virtual bool zeus::TIPAddress::isValid | ( | ) | const [pure virtual] |
checks if the address is valid
Implemented in zeus::TBTAddress, zeus::TIPv4Address, and zeus::TIPv6Address.
| bool zeus::TIPAddress::operator== | ( | const TIPAddress & | rAddress ) | const [inline] |
| virtual void zeus::TIPAddress::reset | ( | ) | [pure virtual] |
resets the address depending on the internal socket structure
Implemented in zeus::TBTAddress, zeus::TIPv4Address, and zeus::TIPv6Address.
| void zeus::TIPAddress::setPort | ( | Uint | uiPort ) | [inline, virtual] |
sets the new port of an address
Reimplemented in zeus::TIPv4Address, and zeus::TIPv6Address.
TString zeus::TIPAddress::m_strHostAddress [protected] |
IP Addresse.
Uint zeus::TIPAddress::m_uiPort [protected] |
Port addresse.