#include <FXNetwork.h>
Not a lot to say other than that this class provides various miscellaneous network services such as DNS lookups. More will be added with time (eg; querying of local machines via Samba or MS Networking)
Static Public Member Functions | |
static bool | hasIPv6 () |
static FXString | hostname () |
static QHostAddress | dnsLookup (const FXString &name) |
static FXString | dnsReverseLookup (const QHostAddress &addr) |
static bool FX::FXNetwork::hasIPv6 | ( | ) | [static] |
Returns true if IPv6 is supported on this machine.
static FXString FX::FXNetwork::hostname | ( | ) | [static] |
Returns the host name of this machine.
static QHostAddress FX::FXNetwork::dnsLookup | ( | const FXString & | name | ) | [static] |
Performs a translation of textual name to IP address by querying a DNS provider on the network. This call can take seconds and so should be called from a worker thread. IPv6 addresses are preferred to IPv4 where possible. If the name isn't found due to not existing or no DNS server available, a null address is returned - however an exception is still thrown for errors.
static FXString FX::FXNetwork::dnsReverseLookup | ( | const QHostAddress & | addr | ) | [static] |
Performs a translation of an IP address to a textual name by querying a DNS provider on the network. This call can especially take a long time. If there is no name associated with the IP address or no DNS server is available, a null string is returned - however an exception is still thrown for errors.