mirror of
https://github.com/ttttupup/wxhelper.git
synced 2025-08-02 22:07:35 +08:00
29 lines
544 B
C++
29 lines
544 B
C++
#ifndef WXHELPER_HTTP_SERVER_H_
|
|
#define WXHELPER_HTTP_SERVER_H_
|
|
|
|
#include "mongoose.h"
|
|
|
|
namespace wxhelper {
|
|
class HttpServer {
|
|
public:
|
|
explicit HttpServer(int port);
|
|
HttpServer(const HttpServer&) = delete;
|
|
HttpServer(HttpServer &&)=delete;
|
|
HttpServer& operator=(const HttpServer&) = delete;
|
|
~HttpServer();
|
|
|
|
bool HttpStart();
|
|
bool HttpClose();
|
|
int GetPort();
|
|
bool GetRunning();
|
|
const mg_mgr* GetMgr();
|
|
|
|
private:
|
|
int port_;
|
|
bool running_;
|
|
struct mg_mgr mgr_;
|
|
HANDLE thread_;
|
|
};
|
|
} // namespace wxhelper
|
|
|
|
#endif |