mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 20:15:35 +08:00
Ref T150, Ref T156 overloading canPing
This commit is contained in:
committed by
Mathew Sutcliffe
parent
fedcd76a05
commit
b01c7d6333
@@ -77,6 +77,12 @@ namespace BlackMisc
|
||||
return exitCode == 0;
|
||||
}
|
||||
|
||||
bool CNetworkUtils::canPing(const CUrl &url)
|
||||
{
|
||||
if (url.isEmpty()) { return false; }
|
||||
return CNetworkUtils::canPing(url.getHost());
|
||||
}
|
||||
|
||||
QStringList CNetworkUtils::getKnownLocalIpV4Addresses()
|
||||
{
|
||||
QStringList ips;
|
||||
|
||||
@@ -55,6 +55,10 @@ namespace BlackMisc
|
||||
//! \note uses OS ping
|
||||
static bool canPing(const QString &hostAddress);
|
||||
|
||||
//! Can ping the address?
|
||||
//! \note uses OS ping
|
||||
static bool canPing(const BlackMisc::Network::CUrl &url);
|
||||
|
||||
//! Can connect?
|
||||
//! \param hostAddress 130.4.20.3, or myserver.com
|
||||
//! \param port 80, 1234
|
||||
|
||||
Reference in New Issue
Block a user