Add correctly shutting down server and stopping threads

This commit is contained in:
Pablu23
2024-11-13 16:49:49 +01:00
parent a3a5280f17
commit c18d5f993d
8 changed files with 61 additions and 35 deletions

View File

@@ -19,6 +19,7 @@ private:
int m_socket;
sockaddr_in m_address;
Response Route(Request req);
std::atomic<bool> m_running;
private:
std::mutex m_mutex;
@@ -36,7 +37,7 @@ public:
void handle(std::string path_pattern,
std::function<void(Request, Response *)> func);
int start();
int stop();
void stop();
};
} // namespace http