From aabd5b51d3e36f7d14ae72eb4f9c9e5cd9fabe45 Mon Sep 17 00:00:00 2001 From: Mohammad Nejati Date: Sat, 6 Jul 2024 18:22:43 +0000 Subject: [PATCH] net::prepend is replaced with net::append --- .../beast/_experimental/test/impl/stream.hpp | 17 ++++++++--------- include/boost/beast/core/async_base.hpp | 6 +++--- include/boost/beast/core/impl/basic_stream.hpp | 3 ++- .../beast/core/impl/buffered_read_stream.hpp | 4 ++-- include/boost/beast/http/impl/read.hpp | 6 +++--- include/boost/beast/http/impl/write.hpp | 6 +++--- include/boost/beast/websocket/impl/teardown.hpp | 4 ++-- 7 files changed, 23 insertions(+), 23 deletions(-) diff --git a/include/boost/beast/_experimental/test/impl/stream.hpp b/include/boost/beast/_experimental/test/impl/stream.hpp index 2dacc924..1bbf77a1 100644 --- a/include/boost/beast/_experimental/test/impl/stream.hpp +++ b/include/boost/beast/_experimental/test/impl/stream.hpp @@ -13,12 +13,11 @@ #include #include #include -#include #include +#include #include #include #include -#include #include #include #include @@ -134,11 +133,11 @@ class basic_stream::read_op : public detail::stream_read_op_base #if defined(BOOST_ASIO_NO_TS_EXECUTORS) net::dispatch(wg2_, - net::prepend(std::move(h_), ec, bytes_transferred)); + net::append(std::move(h_), ec, bytes_transferred)); wg2_ = net::any_io_executor(); // probably unnecessary #else // defined(BOOST_ASIO_NO_TS_EXECUTORS) net::dispatch(wg2_.get_executor(), - net::prepend(std::move(h_), ec, bytes_transferred)); + net::append(std::move(h_), ec, bytes_transferred)); wg2_.reset(); #endif // defined(BOOST_ASIO_NO_TS_EXECUTORS) } @@ -171,10 +170,10 @@ public: operator()(error_code ec) override { #if defined(BOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT) - net::post(wg1_.get_executor(), net::prepend(std::move(fn_), ec)); + net::post(wg1_.get_executor(), net::append(std::move(fn_), ec)); wg1_.reset(); #else - net::post(wg1_, net::prepend(std::move(fn_), ec)); + net::post(wg1_, net::append(std::move(fn_), ec)); wg1_ = net::any_io_executor(); // probably unnecessary #endif } @@ -257,7 +256,7 @@ struct basic_stream::run_write_op ++in_->nwrite; auto const upcall = [&](error_code ec, std::size_t n) { - net::post(in_->exec, net::prepend(std::move(h), ec, n)); + net::post(in_->exec, net::append(std::move(h), ec, n)); }; // test failure @@ -477,7 +476,7 @@ async_teardown( s.in_->fc->fail(ec)) return net::post( s.get_executor(), - net::prepend(std::move(handler), ec)); + net::append(std::move(handler), ec)); s.close(); if( s.in_->fc && s.in_->fc->fail(ec)) @@ -487,7 +486,7 @@ async_teardown( else ec = {}; - net::post(s.get_executor(), net::prepend(std::move(handler), ec)); + net::post(s.get_executor(), net::append(std::move(handler), ec)); } //------------------------------------------------------------------------------ diff --git a/include/boost/beast/core/async_base.hpp b/include/boost/beast/core/async_base.hpp index dda27f74..55e912c1 100644 --- a/include/boost/beast/core/async_base.hpp +++ b/include/boost/beast/core/async_base.hpp @@ -15,15 +15,15 @@ #include #include #include +#include #include #include #include #include #include -#include #include +#include #include -#include #include #include #include @@ -425,7 +425,7 @@ public: auto const ex = this->get_immediate_executor(); net::dispatch( ex, - net::prepend(std::move(h_), std::forward(args)...)); + net::append(std::move(h_), std::forward(args)...)); wg1_.reset(); } else diff --git a/include/boost/beast/core/impl/basic_stream.hpp b/include/boost/beast/core/impl/basic_stream.hpp index d1663407..7b5c40b7 100644 --- a/include/boost/beast/core/impl/basic_stream.hpp +++ b/include/boost/beast/core/impl/basic_stream.hpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -325,7 +326,7 @@ public: : "basic_stream::async_write_some"))); net::dispatch(this->get_immediate_executor(), - net::prepend(std::move(*this), ec, 0)); + net::append(std::move(*this), ec, 0)); } impl_->close(); diff --git a/include/boost/beast/core/impl/buffered_read_stream.hpp b/include/boost/beast/core/impl/buffered_read_stream.hpp index 0423e1ad..45e47ac8 100644 --- a/include/boost/beast/core/impl/buffered_read_stream.hpp +++ b/include/boost/beast/core/impl/buffered_read_stream.hpp @@ -15,8 +15,8 @@ #include #include #include +#include #include -#include #include namespace boost { @@ -84,7 +84,7 @@ public: const auto ex = this->get_immediate_executor(); return net::dispatch( ex, - net::prepend(std::move(*this), ec, 0)); + net::append(std::move(*this), ec, 0)); } case 1: // upcall diff --git a/include/boost/beast/http/impl/read.hpp b/include/boost/beast/http/impl/read.hpp index a96ccea2..f7c03249 100644 --- a/include/boost/beast/http/impl/read.hpp +++ b/include/boost/beast/http/impl/read.hpp @@ -19,10 +19,10 @@ #include #include #include -#include +#include #include #include -#include +#include namespace boost { namespace beast { @@ -259,7 +259,7 @@ public: asio::get_associated_immediate_executor( self, s_.get_executor()); - net::dispatch(ex, net::prepend(std::move(self), ec)); + net::dispatch(ex, net::append(std::move(self), ec)); } } self.complete(ec, bytes_transferred_); diff --git a/include/boost/beast/http/impl/write.hpp b/include/boost/beast/http/impl/write.hpp index 119ab80b..1e6a132d 100644 --- a/include/boost/beast/http/impl/write.hpp +++ b/include/boost/beast/http/impl/write.hpp @@ -16,10 +16,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include @@ -103,7 +103,7 @@ public: "http::async_write_some")); const auto ex = asio::get_associated_immediate_executor(*this, s_.get_executor()); - return net::dispatch(ex, net::prepend(std::move(*this), ec, 0)); + return net::dispatch(ex, net::append(std::move(*this), ec, 0)); } if(f.invoked) { @@ -119,7 +119,7 @@ public: "http::async_write_some")); const auto ex = this->get_immediate_executor(); - return net::dispatch(ex, net::prepend(std::move(*this), ec, 0)); + return net::dispatch(ex, net::append(std::move(*this), ec, 0)); } void diff --git a/include/boost/beast/websocket/impl/teardown.hpp b/include/boost/beast/websocket/impl/teardown.hpp index 42a51148..28ad7a32 100644 --- a/include/boost/beast/websocket/impl/teardown.hpp +++ b/include/boost/beast/websocket/impl/teardown.hpp @@ -14,9 +14,9 @@ #include #include #include +#include #include #include -#include #include namespace boost { @@ -129,7 +129,7 @@ public: )); const auto ex = this->get_immediate_executor(); - net::dispatch(ex, net::prepend(std::move(*this), ec)); + net::dispatch(ex, net::append(std::move(*this), ec)); } } {