<class name="QHostAddress" doc="/**
&lt;p&gt;The &lt;a href=&quot;QHostAddress.html#QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress)&quot;&gt;&lt;tt&gt;QHostAddress&lt;/tt&gt;&lt;/a&gt; class provides an IP address.&lt;/p&gt;
&lt;p&gt;This class holds an IPv4 or IPv6 address in a platform- and protocol-independent manner.&lt;/p&gt;
&lt;p&gt;&lt;a href=&quot;QHostAddress.html#QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress)&quot;&gt;&lt;tt&gt;QHostAddress&lt;/tt&gt;&lt;/a&gt; is normally used with the &lt;a href=&quot;QTcpSocket.html&quot;&gt;&lt;tt&gt;QTcpSocket&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QTcpServer.html&quot;&gt;&lt;tt&gt;QTcpServer&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QUdpSocket.html&quot;&gt;&lt;tt&gt;QUdpSocket&lt;/tt&gt;&lt;/a&gt; to connect to a host or to set up a server.&lt;/p&gt;
&lt;p&gt;A host address is set with &lt;a href=&quot;QHostAddress.html#setAddress(java.lang.String)&quot;&gt;&lt;tt&gt;setAddress&lt;/tt&gt;&lt;/a&gt;, checked for its type using isIPv4Address() or isIPv6Address(), and retrieved with &lt;a href=&quot;QHostAddress.html#toIPv4Address()&quot;&gt;&lt;tt&gt;toIPv4Address&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QHostAddress.html#toIPv6Address()&quot;&gt;&lt;tt&gt;toIPv6Address&lt;/tt&gt;&lt;/a&gt;, or &lt;a href=&quot;QHostAddress.html#toString()&quot;&gt;&lt;tt&gt;toString&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The class also supports common predefined addresses: &lt;a href=&quot;QHostAddress.html#SpecialAddress-enum&quot;&gt;Null&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QHostAddress.html#SpecialAddress-enum&quot;&gt;&lt;tt&gt;LocalHost&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QHostAddress.html#SpecialAddress-enum&quot;&gt;&lt;tt&gt;LocalHostIPv6&lt;/tt&gt;&lt;/a&gt;, &lt;a href=&quot;QHostAddress.html#SpecialAddress-enum&quot;&gt;Broadcast&lt;/tt&gt;&lt;/a&gt;, and &lt;a href=&quot;QHostAddress.html#SpecialAddress-enum&quot;&gt;Any&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;

@see &lt;a href=&quot;QTcpSocket.html&quot;&gt;&lt;tt&gt;QTcpSocket&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QTcpServer.html&quot;&gt;&lt;tt&gt;QTcpServer&lt;/tt&gt;&lt;/a&gt;
@see &lt;a href=&quot;QUdpSocket.html&quot;&gt;&lt;tt&gt;QUdpSocket&lt;/tt&gt;&lt;/a&gt; */">
    <method name="public QHostAddress(java.lang.String address)" doc="/**
&lt;p&gt;Constructs an IPv4 or IPv6 address based on the string &lt;tt&gt;address&lt;/tt&gt; (e.g&amp;#x2e;, &amp;quot;127.0&amp;#x2e;0&amp;#x2e;1&amp;quot;).&lt;/p&gt;

@see &lt;a href=&quot;QHostAddress.html#setAddress(java.lang.String)&quot;&gt;&lt;tt&gt;setAddress&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QHostAddress(com.trolltech.qt.network.QHostAddress copy)" doc="/**
&lt;p&gt;Constructs a copy of the given &lt;tt&gt;copy&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public QHostAddress()" doc="/**
&lt;p&gt;Constructs a host address object with the IP address 0.0&amp;#x2e;0&amp;#x2e;0&amp;#x2e;&lt;/p&gt;

@see &lt;a href=&quot;QHostAddress.html#clear()&quot;&gt;&lt;tt&gt;clear&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public QHostAddress(int ip4Addr)" doc="/**
&lt;p&gt;Constructs a host address object with the IPv4 address &lt;tt&gt;ip4Addr&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public QHostAddress(com.trolltech.qt.network.QIPv6Address ip6Addr)"/>
    <method name="public QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress address)" doc="/**
&lt;p&gt;Constructs a &lt;a href=&quot;QHostAddress.html#QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress)&quot;&gt;&lt;tt&gt;QHostAddress&lt;/tt&gt;&lt;/a&gt; object for &lt;tt&gt;address&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final void clear()" doc="/**
&lt;p&gt;Sets the host address to 0.0&amp;#x2e;0&amp;#x2e;0&amp;#x2e;&lt;/p&gt;
 */"/>
    <method name="public final boolean isNull()" doc="/**
&lt;p&gt;Returns true if this host address is null (INADDR_ANY or in6addr_any). The default constructor creates a null address, and that address is not valid for any host or interface.&lt;/p&gt;
 */"/>
    <method name="public final void writeTo(com.trolltech.qt.core.QDataStream arg__1)"/>
    <method name="public final void readFrom(com.trolltech.qt.core.QDataStream arg__1)"/>
    <method name="public final com.trolltech.qt.network.QAbstractSocket.NetworkLayerProtocol protocol()" doc="/**
&lt;p&gt;Returns the network layer protocol of the host address.&lt;/p&gt;
 */"/>
    <method name="public final java.lang.String scopeId()" doc="/**
&lt;p&gt;Returns the scope ID of an IPv6 address. For IPv4 addresses, or if the address does not contain a scope ID, an empty &lt;a href=&quot;%2E%2E/porting4.html#qstring&quot;&gt;&lt;tt&gt;QString&lt;/tt&gt;&lt;/a&gt; is returned.&lt;/p&gt;
&lt;p&gt;The IPv6 scope ID specifies the scope of &lt;i&gt;reachability&lt;/i&gt; for non-global IPv6 addresses, limiting the area in which the address can be used. All IPv6 addresses are associated with such a reachability scope. The scope ID is used to disambiguate addresses that are not guaranteed to be globally unique.&lt;/p&gt;
&lt;p&gt;IPv6 specifies the following four levels of reachability:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Node-local: Addresses that are only used for communicating with services on the same interface (e.g&amp;#x2e;, the loopback interface &amp;quot;&lt;a href=&quot;%2E%2E/atomic-operations.html#1&quot;&gt;::1&lt;/tt&gt;&lt;/a&gt;&amp;quot;).&lt;/li&gt;
&lt;li&gt;Link-local: Addresses that are local to the network interface (&lt;i&gt;link&lt;/i&gt;). There is always one link-local address for each IPv6 interface on your host. Link-local addresses (&amp;quot;fe80..&amp;#x2e;&amp;quot;) are generated from the MAC address of the local network adaptor, and are not guaranteed to be unique.&lt;/li&gt;
&lt;li&gt;Site-local: Addresses that are local to the site / private network (e.g&amp;#x2e;, the company intranet). Site-local addresses (&amp;quot;fec0..&amp;#x2e;&amp;quot;) are usually distributed by the site router, and are not guaranteed to be unique outside of the local site.&lt;/li&gt;
&lt;li&gt;Global: For globally routable addresses, such as public servers on the Internet.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;When using a link-local or site-local address for IPv6 connections, you must specify the scope ID. The scope ID for a link-local address is usually the same as the interface name (e.g&amp;#x2e;, &amp;quot;eth0&amp;quot;, &amp;quot;en1&amp;quot;) or number (e.g&amp;#x2e;, &amp;quot;1&amp;quot;, &amp;quot;2&amp;quot;).&lt;/p&gt;

@see &lt;a href=&quot;QHostAddress.html#setScopeId(java.lang.String)&quot;&gt;&lt;tt&gt;setScopeId&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final void setAddress(int ip4Addr)" doc="/**
&lt;p&gt;Set the IPv4 address specified by &lt;tt&gt;ip4Addr&lt;/tt&gt;.&lt;/p&gt;
 */"/>
    <method name="public final boolean setAddress(java.lang.String address)" doc="/**
&lt;p&gt;Sets the IPv4 or IPv6 address specified by the string representation specified by &lt;tt&gt;address&lt;/tt&gt; (e.g&amp;#x2e; &amp;quot;127.0&amp;#x2e;0&amp;#x2e;1&amp;quot;). Returns true and sets the address if the address was successfully parsed; otherwise returns false.&lt;/p&gt;
 */"/>
    <method name="public final void setAddress(com.trolltech.qt.network.QIPv6Address ip6Addr)"/>
    <method name="public final void setScopeId(java.lang.String id)" doc="/**
&lt;p&gt;Sets the IPv6 scope ID of the address to &lt;tt&gt;id&lt;/tt&gt;. If the address protocol is not IPv6, this function does nothing.&lt;/p&gt;

@see &lt;a href=&quot;QHostAddress.html#scopeId()&quot;&gt;&lt;tt&gt;scopeId&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final int toIPv4Address()" doc="/**
&lt;p&gt;Returns the IPv4 address as a number.&lt;/p&gt;
&lt;p&gt;For example, if the address is 127.0&amp;#x2e;0&amp;#x2e;1, the returned value is 2130706433 (i.e&amp;#x2e; 0x7f000001).&lt;/p&gt;
&lt;p&gt;This value is only valid if isIp4Addr() returns true.&lt;/p&gt;

@see &lt;a href=&quot;QHostAddress.html#toString()&quot;&gt;&lt;tt&gt;toString&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final com.trolltech.qt.network.QIPv6Address toIPv6Address()" doc="/**
&lt;p&gt;Returns the IPv6 address as a Q_IPV6ADDR structure. The structure consists of 16 unsigned characters.&lt;/p&gt;
&lt;pre&gt;    Q_IPV6ADDR addr = hostAddr.toIPv6Address();
&lt;span class=&quot;comment&quot;&gt;    //&lt;/span&gt; addr contains 16 unsigned characters

    for (int i = 0; i &amp;lt; 16; ++i) {
        &lt;span class=&quot;comment&quot;&gt;//&lt;/span&gt; process addr[i]
    }&lt;/pre&gt;
&lt;p&gt;This value is only valid if isIPv6Address() returns true.&lt;/p&gt;

@see &lt;a href=&quot;QHostAddress.html#toString()&quot;&gt;&lt;tt&gt;toString&lt;/tt&gt;&lt;/a&gt; */"/>
    <method name="public final java.lang.String toString()" doc="/**
&lt;p&gt;Returns the address as a string.&lt;/p&gt;
&lt;p&gt;For example, if the address is the IPv4 address 127.0&amp;#x2e;0&amp;#x2e;1, the returned string is &amp;quot;127.0&amp;#x2e;0&amp;#x2e;1&amp;quot;.&lt;/p&gt;

@see &lt;a href=&quot;QHostAddress.html#toIPv4Address()&quot;&gt;&lt;tt&gt;toIPv4Address&lt;/tt&gt;&lt;/a&gt; */"/>
    <enum name="SpecialAddress">
        <enum-value name="Null" doc="/**
&lt;p&gt;The null address object. Equivalent to &lt;a href=&quot;QHostAddress.html#QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress)&quot;&gt;&lt;tt&gt;QHostAddress&lt;/tt&gt;&lt;/a&gt;.&lt;/p&gt;
 */"/>
        <enum-value name="Broadcast" doc="/**
&lt;p&gt;The IPv4 broadcast address. Equivalent to &lt;a href=&quot;QHostAddress.html#QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress)&quot;&gt;&lt;tt&gt;QHostAddress&lt;/tt&gt;&lt;/a&gt;(&amp;quot;255.255.255.255&amp;quot;).&lt;/p&gt;
 */"/>
        <enum-value name="LocalHost" doc="/**
&lt;p&gt;The IPv4 localhost address. Equivalent to &lt;a href=&quot;QHostAddress.html#QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress)&quot;&gt;&lt;tt&gt;QHostAddress&lt;/tt&gt;&lt;/a&gt;(&amp;quot;127.0&amp;#x2e;0&amp;#x2e;1&amp;quot;).&lt;/p&gt;
 */"/>
        <enum-value name="LocalHostIPv6" doc="/**
&lt;p&gt;The IPv6 localhost address. Equivalent to &lt;a href=&quot;QHostAddress.html#QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress)&quot;&gt;&lt;tt&gt;QHostAddress&lt;/tt&gt;&lt;/a&gt;(&amp;quot;&lt;a href=&quot;%2E%2E/atomic-operations.html#1&quot;&gt;::1&lt;/tt&gt;&lt;/a&gt;&amp;quot;).&lt;/p&gt;
 */"/>
        <enum-value name="Any" doc="/**
&lt;p&gt;The IPv4 any-address. Equivalent to &lt;a href=&quot;QHostAddress.html#QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress)&quot;&gt;&lt;tt&gt;QHostAddress&lt;/tt&gt;&lt;/a&gt;(&amp;quot;0.0&amp;#x2e;0&amp;#x2e;0&amp;quot;).&lt;/p&gt;
 */"/>
        <enum-value name="AnyIPv6" doc="/**
&lt;p&gt;The IPv6 any-address. Equivalent to &lt;a href=&quot;QHostAddress.html#QHostAddress(com.trolltech.qt.network.QHostAddress.SpecialAddress)&quot;&gt;&lt;tt&gt;QHostAddress&lt;/tt&gt;&lt;/a&gt;(&amp;quot;::&amp;quot;).&lt;/p&gt;
 */"/>
</enum>
</class>
