#ifndef __HTTPSERVER_H__ #define __HTTPSERVER_H__ #include #include #include #include class HttpServer : public QObject { Q_OBJECT public: explicit HttpServer(QObject *parent = nullptr); ~HttpServer(); std::string addr() const; uint16_t port() const; bool isRunning() const; void run(const char *addr, unsigned short port); void stop(); private: std::string m_addr; uint16_t m_port; httplib::Server m_server; QThread m_thread; signals: void monitorConfigureUpdate(const QString &filename); private slots: void run_hhttp_sever(); }; #endif // HTTPSERVER_H