mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 05:17:26 +02:00
Tidy up ssl_stream (experimental):
fix #1323, close #1328 * Fix whitespace * Remove ssl::context pointer * Use implicit move ctor and assignment operator
This commit is contained in:
committed by
Vinnie Falco
parent
69f3e4d8fb
commit
eb588ff82c
@ -2,6 +2,8 @@ Version 194:
|
||||
|
||||
* http::async_read returns the right byte count on error
|
||||
* Add net namespace alias
|
||||
* Don't use-after-free in test
|
||||
* Tidy up ssl_stream (experimental)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -72,7 +72,6 @@ class ssl_stream
|
||||
using stream_type = boost::beast::flat_stream<ssl_stream_type>;
|
||||
|
||||
std::unique_ptr<stream_type> p_;
|
||||
boost::asio::ssl::context* ctx_;
|
||||
|
||||
public:
|
||||
/// The native handle type of the SSL stream.
|
||||
@ -106,25 +105,9 @@ public:
|
||||
boost::asio::ssl::context& ctx)
|
||||
: p_(new stream_type{
|
||||
std::forward<Arg>(arg), ctx})
|
||||
, ctx_(&ctx)
|
||||
{
|
||||
}
|
||||
|
||||
/// Move Constructor
|
||||
ssl_stream(ssl_stream&& other)
|
||||
: p_(std::move(other.p_))
|
||||
, ctx_(other.ctx_)
|
||||
{
|
||||
}
|
||||
|
||||
/// Move Assignment
|
||||
ssl_stream& operator=(ssl_stream&& other)
|
||||
{
|
||||
p_ = std::move(other.p_);
|
||||
ctx_ = other.ctx_;
|
||||
return *this;
|
||||
}
|
||||
|
||||
/** Get the executor associated with the object.
|
||||
|
||||
This function may be used to obtain the executor object that the stream
|
||||
|
Reference in New Issue
Block a user