equal
deleted
inserted
replaced
426 protocol-independent manner. |
426 protocol-independent manner. |
427 |
427 |
428 QHostAddress is normally used with the QTcpSocket, QTcpServer, |
428 QHostAddress is normally used with the QTcpSocket, QTcpServer, |
429 and QUdpSocket to connect to a host or to set up a server. |
429 and QUdpSocket to connect to a host or to set up a server. |
430 |
430 |
431 A host address is set with setAddress(), checked for its type |
431 A host address is set with setAddress(), and retrieved with |
432 using isIPv4Address() or isIPv6Address(), and retrieved with |
432 toIPv4Address(), toIPv6Address(), or toString(). You can check the |
433 toIPv4Address(), toIPv6Address(), or toString(). |
433 type with protocol(). |
434 |
434 |
435 \note Please note that QHostAddress does not do DNS lookups. |
435 \note Please note that QHostAddress does not do DNS lookups. |
436 QHostInfo is needed for that. |
436 QHostInfo is needed for that. |
437 |
437 |
438 The class also supports common predefined addresses: \l Null, \l |
438 The class also supports common predefined addresses: \l Null, \l |
677 Returns the IPv4 address as a number. |
677 Returns the IPv4 address as a number. |
678 |
678 |
679 For example, if the address is 127.0.0.1, the returned value is |
679 For example, if the address is 127.0.0.1, the returned value is |
680 2130706433 (i.e. 0x7f000001). |
680 2130706433 (i.e. 0x7f000001). |
681 |
681 |
682 This value is only valid if isIp4Addr() returns true. |
682 This value is only valid if the Protocol() is |
|
683 \l{QAbstractSocket::}{IPv4Protocol}. |
683 |
684 |
684 \sa toString() |
685 \sa toString() |
685 */ |
686 */ |
686 quint32 QHostAddress::toIPv4Address() const |
687 quint32 QHostAddress::toIPv4Address() const |
687 { |
688 { |
702 Returns the IPv6 address as a Q_IPV6ADDR structure. The structure |
703 Returns the IPv6 address as a Q_IPV6ADDR structure. The structure |
703 consists of 16 unsigned characters. |
704 consists of 16 unsigned characters. |
704 |
705 |
705 \snippet doc/src/snippets/code/src_network_kernel_qhostaddress.cpp 0 |
706 \snippet doc/src/snippets/code/src_network_kernel_qhostaddress.cpp 0 |
706 |
707 |
707 This value is only valid if isIPv6Address() returns true. |
708 This value is only valid if the protocol() is |
|
709 \l{QAbstractSocket::}{IPv6Protocol}. |
708 |
710 |
709 \sa toString() |
711 \sa toString() |
710 */ |
712 */ |
711 Q_IPV6ADDR QHostAddress::toIPv6Address() const |
713 Q_IPV6ADDR QHostAddress::toIPv6Address() const |
712 { |
714 { |