#include <CNetworkAddress.h>
Public Member Functions | |
| CNetworkAddress () | |
| CNetworkAddress (int port) | |
| CNetworkAddress (const CString &hostname, int port) | |
| CNetworkAddress (const CNetworkAddress &) | |
| CNetworkAddress & | operator= (const CNetworkAddress &) |
manipulators | |
| void | resolve () |
| Resolve address. | |
accessors | |
| bool | operator== (const CNetworkAddress &address) const |
| Check address equality. | |
| bool | operator!= (const CNetworkAddress &address) const |
| Check address inequality. | |
| bool | isValid () const |
| Check address validity. | |
| const CArchNetAddress & | getAddress () const |
| Get address. | |
| int | getPort () const |
| Get port. | |
| CString | getHostname () const |
| Get hostname. | |
This class represents a network address.
Definition at line 26 of file CNetworkAddress.h.
|
|
Constructs the invalid address Definition at line 27 of file CNetworkAddress.cpp. |
|
|
Construct the wildcard address with the given port. Definition at line 36 of file CNetworkAddress.cpp. |
|
||||||||||||
|
Construct the network address for the given Definition at line 54 of file CNetworkAddress.cpp. |
|
|
Get address. Returns the address in the platform's native network address structure. Definition at line 184 of file CNetworkAddress.cpp. Referenced by CTCPSocket::bind(), CTCPListenSocket::bind(), CTCPSocket::connect(), and CClient::connect(). |
|
|
Get hostname. Returns the hostname passed to the c'tor sans any port suffix. Definition at line 196 of file CNetworkAddress.cpp. Referenced by CClient::connect(), and CClientTaskBarReceiver::updateStatus(). |
|
|
Get port. Returns the port passed to the c'tor as a suffix to the hostname, if that existed, otherwise as passed directly to the c'tor. Definition at line 190 of file CNetworkAddress.cpp. Referenced by CClient::connect(). |
|
|
Check address validity. Returns true if this is not the invalid address. Definition at line 178 of file CNetworkAddress.cpp. |
|
|
Check address inequality.
Returns true if this address is not equal to Definition at line 172 of file CNetworkAddress.cpp. References operator==(). |
|
|
Check address equality.
Returns true if this address is equal to Definition at line 166 of file CNetworkAddress.cpp. References m_address. Referenced by operator!=(). |
|
|
Resolve address.
Resolves the hostname to an address. This can be done any number of times and is done automatically by the c'tor taking a hostname. Throws XSocketAddress if resolution is unsuccessful, after which Definition at line 130 of file CNetworkAddress.cpp. Referenced by CClient::connect(). |
1.3.9.1