|
Boost Users : |
Subject: Re: [Boost-users] Reconnecting a SSL socket correctly
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2017-10-18 16:22:54
On Wed, Oct 18, 2017 at 4:26 AM, David Demelier via Boost-users
<boost-users_at_[hidden]> wrote:
> Do you have any recommandations?
Put the stream inside a boost::optional and call emplace when you want
to construct it or reconnect:
boost::optional<
boost::asio::ssl::stream<
boost::asio::ip::tcp::socket>> stream;
stream.emplace(ios, ctx);
Thanks
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net