mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-05-04 14:42:01 +02:00
[daemon] WIP: use callbacks to work with daemon
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
parent
463d43b0bb
commit
78193fc8f8
4 changed files with 30 additions and 8 deletions
|
@ -423,6 +423,10 @@ namespace util
|
|||
try
|
||||
{
|
||||
d.httpServer = std::unique_ptr<i2p::http::HTTPServer>(new i2p::http::HTTPServer(httpAddr, httpPort));
|
||||
d.httpServer->SetDaemonStop (std::bind (Daemon_Singleton::stop, this));
|
||||
#if ((!defined(WIN32) && !defined(QT_GUI_LIB) && !defined(ANDROID)) || defined(ANDROID_BINARY))
|
||||
d.httpServer->SetDaemonGracefulTimer (std::bind (Daemon_Singleton::stop, this));
|
||||
#endif
|
||||
d.httpServer->Start();
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue