java.lang.Object
io.qt.internal.QtJambiObject
io.qt.QtObject
io.qt.network.QHostInfo
- All Implemented Interfaces:
QtObjectInterface
,Cloneable
public class QHostInfo extends QtObject implements Cloneable
Static functions for host name lookups
Java wrapper for Qt class QHostInfo
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
QHostInfo.HostInfoError
Java wrapper for Qt enum QHostInfo::HostInfoError -
Constructor Summary
Constructors Modifier Constructor Description QHostInfo()
Overloaded constructor forQHostInfo(int)
withlookupId = -1
.QHostInfo(int lookupId)
QHostInfo(QHostInfo d)
protected
QHostInfo(QtObject.QPrivateConstructor p)
Constructor for internal use only. -
Method Summary
Modifier and Type Method Description static void
abortHostLookup(int lookupId)
QList<QHostAddress>
addresses()
QHostInfo
clone()
QHostInfo.HostInfoError
error()
String
errorString()
static QHostInfo
fromName(String name)
String
hostName()
static String
localDomainName()
static String
localHostName()
static int
lookupHost(String name, QMetaObject.Slot1<QHostInfo> slot)
Looks up the IP address(es) associated with host namename
, and returns an ID for the lookup.static int
lookupHost(String name, QObject context, QMetaObject.Slot1<QHostInfo> slot)
static int
lookupHost(String name, QObject receiver, String member)
int
lookupId()
void
setAddresses(Collection<QHostAddress> addresses)
void
setError(QHostInfo.HostInfoError error)
void
setErrorString(String errorString)
void
setHostName(String name)
void
setLookupId(int id)
void
swap(QHostInfo other)
-
Constructor Details
-
QHostInfo
-
QHostInfo
public QHostInfo()Overloaded constructor for
QHostInfo(int)
withlookupId = -1
. -
QHostInfo
public QHostInfo(int lookupId) -
QHostInfo
Constructor for internal use only.- Parameters:
p
- expected to benull
.
-
-
Method Details
-
addresses
-
error
-
errorString
-
hostName
-
lookupId
-
setAddresses
-
setError
-
setErrorString
-
setHostName
-
setLookupId
-
swap
-
abortHostLookup
public static void abortHostLookup(int lookupId) -
fromName
-
localDomainName
-
localHostName
-
lookupHost
-
lookupHost
Looks up the IP address(es) associated with host namename
, and returns an ID for the lookup. When the result of the lookup is ready, the slot is called with aQHostInfo
argument. TheQHostInfo
object can then be inspected to get the results of the lookup.- Parameters:
name
- The host name.slot
- The clot taking the result.
-
lookupHost
-
clone
-