44 IPv4Address(
unsigned char first,
unsigned char second,
unsigned char third,
unsigned char fourth);
74 std::string
str()
const;
80 static std::optional<IPv4Address>
parse(
const std::string& address);
83 unsigned char m_first;
84 unsigned char m_second;
85 unsigned char m_third;
86 unsigned char m_fourth;
A model of an IPv4 address.
Definition ipv4address.h:35
unsigned char getFirst() const
Gets the first byte of the address.
static std::optional< IPv4Address > parse(const std::string &address)
Parses an IPv4Address from a string.
IPv4Address(unsigned char first, unsigned char second, unsigned char third, unsigned char fourth)
Constructs an IPv4Address.
unsigned char getThird() const
Gets the third byte of the address.
std::string str() const
Gets the string representation of the address.
IPv4Address(unsigned long address)
Constructs an IPv4Address.
unsigned char getFourth() const
Gets the fourth byte of the address.
unsigned char getSecond() const
Gets the second byte of the address.