The socket address interface.
More...
#include <murl_net_i_socket_address.h>
The socket address interface.
GetIpAddress() and GetPortNumber() returns the values set by SetIpAddress(), SetPortNumber(), SetAnyAddress(), SetBroadcastAddress() and SetLoopbackAddress() only.
The SetResolveHostName() method is safe to be used in the logic code. The ip-address is evaluated later by MakeSystemAddress().
GetHostName() returns the string set by SetResolveHostName() until MakeSystemAddress() evaluates the ip-address, which replaces the host name by the "real" name used for evaluation. The Net::ISocketClient and Net::ISocketServer implementation makes copies of all address objects, so that addresses passed to these classes are not affected by this mechanism.
(!) Do not use MakeSystemAddress() directly in the logic code, this method will wait for network response and is intend for internal socket implementation only.
Inherited by Murl::Net::SocketAddress.
◆ GetIpAddress()
virtual UInt32 Murl::Net::ISocketAddress::GetIpAddress |
( |
| ) |
const |
|
pure virtual |
Get the ip-address.
The ip-address format is 0xaabbccdd for "aaa.bbb.ccc.ddd".
- Returns
- The ip-address.
◆ GetPortNumber()
virtual UInt32 Murl::Net::ISocketAddress::GetPortNumber |
( |
| ) |
const |
|
pure virtual |
Get the port number.
- Returns
- The port number.
◆ GetHostName()
virtual String Murl::Net::ISocketAddress::GetHostName |
( |
| ) |
const |
|
pure virtual |
Get the host name.
- Returns
- The host name.
◆ GetDotNotation()
virtual String Murl::Net::ISocketAddress::GetDotNotation |
( |
| ) |
const |
|
pure virtual |
Get the dot notation string of the ip-address.
- Returns
- The dot notation string of the ip-address.
◆ GetDotPortNotation()
virtual String Murl::Net::ISocketAddress::GetDotPortNotation |
( |
| ) |
const |
|
pure virtual |
Get the dot notation string of the ip-address and the port.
- Returns
- The dot notation string of the ip-address and the port.
◆ SetIpAddress()
virtual void Murl::Net::ISocketAddress::SetIpAddress |
( |
UInt32 |
ipAddress | ) |
|
|
pure virtual |
Set the ip-address.
Additionally the host name is set to the dot-notation of the ip-address. The ip-address format is 0xaabbccdd for "aaa.bbb.ccc.ddd".
- Parameters
-
◆ SetPortNumber()
virtual void Murl::Net::ISocketAddress::SetPortNumber |
( |
UInt32 |
portNumber | ) |
|
|
pure virtual |
Set the port number.
- Parameters
-
portNumber | The port number. |
◆ SetAnyAddress()
virtual void Murl::Net::ISocketAddress::SetAnyAddress |
( |
| ) |
|
|
pure virtual |
Set to the any ip-address (0.0.0.0).
This is the default address for new address objects.
◆ CopyAddress()
Copy the address information.
- Parameters
-
address | The source address object. |
◆ SetResolveHostName()
virtual void Murl::Net::ISocketAddress::SetResolveHostName |
( |
const String & |
hostName = String() | ) |
|
|
pure virtual |
Set the host name for resolving.
An empty string resolves the local host.
- Parameters
-
hostName | The host name. The host name can be specified by the domain name or the dot notation e.g. "127.0.0.1". If the host name is empty, the local ip-address is used. |
◆ MakeSystemAddress()
Get the system socket address object.
(!) Do not use MakeSystemAddress() directly in the logic code, this method will wait for network response and is intend for internal socket implementation only.
- Returns
- The system socket address object.
The documentation for this interface was generated from the following file:
- murl_net_i_socket_address.h