From 938fbe7a2f2f10a3abb530a9463e57fc20f40038 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 4 Apr 2020 16:32:10 +0200 Subject: HTTP and HTTPs --- config.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'config.h') diff --git a/config.h b/config.h index 4838ea6..98a99c0 100644 --- a/config.h +++ b/config.h @@ -1,9 +1,12 @@ #pragma once +#include #include #include #include +namespace fs = std::filesystem; + enum PathType { Files, // serve files @@ -24,7 +27,7 @@ struct Site std::vector paths; }; -enum SocketProtocol +enum class SocketProtocol { HTTP, HTTPS @@ -35,6 +38,9 @@ struct Socket std::string address; std::string port; SocketProtocol protocol; + std::vector serve_sites; // if empty, serve all configured sites // TODO: implement + fs::path cert_path; + fs::path key_path; }; class Config @@ -45,6 +51,7 @@ class Config std::string m_user; std::string m_group; + int m_threads; std::vector m_plugin_directories; std::vector m_sites; std::vector m_sockets; @@ -56,6 +63,8 @@ class Config std::string User() const; std::string Group() const; + int Threads() const; + const std::vector& PluginDirectories() const; const std::vector& Sites() const; const std::vector& Sockets() const; -- cgit v1.2.3