asio: Provide move constructor and move assignment operator to server::http2
This commit is contained in:
parent
5dccc88a7c
commit
fa21b95274
|
@ -40,6 +40,18 @@ http2::http2() : impl_(make_unique<http2_impl>()) {}
|
|||
|
||||
http2::~http2() {}
|
||||
|
||||
http2::http2(http2 &&other) : impl_(std::move(other.impl_)) {}
|
||||
|
||||
http2 &http2::operator=(http2 &&other) {
|
||||
if (this == &other) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
impl_ = std::move(other.impl_);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
boost::system::error_code http2::listen_and_serve(boost::system::error_code &ec,
|
||||
const std::string &address,
|
||||
const std::string &port) {
|
||||
|
|
|
@ -126,6 +126,9 @@ public:
|
|||
http2();
|
||||
~http2();
|
||||
|
||||
http2(http2 &&other);
|
||||
http2 &operator=(http2 &&other);
|
||||
|
||||
// Starts listening connection on given address and port and serves
|
||||
// incoming requests in cleartext TCP connection.
|
||||
boost::system::error_code listen_and_serve(boost::system::error_code &ec,
|
||||
|
|
Loading…
Reference in New Issue