fixes "unable to login", discovered during #780,

* fixed bootstrap file
* improved timeout of connect, now in single static function
* some minor tweaks
This commit is contained in:
Klaus Basan
2016-10-21 02:46:05 +02:00
parent 3b68a3b19d
commit 492649c061
5 changed files with 22 additions and 14 deletions

View File

@@ -47,6 +47,9 @@ namespace BlackMisc
Multipart
};
//! Default for timeout
static int getTimeoutMs();
//! Is a connected interface available?
//! \param withDebugOutput enables some debugging output
//! \return
@@ -58,29 +61,29 @@ namespace BlackMisc
//! \param timeoutMs
//! \param message human readable message
//! \return
static bool canConnect(const QString &hostAddress, int port, QString &message, int timeoutMs = 1500);
static bool canConnect(const QString &hostAddress, int port, QString &message, int timeoutMs = getTimeoutMs());
//! Can connect to server?
//! \param server
//! \param message human readable message
//! \param timeoutMs
//! \return
static bool canConnect(const BlackMisc::Network::CServer &server, QString &message, int timeoutMs = 1500);
static bool canConnect(const BlackMisc::Network::CServer &server, QString &message, int timeoutMs = getTimeoutMs());
//! Can connect to URL?
static bool canConnect(const QString &url, QString &message, int timeoutMs = 1500);
static bool canConnect(const QString &url, QString &message, int timeoutMs = getTimeoutMs());
//! Can connect to URL?
static bool canConnect(const QUrl &url, QString &message, int timeoutMs = 1500);
static bool canConnect(const QUrl &url, QString &message, int timeoutMs = getTimeoutMs());
//! Can connect to URL?
static bool canConnect(const QUrl &url, int timeoutMs = 1500);
static bool canConnect(const QUrl &url, int timeoutMs = getTimeoutMs());
//! Can connect to URL?
static bool canConnect(const BlackMisc::Network::CUrl &url, QString &message, int timeoutMs = 1500);
static bool canConnect(const BlackMisc::Network::CUrl &url, QString &message, int timeoutMs = getTimeoutMs());
//! Can connect to URL?
static bool canConnect(const BlackMisc::Network::CUrl &url, int timeoutMs = 1500);
static bool canConnect(const BlackMisc::Network::CUrl &url, int timeoutMs = getTimeoutMs());
//! Find out my IPv4 address, empty if not possible
static QStringList getKnownIpAddresses();