Issue #77 Break cyclic dependency between CDirectoryUtils and CNetworkUtils by factoring out canPing method

This commit is contained in:
Mat Sutcliffe
2020-11-09 00:39:12 +00:00
parent ac48e64891
commit b81cc9a9dc
7 changed files with 90 additions and 46 deletions

View File

@@ -13,6 +13,7 @@
#include "blackmisc/blackmiscexport.h"
#include "blackmisc/statusmessagelist.h"
#include "blackmisc/network/ping.h"
#include <QNetworkRequest>
#include <QNetworkAccessManager>
@@ -50,14 +51,6 @@ namespace BlackMisc
//! Default for timeout (long)
static int getLongTimeoutMs();
//! Can ping the address?
//! \note uses OS ping
static bool canPing(const QString &hostAddress);
//! Can ping the address?
//! \note uses OS ping
static bool canPing(const QUrl &url);
//! Can connect?
//! \param hostAddress 130.4.20.3, or myserver.com
//! \param port 80, 1234