A IP version 4 address. More...
#include <dashel.h>
Public Member Functions | |
std::string | format (const bool resolveName=true) const |
Return Dashel string form. | |
std::string | format (const bool resolveName=true) const |
Return Dashel string form. | |
std::string | hostname () const |
Return the hostname corresponding to the address. | |
std::string | hostname () const |
Return the hostname corresponding to the address. | |
IPV4Address (const std::string &name, unsigned short port) | |
Constructor. String address, do resolution. | |
IPV4Address (unsigned addr=0, unsigned short prt=0) | |
Constructor. Numeric argument. | |
IPV4Address (const std::string &name, unsigned short port) | |
Constructor. String address, do resolution. | |
IPV4Address (unsigned addr=0, unsigned short prt=0) | |
Constructor. Numeric argument. | |
bool | operator< (const IPV4Address &o) const |
Less than operator. | |
bool | operator< (const IPV4Address &o) const |
Less than operator. | |
bool | operator== (const IPV4Address &o) const |
Equality operator. | |
bool | operator== (const IPV4Address &o) const |
Equality operator. | |
Public Attributes | |
unsigned | address |
IP host address. Stored in local byte order. | |
unsigned short | port |
IP port. Stored in local byte order. |
A IP version 4 address.
Definition at line 193 of file dashel.h.
Dashel::IPV4Address::IPV4Address | ( | unsigned | addr = 0 , |
|
unsigned short | prt = 0 | |||
) |
Constructor. Numeric argument.
Definition at line 102 of file dashel-common.cpp.
Dashel::IPV4Address::IPV4Address | ( | const std::string & | name, | |
unsigned short | port | |||
) |
Constructor. String address, do resolution.
Definition at line 108 of file dashel-common.cpp.
Dashel::IPV4Address::IPV4Address | ( | unsigned | addr = 0 , |
|
unsigned short | prt = 0 | |||
) |
Constructor. Numeric argument.
Dashel::IPV4Address::IPV4Address | ( | const std::string & | name, | |
unsigned short | port | |||
) |
Constructor. String address, do resolution.
std::string Dashel::IPV4Address::format | ( | const bool | resolveName = true |
) | const |
Return Dashel string form.
resolveName | whether we should attempt resolving the host name of the address |
std::string Dashel::IPV4Address::format | ( | const bool | resolveName = true |
) | const |
Return Dashel string form.
resolveName | whether we should attempt resolving the host name of the address |
Definition at line 170 of file dashel-common.cpp.
std::string Dashel::IPV4Address::hostname | ( | ) | const |
Return the hostname corresponding to the address.
std::string Dashel::IPV4Address::hostname | ( | ) | const |
Return the hostname corresponding to the address.
Definition at line 153 of file dashel-common.cpp.
bool Dashel::IPV4Address::operator< | ( | const IPV4Address & | o | ) | const |
Less than operator.
bool Dashel::IPV4Address::operator< | ( | const IPV4Address & | o | ) | const |
Less than operator.
Definition at line 148 of file dashel-common.cpp.
bool Dashel::IPV4Address::operator== | ( | const IPV4Address & | o | ) | const |
Equality operator.
bool Dashel::IPV4Address::operator== | ( | const IPV4Address & | o | ) | const |
Equality operator.
Definition at line 143 of file dashel-common.cpp.
unsigned Dashel::IPV4Address::address |
unsigned short Dashel::IPV4Address::port |