The behaviour of SSL_shutdown() additionally depends on the underlying BIO.
However, my understanding of things is that the ssl::stream object is not a socket (by design) but more like a protocol layer that sits on top of a Stream-like object. Thus the asio::ssl layer has no knowledge of its next_layer() other than that it must support the free functions read,write, async_read and async_write. Certainly no knowledge about whether the layer supports the concept of shutdown() (or even close()).
Therefore I would expect the underlying socket, given by lowest_layer() to still be open when shutdown() returns. Furthermore, I would expect that shutdown() will not have been called on the lowest_layer(). You'll want to do this after ssl::shutdown returns, or in the handler passed to ssl::async_shutdown
Asked in February 2016Viewed 3,735 timesVoted 4Answered 1 times