diff options
Diffstat (limited to 'ControlServer.cpp')
-rw-r--r-- | ControlServer.cpp | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/ControlServer.cpp b/ControlServer.cpp index c727e20..31363ae 100644 --- a/ControlServer.cpp +++ b/ControlServer.cpp @@ -3,20 +3,29 @@ namespace plexclient { -ControlServer::ControlServer() { +ControlServer::ControlServer() +{ m_pSvs = new Poco::Net::ServerSocket(3200);; m_pSrv = new Poco::Net::HTTPServer(new PlexReqHandlerFactory, *m_pSvs, new Poco::Net::HTTPServerParams); } - -void ControlServer::Start() { - // start the HTTPServer - m_pSrv->start(); -} -void ControlServer::Stop() { +void ControlServer::Stop() +{ + Cancel(1); // Stop the HTTPServer m_pSrv->stop(); } +void ControlServer::Action() +{ + isyslog("[plex] Starting Controlserver..."); + // start the HTTPServer + m_pSrv->start(); + while(Running()) { + SubscriptionManager::GetInstance().Notify(); + cCondWait::SleepMs(1000); + } +} + } |