Use service for PingSender
This commit is contained in:
parent
e792117be1
commit
8bb4fa3f35
7 changed files with 46 additions and 47 deletions
|
|
@ -25,8 +25,8 @@
|
|||
#endif
|
||||
|
||||
IpcServer::IpcServer(QObject *parent) : IpcInterfaceSource(parent)
|
||||
|
||||
{
|
||||
connect(&m_pingHelper, &PingHelper::connectionLose, this, &IpcServer::connectionLose);
|
||||
}
|
||||
|
||||
int IpcServer::createPrivilegedProcess()
|
||||
|
|
@ -188,6 +188,20 @@ void IpcServer::setLogsEnabled(bool enabled)
|
|||
}
|
||||
}
|
||||
|
||||
bool IpcServer::startNetworkCheck(const QString& serverIpv4Gateway, const QString& deviceIpv4Address)
|
||||
{
|
||||
m_pingHelper.start(serverIpv4Gateway, deviceIpv4Address);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IpcServer::stopNetworkCheck()
|
||||
{
|
||||
|
||||
qDebug() << "stopNetworkCheck";
|
||||
m_pingHelper.stop();
|
||||
return true;
|
||||
}
|
||||
|
||||
bool IpcServer::enableKillSwitch(const QJsonObject &configStr, int vpnAdapterIndex)
|
||||
{
|
||||
#ifdef Q_OS_WIN
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue