summaryrefslogtreecommitdiffhomepage
path: root/https.h
diff options
context:
space:
mode:
Diffstat (limited to 'https.h')
-rw-r--r--https.h21
1 files changed, 20 insertions, 1 deletions
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 <boost/asio/dispatch.hpp>
+#include <boost/asio/strand.hpp>
+#include <boost/beast/ssl.hpp>
+#include <boost/asio/ssl.hpp>
+
#include "config.h"
+#include "server.h"
+
+namespace ssl = boost::asio::ssl; // from <boost/asio/ssl.hpp>
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;
+};
}