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 | hostname () const |
Return the hostname corresponding to the address. | |
IPV4Address (unsigned addr=0, unsigned short prt=0) | |
Constructor. Numeric argument. | |
IPV4Address (const std::string &name, unsigned short port) | |
Constructor. String address, do resolution. | |
bool | operator< (const IPV4Address &o) const |
Less than 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. |
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.
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.
Definition at line 153 of file dashel-common.cpp.
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.
Definition at line 143 of file dashel-common.cpp.
unsigned Dashel::IPV4Address::address |
unsigned short Dashel::IPV4Address::port |