#include <QTcpSocket>
#include <QHostInfo>
#include <QList>
#include <QUrl>
#include "net.h"
#include "http.h"
Go to the source code of this file.
Functions | |
QHostAddress | net_local_address () |
bool | net_is_private_address (QHostAddress addr) |
bool | net_is_valid_ip (QString ip) |
QList< QUrl > | get_check_ip_sites () |
bool | net_get_public_ip (QString &ip) |
bool | net_test_connect (QHostAddress host, quint16 port, int timeout) |
Definition in file net.cpp.
QList<QUrl> get_check_ip_sites | ( | ) |
Returns a pre-defined, static list of servers whom we can ask for our public IP address.
Definition at line 78 of file net.cpp.
Referenced by net_get_public_ip().
bool net_get_public_ip | ( | QString & | ip | ) |
bool net_is_private_address | ( | QHostAddress | addr | ) |
bool net_is_valid_ip | ( | QString | ip | ) |
Returns true if the given string representation of an IP address is valid.
Definition at line 70 of file net.cpp.
Referenced by net_get_public_ip().
QHostAddress net_local_address | ( | ) |
bool net_test_connect | ( | QHostAddress | host, | |
quint16 | port, | |||
int | timeout | |||
) |
Attempts a connection to host on port. Returns true if the connection was successful, or false if the connection attempt failed.
Definition at line 115 of file net.cpp.
Referenced by TorControl::isRunning().