blob: d6451158dd3d62496f5cdb8229519b29a895833e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#pragma once
#include <filesystem>
#include <memory>
#include <mutex>
#include <string>
#include <boost/asio/ip/tcp.hpp>
#include "config.h"
#include "storage.h"
class Whiteboard
{
public:
Whiteboard();
int run(int argc, char* argv[]);
private:
std::unique_ptr<Config> m_config;
std::unique_ptr<Storage> m_storage;
std::mutex m_storage_mutex;
std::string handle_request(const std::string& request);
void do_session(boost::asio::ip::tcp::socket socket);
void storage_cleanup();
};
|