UDP API port is now stored in and read from global config

This commit is contained in:
Thulinma 2023-05-01 02:09:21 +02:00
parent 40df03439c
commit 0af85de22d
13 changed files with 61 additions and 39 deletions

View file

@ -226,9 +226,7 @@ namespace Mist{
pData["active_seconds"] = (Util::bootSecs() - startTime);
pData["ainfo"]["sourceTime"] = statSourceMs;
pData["ainfo"]["sinkTime"] = statSinkMs;
Socket::UDPConnection uSock;
uSock.SetDestination(UDP_API_HOST, UDP_API_PORT);
uSock.SendNow(pStat.toString());
Util::sendUDPApi(pStat);
lastProcUpdate = Util::bootSecs();
}
}

View file

@ -948,9 +948,7 @@ int main(int argc, char *argv[]){
tthread::lock_guard<tthread::mutex> guard(broadcasterMutex);
pData["ainfo"]["bc"] = Mist::currBroadAddr;
}
Socket::UDPConnection uSock;
uSock.SetDestination(UDP_API_HOST, UDP_API_PORT);
uSock.SendNow(pStat.toString());
Util::sendUDPApi(pStat);
lastProcUpdate = Util::bootSecs();
}
}