blob: 31363ae61d663786eb451adb262551ec31fe5489 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#include "ControlServer.h"
namespace plexclient
{
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::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);
}
}
}
|