asio: Provide move constructor and move assignment operator to server::http2

This commit is contained in:
Tatsuhiro Tsujikawa 2015-03-06 23:55:52 +09:00
parent 5dccc88a7c
commit fa21b95274
2 changed files with 15 additions and 0 deletions

View File

@ -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) {

View File

@ -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,