kunlang_video/include/config_server.hpp
2026-05-09 11:36:51 +08:00

27 lines
436 B
C++

#pragma once
#include <atomic>
#include <string>
#include <thread>
#include "app_config.hpp"
class ConfigServer
{
public:
ConfigServer() = default;
~ConfigServer();
bool start(const std::string& config_path);
void stop();
private:
void run();
void handle_client(int client_fd);
std::string config_path_;
std::thread thread_;
std::atomic<bool> running_{false};
int server_fd_ = -1;
};