46 QHostAddress::operator=(*
static_cast<const QHostAddress*
>(&right));
53 return !QHostAddress{address}.isNull();
57 return !isNull() &&
port();
61 return QHostAddress::toString() +
":" + QString::number(
port());
66 QDataStream stream(&res, QIODevice::WriteOnly);
75 QDataStream stream(array);
81 stream >>
static_cast<QHostAddress&
>(address);
82 stream >> address._port;
89 stream << static_cast<const QHostAddress&>(address);
90 stream << address._port;
95#define base(obj) static_cast<const QHostAddress*>(&obj)
106 if (QHostAddress(address.toIPv4Address()).operator==(QHostAddress::LocalHost) ||
107 QHostAddress(address.toIPv6Address()).operator==(QHostAddress::LocalHostIPv6)) {
111 return qHash(*
static_cast<const QHostAddress*
>(&address));
The Host Address class this is wrapper of QHostAddress. Contains the NetworkAddress and network port.
friend QDataStream & operator<<(QDataStream &stream, const HostAddress &address)
QByteArray toBytes() const
toBytes This method convert a network address to a byte array.
friend QDataStream & operator>>(QDataStream &stream, HostAddress &address)
HostAddress & operator=(const HostAddress &right)
unsigned short port() const
The port method return port of node.
QString toString() const
toString this method convert the Host Address value to string value.
void setPort(unsigned short port)
setPort This method set new port value.
bool isValid() const
isValid This method return true if the current network address is valid.
bool fromBytes(const QByteArray &array)
fromBytes This method applay array obejct. (conver a byte array to a newtwork address object)
static bool isIP(const QString &address)
isIP This method return true if the address is valid.
The QH namespace - QuasarApp Heart namespace. This namespace contains all classes of the Heart librar...
QDataStream & operator>>(QDataStream &stream, HostAddress &address)
bool operator!=(const DbAddress &left, const DbAddress &other)
uint qHash(NodeCoonectionStatus status)
qHash - Simple hash function of NodeCoonectionStatus
bool operator==(const DbAddress &left, const DbAddress &other)
QDataStream & operator<<(QDataStream &stream, const HostAddress &address)