Commit a4392d4a authored by Andreas Pohl's avatar Andreas Pohl

libnghttp2_asio: Make io_service accessors const

parent 924fef1f
......@@ -92,7 +92,7 @@ boost::asio::io_service &io_service_pool::get_io_service() {
return io_service;
}
std::vector<std::shared_ptr<boost::asio::io_service>> &io_service_pool::get_io_services() {
const std::vector<std::shared_ptr<boost::asio::io_service>> &io_service_pool::get_io_services() const {
return io_services_;
}
......
......@@ -71,7 +71,7 @@ public:
boost::asio::io_service &get_io_service();
/// Get access to all io_service objects.
std::vector<std::shared_ptr<boost::asio::io_service>> &get_io_services();
const std::vector<std::shared_ptr<boost::asio::io_service>> &get_io_services() const;
private:
/// The pool of io_services.
......
......@@ -169,7 +169,7 @@ void server::stop() { io_service_pool_.stop(); }
void server::join() { io_service_pool_.join(); }
std::vector<std::shared_ptr<boost::asio::io_service>> &server::get_io_services() {
const std::vector<std::shared_ptr<boost::asio::io_service>> &server::get_io_services() const {
return io_service_pool_.get_io_services();
}
......
......@@ -74,7 +74,7 @@ public:
void stop();
/// Get access to all io_service objects.
std::vector<std::shared_ptr<boost::asio::io_service>> &get_io_services();
const std::vector<std::shared_ptr<boost::asio::io_service>> &get_io_services() const;
private:
/// Initiate an asynchronous accept operation.
......
......@@ -77,7 +77,7 @@ void http2::stop() { impl_->stop(); }
void http2::join() { return impl_->join(); }
std::vector<std::shared_ptr<boost::asio::io_service>> &http2::get_io_services() {
const std::vector<std::shared_ptr<boost::asio::io_service>> &http2::get_io_services() const {
return impl_->get_io_services();
}
......
......@@ -59,7 +59,7 @@ void http2_impl::stop() { return server_->stop(); }
void http2_impl::join() { return server_->join(); }
std::vector<std::shared_ptr<boost::asio::io_service>> &http2_impl::get_io_services() {
const std::vector<std::shared_ptr<boost::asio::io_service>> &http2_impl::get_io_services() const {
return server_->get_io_services();
}
......
......@@ -50,7 +50,7 @@ public:
bool handle(std::string pattern, request_cb cb);
void stop();
void join();
std::vector<std::shared_ptr<boost::asio::io_service>> &get_io_services();
const std::vector<std::shared_ptr<boost::asio::io_service>> &get_io_services() const;
private:
std::unique_ptr<server> server_;
......
......@@ -202,7 +202,7 @@ public:
void join();
// Get access to the io_service objects.
std::vector<std::shared_ptr<boost::asio::io_service>> &get_io_services();
const std::vector<std::shared_ptr<boost::asio::io_service>> &get_io_services() const;
private:
std::unique_ptr<http2_impl> impl_;
......
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