From 1fcaed7a34cce8e55bb071d503bb583f715e7d37 Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 4 Apr 2020 19:24:16 +0200 Subject: Serve configured sockets --- https.h | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) (limited to 'https.h') diff --git a/https.h b/https.h index 3621f33..e137463 100644 --- a/https.h +++ b/https.h @@ -1,9 +1,28 @@ #pragma once +#include +#include +#include +#include + #include "config.h" +#include "server.h" + +namespace ssl = boost::asio::ssl; // from namespace HTTPS { -int server(Config& config); +class Server: public ::Server +{ + // The SSL context is required, and holds certificates + ssl::context m_ctx{ssl::context::tlsv13}; + const Socket& m_socket; + +public: + Server(Config& config, boost::asio::io_context& ioc, const Socket& socket); + virtual ~Server(); + + int start() override; +}; } -- cgit v1.2.3