Files
op-pedal/NetworkManagerP2P/src/DnsMasqService.cpp.bak
T
2024-08-08 12:53:02 -04:00

18 lines
429 B
Plaintext

#include "DnsMasqService.hpp"
#include "SysExec.hpp"
#include "ss.hpp"
void DnsMasqService::Start(const std::string&confFile, const std::string&wlan)
{
std::string exec = SS("dnsmasq --conf-file=" << confFile << " --interface=p2p-"<< wlan << "-*");
this->pid = (int64_t)pipedal::sysExecAsync(exec);
}
void DnsMasqService::Stop()
{
if (this->pid != -1)
{
pipedal::sysExecTerminate(pid,1000,500);
}
}