|
|
This class is an interface for a socket address.
void reset () |
Reset address.
bool isValid () |
Check, if address is valid.
Returns: true, if address is valid; false otherwise.
String getAddressString () |
Get address string.
Returns: Address string.
cardinal getSystemAddress (sockaddr* buffer, const socklen_t length, const cardinal type) |
Get system's sockaddr structure for the address.
Parameters:
buffer | Buffer to write sockaddr to. |
length | Length of buffer. |
type | AF_INET or AF_INET6. |
Returns: Length of written sockaddr structure.
bool setSystemAddress (sockaddr* address, const socklen_t length) |
Initialize the internet address from the system's sockaddr structure. The sockaddr structure may be sockaddr_in (AF_INET) or sockaddr_in6 (AF_INET6).
Parameters:
address | sockaddr. |
length | Length of sockaddr (sizeof(sockaddr_in) or sizeof(sockaddr_in6)). |