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