Win32Service uses Daemon start()/stop()

This commit is contained in:
chertov 2014-04-23 02:01:57 +04:00
parent c131fc8c86
commit 861e9c52ed
2 changed files with 44 additions and 112 deletions

View file

@ -1,8 +1,6 @@
#ifndef WIN_32_SERVICE_H__
#define WIN_32_SERVICE_H__
#include "../HTTPServer.h"
#include "../HTTPProxy.h"
#include <thread>
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
@ -40,6 +38,7 @@ public:
virtual ~I2PService(void);
static BOOL isService();
static BOOL Run(I2PService &service);
void Stop();
@ -70,8 +69,7 @@ private:
BOOL m_fStopping;
HANDLE m_hStoppedEvent;
i2p::util::HTTPServer* _httpServer;
i2p::proxy::HTTPProxy* _httpProxy;
std::thread* _worker;
};
@ -84,6 +82,4 @@ void InstallService(PSTR pszServiceName,
void UninstallService(PSTR pszServiceName);
void service_control(int isDaemon);
#endif // WIN_32_SERVICE_H__