summaryrefslogtreecommitdiffhomepage
path: root/config.h
blob: ce2fcebaec2483f6c15099398c2685c52ca309ef (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 <string>

const std::string default_config_filename{"/etc/whiteboard.conf"};

class Config
{
private:
 std::string m_dataPath;
 uint64_t m_maxage;
 std::string m_listenAddress; // ip address v4/v6
 int m_listenPort;
 int m_threads;
 int m_max_connections;

public:
 Config(const std::string& config_filename = default_config_filename);
 std::string getDataPath() const;
 uint64_t getMaxage() const;
 
 std::string getListenAddress() const;
 int getListenPort() const;

 int getThreads() const;

 int getMaxConnections() const;
};