#pragma once #include #include // Support both boost in Debian unstable (BOOST_LATEST) and in stable (boost 1.67) #if BOOST_VERSION >= 107100 #define BOOST_LATEST #endif #include #include #include #include #include #ifdef BOOST_LATEST #include #endif #include #include "config.h" #include "server.h" namespace ssl = boost::asio::ssl; // from namespace HTTPS { #ifdef BOOST_LATEST static const ssl::context_base::method tls_method {ssl::context::tlsv13}; #else static const ssl::context_base::method tls_method {ssl::context::tlsv12}; #endif class Server: public ::Server { public: typedef std::unordered_map> ctx_type; private: ctx_type m_ctx; public: Server(Config& config, boost::asio::io_context& ioc, const Socket& socket, plugins_container_type& plugins, Statistics& statistics); virtual ~Server(); void load_certificates(); int start() override; }; }