18 Oct
2017
18 Oct
'17
11:26 a.m.
Hello, I'm trying to reconnect a SSL socket (using ssl::stream with tcp::socket) that has been closed only remotely. It looks like a shutdown on my client causes "stream truncated" error so I have no idea how can I connect my client socket again. I was thinking of just creating a new instance but the stream class is not copyable. Do you have any recommandations? Regards, -- David
18 Oct
18 Oct
4:22 p.m.
On Wed, Oct 18, 2017 at 4:26 AM, David Demelier via Boost-users
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
2580
Age (days ago)
2580
Last active (days ago)
1 comments
2 participants
participants (2)
-
David Demelier
-
Vinnie Falco