mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-03-07 06:09:42 +00:00
[daemon] WIP: use callbacks to work with daemon
Signed-off-by: R4SAS <r4sas@i2pmail.org>
This commit is contained in:
@@ -69,6 +69,11 @@ namespace http
|
||||
void Start ();
|
||||
void Stop ();
|
||||
|
||||
typedef std::function<void ()> DaemonStop;
|
||||
typedef int DaemonGracefulTimer;
|
||||
void SetDaemonStop (const DaemonStop& f) { m_DaemonStop = f; };
|
||||
void SetDaemonGracefulTimer (const DaemonGracefulTimer& f) { m_DaemonGracefulTimer = f; };
|
||||
|
||||
private:
|
||||
|
||||
void Run ();
|
||||
@@ -85,6 +90,11 @@ namespace http
|
||||
boost::asio::io_service::work m_Work;
|
||||
boost::asio::ip::tcp::acceptor m_Acceptor;
|
||||
std::string m_Hostname;
|
||||
|
||||
private:
|
||||
|
||||
DaemonStop m_DaemonStop;
|
||||
DaemonGracefulTimer m_DaemonGracefulTimer;
|
||||
};
|
||||
|
||||
//all the below functions are also used by Qt GUI, see mainwindow.cpp -> getStatusPageHtml
|
||||
|
||||
Reference in New Issue
Block a user