mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 12:27:44 +02:00
net::prepend is replaced with net::append
This commit is contained in:
committed by
Mohammad Nejati
parent
dadd1bc785
commit
aabd5b51d3
@ -13,12 +13,11 @@
|
||||
#include <boost/beast/core/buffer_traits.hpp>
|
||||
#include <boost/beast/core/detail/service_base.hpp>
|
||||
#include <boost/beast/core/detail/is_invocable.hpp>
|
||||
#include <boost/asio/associated_cancellation_slot.hpp>
|
||||
#include <boost/asio/any_io_executor.hpp>
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/associated_cancellation_slot.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <mutex>
|
||||
#include <stdexcept>
|
||||
#include <vector>
|
||||
@ -134,11 +133,11 @@ class basic_stream<Executor>::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<Executor>::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));
|
||||
}
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
@ -15,15 +15,15 @@
|
||||
#include <boost/beast/core/detail/async_base.hpp>
|
||||
#include <boost/beast/core/detail/filtering_cancellation_slot.hpp>
|
||||
#include <boost/beast/core/detail/work_guard.hpp>
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/associated_allocator.hpp>
|
||||
#include <boost/asio/associated_cancellation_slot.hpp>
|
||||
#include <boost/asio/associated_executor.hpp>
|
||||
#include <boost/asio/associated_immediate_executor.hpp>
|
||||
#include <boost/asio/bind_executor.hpp>
|
||||
#include <boost/asio/handler_continuation_hook.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/handler_continuation_hook.hpp>
|
||||
#include <boost/asio/post.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/core/exchange.hpp>
|
||||
#include <boost/core/empty_value.hpp>
|
||||
#include <utility>
|
||||
@ -425,7 +425,7 @@ public:
|
||||
auto const ex = this->get_immediate_executor();
|
||||
net::dispatch(
|
||||
ex,
|
||||
net::prepend(std::move(h_), std::forward<Args>(args)...));
|
||||
net::append(std::move(h_), std::forward<Args>(args)...));
|
||||
wg1_.reset();
|
||||
}
|
||||
else
|
||||
|
@ -14,6 +14,7 @@
|
||||
#include <boost/beast/core/buffer_traits.hpp>
|
||||
#include <boost/beast/core/buffers_prefix.hpp>
|
||||
#include <boost/beast/websocket/teardown.hpp>
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/coroutine.hpp>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/make_shared.hpp>
|
||||
@ -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();
|
||||
|
@ -15,8 +15,8 @@
|
||||
#include <boost/beast/core/read_size.hpp>
|
||||
#include <boost/beast/core/stream_traits.hpp>
|
||||
#include <boost/beast/core/detail/is_invocable.hpp>
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
|
||||
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
|
||||
|
@ -19,10 +19,10 @@
|
||||
#include <boost/beast/core/stream_traits.hpp>
|
||||
#include <boost/beast/core/detail/buffer.hpp>
|
||||
#include <boost/beast/core/detail/read.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/compose.hpp>
|
||||
#include <boost/asio/coroutine.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/asio/error.hpp>
|
||||
|
||||
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_);
|
||||
|
@ -16,10 +16,10 @@
|
||||
#include <boost/beast/core/make_printable.hpp>
|
||||
#include <boost/beast/core/stream_traits.hpp>
|
||||
#include <boost/beast/core/detail/is_invocable.hpp>
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/coroutine.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/write.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <boost/optional.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <ostream>
|
||||
@ -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
|
||||
|
@ -14,9 +14,9 @@
|
||||
#include <boost/beast/core/stream_traits.hpp>
|
||||
#include <boost/beast/core/detail/bind_continuation.hpp>
|
||||
#include <boost/beast/core/detail/is_invocable.hpp>
|
||||
#include <boost/asio/append.hpp>
|
||||
#include <boost/asio/coroutine.hpp>
|
||||
#include <boost/asio/dispatch.hpp>
|
||||
#include <boost/asio/prepend.hpp>
|
||||
#include <memory>
|
||||
|
||||
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));
|
||||
}
|
||||
}
|
||||
{
|
||||
|
Reference in New Issue
Block a user