libnghttp2_asio: Make io_service accessors const

This commit is contained in:
Andreas Pohl 2015-12-09 23:11:40 +01:00
parent 924fef1f32
commit a4392d4a7f
8 changed files with 8 additions and 8 deletions

View File

@ -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_;
}

View File

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

View File

@ -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();
}

View File

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

View File

@ -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();
}

View File

@ -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();
}

View File

@ -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_;

View File

@ -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_;