Commit aaef7985 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

asio: Add server::response::io_service()

parent 0753fcd6
......@@ -77,6 +77,10 @@ void response::resume() const { impl_->resume(); }
unsigned int response::status_code() const { return impl_->status_code(); }
boost::asio::io_service &response::io_service() const {
return impl_->io_service();
}
bool response::started() const { return impl_->started(); }
response_impl &response::impl() const { return *impl_; }
......@@ -184,6 +188,10 @@ void response_impl::resume() {
}
}
boost::asio::io_service &response_impl::io_service() {
return stream_->handler()->io_service();
}
bool response_impl::started() const { return started_; }
void response_impl::pushed(bool f) { pushed_ = f; }
......
......@@ -84,6 +84,8 @@ public:
response *push(boost::system::error_code &ec, std::string method,
std::string raw_path_query, header_map h = {}) const;
boost::asio::io_service &io_service();
void start_response();
unsigned int status_code() const;
......
......@@ -98,6 +98,9 @@ public:
// Returns true if response has been started.
bool started() const;
// Returns boost::asio::io_service this response is running on.
boost::asio::io_service &io_service() const;
// Application must not call this directly.
response_impl &impl() const;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment