LibDS
Qt-based library for controlling FRC robots
|
Performs host lookups to obtain socket-usable IP addresses. More...
#include <Lookup.h>
Public Slots | |
void | lookup (const QString &name) |
Signals | |
void | lookupFinished (const QString &original, const QHostAddress &address) |
Private Slots | |
void | clearCache () |
void | onLookupFinished (const QHostInfo &info) |
Private Member Functions | |
bool | isOnCache (const QString &name) |
QHostAddress | getAddress (const QString &name) |
Private Attributes | |
QList< QPair< QString, QHostAddress > > | m_hosts |
Performs host lookups to obtain socket-usable IP addresses.
|
privateslot |
Removes the host list cache periodically (every 10 seconds)
|
private |
Returns the IP address associated with the given host name.
If the host name is not on the found hosts list, then this function will return an empty IP address (which will prompt the lookup()
function to find the given host name).
Referenced by isOnCache(), and lookup().
|
private |
Returns true
if the given host name has already been found by the lookup mechanism(s).
References getAddress().
Referenced by lookup(), and onLookupFinished().
|
slot |
Performs a lookup of the given host name
References getAddress(), and isOnCache().
Referenced by Sockets::performLookups().
|
privateslot |
Called when a lookup request is finished. This function will notify the client when a host name has been resolved into a valid IP address and will update the 'found hosts' list.
References isOnCache().