diff options
| author | Roland Reichwein <mail@reichwein.it> | 2020-04-04 19:24:16 +0200 | 
|---|---|---|
| committer | Roland Reichwein <mail@reichwein.it> | 2020-04-04 19:24:16 +0200 | 
| commit | 1fcaed7a34cce8e55bb071d503bb583f715e7d37 (patch) | |
| tree | 9c6bcaa267a66b902f308ee253a79da874780e55 /https.h | |
| parent | 938fbe7a2f2f10a3abb530a9463e57fc20f40038 (diff) | |
Serve configured sockets
Diffstat (limited to 'https.h')
| -rw-r--r-- | https.h | 21 | 
1 files changed, 20 insertions, 1 deletions
@@ -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; +};  }  | 
