Udplistener start/stop during runtime (#56)

* start implementening runtime start/stop for udplistener

* add signal slots for start/stop/statusChanged for better connectivity with other qt stuff

* fix typo
This commit is contained in:
redPanther
2016-06-27 09:27:11 +02:00
committed by brindosch
parent de39ff8997
commit b9634e57d6
3 changed files with 88 additions and 41 deletions

View File

@@ -245,16 +245,19 @@ void HyperionDaemon::startNetworkServices()
if (_config.isMember("udpListener"))
{
const Json::Value & udpListenerConfig = _config["udpListener"];
_udpListener = new UDPListener(
udpListenerConfig.get("priority",700).asInt(),
udpListenerConfig.get("timeout",10000).asInt(),
udpListenerConfig.get("address", "").asString(),
udpListenerConfig.get("port", 2801).asUInt(),
udpListenerConfig.get("shared", false).asBool()
);
Info(_log, "UDP listener created on port %d", _udpListener->getPort());
if ( udpListenerConfig.get("enable", true).asBool() )
{
_udpListener = new UDPListener(
udpListenerConfig.get("priority",700).asInt(),
udpListenerConfig.get("timeout",10000).asInt(),
udpListenerConfig.get("address", "").asString(),
udpListenerConfig.get("port", 2801).asUInt(),
udpListenerConfig.get("shared", false).asBool()
);
Info(_log, "UDP listener created and started on port %d", _udpListener->getPort());
Info(_log, "UDP listener started" );
_udpListener->start();
}
}