Opened 8 years ago

#10898 new Feature Requests

Variadic constructor for ssl::stream so it can wrap streams whose constructors take n arguments

Reported by: Joseph Southwell <joseph@…> Owned by: chris_kohlhoff
Milestone: To Be Determined Component: asio
Version: Boost 1.57.0 Severity: Problem
Keywords: asio ssl c++11 Cc:

Description

I have specific use case ( passing through a proxy ) where I need to wrap an ssl stream in an ssl stream. This becomes possible if I change the constructor for ssl stream as follows.

template <typename ...Arg>
  stream(context& ctx, Arg&& ...arg)
    : next_layer_(std::forward<Arg>(arg)...),
      core_(ctx.native_handle(), next_layer_.lowest_layer().get_io_service())
  {
    backwards_compatible_impl_.ssl = core_.engine_.native_handle();
  }
}}}}

Change History (0)

Note: See TracTickets for help on using tickets.