3#include "connection.hpp"
4#include "../../core/tcp/stream.hpp"
6#include <boost/beast/ssl/ssl_stream.hpp>
8namespace malloy::client::http
14 template<
typename... ConnArgs>
16 public connection<connection_tls<ConnArgs...>, ConnArgs...>,
17 public std::enable_shared_from_this<connection_tls<ConnArgs...>>
23 std::shared_ptr<spdlog::logger> logger,
24 boost::asio::io_context& io_ctx,
25 boost::asio::ssl::context& tls_ctx,
26 const std::uint64_t body_limit
28 parent_t(std::move(logger), io_ctx, body_limit),
29 m_stream(boost::asio::make_strand(io_ctx), tls_ctx)
35 boost::beast::ssl_stream<malloy::tcp::stream<>>&
45 m_stream.async_handshake(
46 boost::asio::ssl::stream_base::client,
47 boost::beast::bind_front_handler(
48 &connection_tls::on_handshake,
49 this->shared_from_this()
55 boost::beast::ssl_stream<malloy::tcp::stream<>> m_stream;
58 on_handshake(
const boost::beast::error_code ec)
61 return parent_t::m_logger->error(
"on_handshake(): {}", ec.message());
64 boost::beast::get_lowest_layer(m_stream).expires_after(std::chrono::seconds(30));
67 parent_t::send_request();
Definition: connection_tls.hpp:18
Definition: connection.hpp:26