#include <socket.hpp>
Public Member Functions | |
| IPAddress () | |
| Initialize the address as 0.0.0.0. | |
| IPAddress (unsigned int) | |
| Initialize the address to the integer value. | |
| IPAddress (unsigned char, unsigned char, unsigned char, unsigned char) | |
| Initialize the address using 4 octets. | |
| IPAddress (const char *) | |
| Initialize the address using a string (eg 255.255.255.255). | |
| IPAddress (in_addr) | |
| Initialize the address using a POSIX in_addr struct. | |
| IPAddress (std::string) | |
| Initialize the address using a string (eg 255.255.255.255). | |
| IPAddress & | operator= (unsigned int) |
| Set the address to an integer value. | |
| IPAddress & | operator= (const char *) |
| Set the address using a string (eg 255.255.255.255). | |
| IPAddress & | operator= (in_addr) |
| Set the address using a POSIX in_addr struct. | |
| IPAddress & | operator= (std::string) |
| Set the address using a string (eg 255.255.255.255). | |
| operator unsigned int () | |
| Return the IP address as an integer. | |
| operator in_addr () | |
| Return the IP address as a POSIX in_addr struct. | |
| operator std::string () | |
| Return the IP address as a string (eg 255.255.255.255). | |
| bool | operator== (const IPAddress &) |
Protected Member Functions | |
| std::string | GetString () |
| Return the IP address as a string (eg 255.255.255.255). | |
Protected Attributes | |
| uint32_t | address |
| Integer version of the IP address. | |
| IPAddress::IPAddress | ( | ) |
Initialize the address as 0.0.0.0.
| IPAddress::IPAddress | ( | unsigned int | addr | ) |
Initialize the address to the integer value.
| IPAddress::IPAddress | ( | unsigned char | o1, | |
| unsigned char | o2, | |||
| unsigned char | o3, | |||
| unsigned char | o4 | |||
| ) |
Initialize the address using 4 octets.
| IPAddress::IPAddress | ( | const char * | str_addr | ) |
Initialize the address using a string (eg 255.255.255.255).
| IPAddress::IPAddress | ( | in_addr | addr | ) |
Initialize the address using a POSIX in_addr struct.
| IPAddress::IPAddress | ( | std::string | str_addr | ) |
Initialize the address using a string (eg 255.255.255.255).
| std::string IPAddress::GetString | ( | ) | [protected] |
Return the IP address as a string (eg 255.255.255.255).
| IPAddress & IPAddress::operator= | ( | unsigned int | addr | ) |
Set the address to an integer value.
| IPAddress & IPAddress::operator= | ( | const char * | str_addr | ) |
Set the address using a string (eg 255.255.255.255).
| IPAddress& IPAddress::operator= | ( | in_addr | ) |
Set the address using a POSIX in_addr struct.
| IPAddress & IPAddress::operator= | ( | std::string | str_addr | ) |
Set the address using a string (eg 255.255.255.255).
| IPAddress::operator unsigned int | ( | ) |
Return the IP address as an integer.
| IPAddress::operator in_addr | ( | ) |
Return the IP address as a POSIX in_addr struct.
| IPAddress::operator std::string | ( | ) |
Return the IP address as a string (eg 255.255.255.255).
| bool IPAddress::operator== | ( | const IPAddress & | other | ) |
uint32_t IPAddress::address [protected] |
Integer version of the IP address.
1.5.7.1