mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-27 11:17:49 +02:00
Win32Service uses Daemon start()/stop()
This commit is contained in:
parent
c131fc8c86
commit
861e9c52ed
2 changed files with 44 additions and 112 deletions
|
@ -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__
|
Loading…
Add table
Add a link
Reference in a new issue