ui布局自适应
This commit is contained in:
1 parent
98f44890f8
commit
3587129b90
40 files changed
+929
-142
No files matched your search
@@ -2,8 +2,10 @@
|
||||
|
||||
#include <atomic>
|
||||
#include <cstdint>
|
||||
#include <filesystem>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
namespace connector {
|
||||
@@ -15,6 +17,7 @@ struct HttpRequest {
|
||||
std::map<std::string, std::string> query;
|
||||
std::map<std::string, std::string> headers;
|
||||
std::string body;
|
||||
bool secure = false;
|
||||
};
|
||||
|
||||
struct HttpResponse {
|
||||
@@ -29,7 +32,8 @@ class HttpServer {
|
||||
public:
|
||||
HttpServer();
|
||||
~HttpServer();
|
||||
bool start(unsigned short port, RequestHandler handler, std::string& error);
|
||||
bool start(unsigned short port, RequestHandler handler, std::string& error,
|
||||
const std::filesystem::path& identity = {});
|
||||
void stop();
|
||||
bool running() const { return running_.load(); }
|
||||
|
||||
@@ -37,6 +41,7 @@ class HttpServer {
|
||||
void accept_loop();
|
||||
std::atomic<bool> running_{false};
|
||||
std::intptr_t socket_ = -1;
|
||||
std::shared_ptr<void> tls_identity_;
|
||||
RequestHandler handler_;
|
||||
void* thread_ = nullptr;
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user