#ifndef __FILESERVER_H__ #define __FILESERVER_H__ #include #include #include class FileServer { public: explicit FileServer(); ~FileServer(); std::string addr() const; uint16_t port() const; bool isRunning() const; void run(const char *addr, unsigned short port); void start(); void stop(); private: std::string m_addr; uint16_t m_port; bool m_isRunning; std::thread m_thread; httplib::Server m_server; }; #endif // FILESERVER_H