asio: Add dtor to API classes

This commit is contained in:
Tatsuhiro Tsujikawa 2015-03-05 21:51:44 +09:00
parent ca1f43dfca
commit 7f04968950
3 changed files with 6 additions and 0 deletions

View File

@ -36,6 +36,8 @@ namespace server {
request::request() : impl_(make_unique<request_impl>()) {}
request::~request() {}
const header_map &request::header() const { return impl_->header(); }
const std::string &request::method() const { return impl_->method(); }

View File

@ -36,6 +36,8 @@ namespace server {
response::response() : impl_(make_unique<response_impl>()) {}
response::~response() {}
void response::write_head(unsigned int status_code, header_map h) const {
impl_->write_head(status_code, std::move(h));
}

View File

@ -40,6 +40,7 @@ class request {
public:
// Application must not call this directly.
request();
~request();
// Returns request headers. The pusedo headers, which start with
// colon (:), are exluced from this list.
@ -65,6 +66,7 @@ class response {
public:
// Application must not call this directly.
response();
~response();
// Write response header using |status_code| (e.g., 200) and
// additional headers in |h|.