Rename to async_base, stable_async_base

This commit is contained in:
Vinnie Falco
2019-02-25 09:31:51 -08:00
parent 5dd01155e6
commit 81f33a0f89
33 changed files with 191 additions and 197 deletions

View File

@ -1,3 +1,15 @@
Version 221:
* Rename to async_base, stable_async_base
--------------------------------------------------------------------------------
Version 220:
* Documentation and release notes
--------------------------------------------------------------------------------
Version 219:
* More split definitions in test::stream

View File

@ -44,8 +44,8 @@ composed operations:
[table Asynchronous Helpers
[[Name][Description]]
[[
[link beast.ref.boost__beast__async_op_base `async_op_base`]
[link beast.ref.boost__beast__stable_async_op_base `stable_async_op_base`]
[link beast.ref.boost__beast__async_base `async_op_base`]
[link beast.ref.boost__beast__stable_async_base `stable_async_base`]
][
This class is designed to be used as a base class when authoring
composed asynchronous operations expressed as an intermediate

View File

@ -23,7 +23,7 @@
<entry valign="top">
<bridgehead renderas="sect3">Classes&nbsp;<emphasis role="normal">(1 of 2)</emphasis></bridgehead>
<simplelist type="vert" columns="1">
<member><link linkend="beast.ref.boost__beast__async_op_base">async_op_base</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__async_base">async_base</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__basic_stream">basic_stream</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__file">file</link></member>
<member><link linkend="beast.ref.boost__beast__file_mode">file_mode</link></member>
@ -47,7 +47,7 @@
<member><link linkend="beast.ref.boost__beast__span">span</link></member>
<member><link linkend="beast.ref.boost__beast__simple_rate_policy">simple_rate_policy</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__static_string">static_string</link></member>
<member><link linkend="beast.ref.boost__beast__stable_async_op_base">stable_async_op_base</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__stable_async_base">stable_async_base</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>
<member><link linkend="beast.ref.boost__beast__string_param">string_param</link></member>
<member><link linkend="beast.ref.boost__beast__string_view">string_view</link></member>
<member><link linkend="beast.ref.boost__beast__tcp_stream">tcp_stream</link>&nbsp;<emphasis role="green">&#9733;</emphasis></member>

View File

@ -11,6 +11,8 @@
[/-----------------------------------------------------------------------------]
[/
* [phrase library..[@/libs/beast/ Beast]:]
'''<emphasis role="bold"><emphasis role="red">BIG Update!!!</emphasis></emphasis>''' The
[@/libs/beast/doc/html/beast/quickref.html reference]
@ -45,8 +47,8 @@
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1322r0.html P1322R0],
no more `bind_executor` at call sites!
* Base classes
[@/libs/beast/doc/html/beast/ref/boost__beast__async_op_base.html `async_op_base`] and
[@/libs/beast/doc/html/beast/ref/boost__beast__stable_async_op_base.html `stable_async_op_base`] and
[@/libs/beast/doc/html/beast/ref/boost__beast__async_base.html `async_base`] and
[@/libs/beast/doc/html/beast/ref/boost__beast__stable_async_base.html `stable_async_base`] and
handle all composed operation boilerplate for you.
* [@/libs/beast/doc/html/beast/ref/boost__beast__ssl_stream.html `ssl_stream`] provides a
movable, assignable SSL stream with a flat write optimization.
@ -58,6 +60,8 @@
[@/libs/beast/doc/html/beast/release_notes.html Release Notes]
for a complete list of changes.
]
[/-----------------------------------------------------------------------------]
[heading Boost 1.70]
@ -144,8 +148,8 @@
* New trait `buffers_type`
* New classes
`async_op_base`,
`stable_async_op_base`
`async_base`,
`stable_async_base`
* Handle boilerplate for writing composed operations
* New
`allocate_stable`

View File

@ -104,7 +104,6 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------
INPUT = \
$(LIB_DIR)/include/boost/beast/ \
$(LIB_DIR)/include/boost/beast/_experimental/core \
$(LIB_DIR)/include/boost/beast/_experimental/http \
$(LIB_DIR)/include/boost/beast/_experimental/test \
$(LIB_DIR)/include/boost/beast/core \

View File

@ -143,7 +143,7 @@ async_echo(
using handler_type = BOOST_ASIO_HANDLER_TYPE(CompletionToken, void(beast::error_code));
// The class template `async_op_base` holds the caller's completion
// The class template `async_base` holds the caller's completion
// handler for us, and provides all of the boilerplate for forwarding
// the associated allocator and associated executor from the caller's
// handler to our operation. It also maintains a `net::executor_work_guard`
@ -154,13 +154,13 @@ async_echo(
// performs more than one asynchronous operation in a row).
// We declare this type alias to make the code easier to read.
using base_type = beast::async_op_base<
using base_type = beast::async_base<
handler_type, /*< The type of the completion handler obtained from the token >*/
beast::executor_type<AsyncStream> /*< The type of executor used by the stream to dispatch asynchronous operations >*/
>;
// This nested class implements the echo composed operation as a
// stateful completion handler. We derive from `async_op_base` to
// stateful completion handler. We derive from `async_base` to
// take care of boilerplate and we derived from net::coroutine to
// allow the reenter and yield keywords to work.
@ -174,7 +174,7 @@ async_echo(
DynamicBuffer& buffer,
handler_type&& handler)
: base_type(
std::move(handler), /*< The `async_op_base` helper takes ownership of the handler, >*/
std::move(handler), /*< The `async_base` helper takes ownership of the handler, >*/
stream.get_executor()) /*< and also needs to know which executor to use. >*/
, stream_(stream)
, buffer_(buffer)
@ -304,7 +304,7 @@ async_echo(
// if cont == false (meaning, that the call stack still includes
// the frame of the initiating function) then we need to use
// `net::post` to cause us to be called again after the initiating
// function. The function `async_op_base::invoke` takes care of
// function. The function `async_base::invoke` takes care of
// calling the final completion handler, using post if the
// first argument is false, otherwise invoking it directly.

View File

@ -40,16 +40,11 @@ namespace http {
@par Example
To use the @ref stream template with an `ip::tcp::socket`,
To use the @ref icy_stream template with an @ref tcp_stream
you would write:
@code
http::icy_stream<ip::tcp::socket> is{io_context};
@endcode
Alternatively, you can write:
@code
ip::tcp::socket sock{io_context};
http::icy_stream<ip::tcp::socket&> is{sock};
http::icy_stream<tcp_stream> is(ioc);
@endcode
@tparam NextLayer The type representing the next layer, to which

View File

@ -10,7 +10,7 @@
#ifndef BOOST_BEAST_CORE_IMPL_ICY_STREAM_HPP
#define BOOST_BEAST_CORE_IMPL_ICY_STREAM_HPP
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/buffer_size.hpp>
#include <boost/beast/core/buffers_adaptor.hpp>
@ -123,7 +123,7 @@ struct icy_stream<NextLayer>::ops
template<class Buffers, class Handler>
class read_op
: public beast::stable_async_op_base<Handler,
: public beast::stable_async_base<Handler,
beast::executor_type<icy_stream>>
, public net::coroutine
{
@ -159,7 +159,7 @@ public:
Handler_&& h,
icy_stream& s,
Buffers const& b)
: stable_async_op_base<Handler,
: stable_async_base<Handler,
beast::executor_type<icy_stream>>(
std::forward<Handler_>(h), s.get_executor())
, d_(beast::allocate_stable<data>(*this, s, b))

View File

@ -7,13 +7,13 @@
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_CORE_ASYNC_OP_BASE_HPP
#define BOOST_BEAST_CORE_ASYNC_OP_BASE_HPP
#ifndef BOOST_BEAST_CORE_ASYNC_BASE_HPP
#define BOOST_BEAST_CORE_ASYNC_BASE_HPP
#include <boost/beast/core/detail/config.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/detail/allocator.hpp>
#include <boost/beast/core/detail/async_op_base.hpp>
#include <boost/beast/core/detail/async_base.hpp>
#include <boost/asio/associated_allocator.hpp>
#include <boost/asio/associated_executor.hpp>
#include <boost/asio/bind_executor.hpp>
@ -40,7 +40,7 @@ namespace beast {
The composed operation must be typical; that is, associated with one
executor of an I/O object, and invoking a caller-provided completion
handler when the operation is finished. Classes derived from
@ref async_op_base will acquire these properties:
@ref async_base will acquire these properties:
@li Ownership of the final completion handler provided upon construction.
@ -69,7 +69,7 @@ namespace beast {
@par Example
The following code demonstrates how @ref async_op_base may be be used to
The following code demonstrates how @ref async_base may be be used to
assist authoring an asynchronous initiating function, by providing all of
the boilerplate to manage the final completion handler in a way that
maintains the allocator and executor associations:
@ -82,7 +82,7 @@ namespace beast {
async_read(AsyncReadStream& stream, net::mutable_buffer buffer, ReadHandler&& handler)
{
using handler_type = BOOST_ASIO_HANDLER_TYPE(ReadHandler, void(error_code, std::size_t));
using base_type = async_op_base<handler_type, typename AsyncReadStream::executor_type>;
using base_type = async_base<handler_type, typename AsyncReadStream::executor_type>;
struct op : base_type
{
@ -132,7 +132,7 @@ namespace beast {
do not have stable addresses, as the composed operation object is move
constructed upon each call to an initiating function. For most operations
this is not a problem. For complex operations requiring stable temporary
storage, the class @ref stable_async_op_base is provided which offers
storage, the class @ref stable_async_base is provided which offers
additional functionality:
@li The free function @ref allocate_stable may be used to allocate
@ -169,14 +169,14 @@ namespace beast {
not default constructible, an instance of the type must be provided
upon construction.
@see @ref stable_async_op_base
@see @ref stable_async_base
*/
template<
class Handler,
class Executor1,
class Allocator = std::allocator<void>
>
class async_op_base
class async_base
#if ! BOOST_BEAST_DOXYGEN
: private boost::empty_value<Allocator>
#endif
@ -212,7 +212,7 @@ public:
*/
#if BOOST_BEAST_DOXYGEN
template<class Handler_>
async_op_base(
async_base(
Handler&& handler,
Executor1 const& ex1,
Allocator const& alloc = Allocator());
@ -222,10 +222,10 @@ public:
class = typename std::enable_if<
! std::is_same<typename
std::decay<Handler_>::type,
async_op_base
async_base
>::value>::type
>
async_op_base(
async_base(
Handler_&& handler,
Executor1 const& ex1)
: h_(std::forward<Handler_>(handler))
@ -234,7 +234,7 @@ public:
}
template<class Handler_>
async_op_base(
async_base(
Handler_&& handler,
Executor1 const& ex1,
Allocator const& alloc)
@ -247,11 +247,11 @@ public:
#endif
/// Move Constructor
async_op_base(async_op_base&& other) = default;
async_base(async_base&& other) = default;
/** The type of allocator associated with this object.
If a class derived from @ref async_op_base is a completion
If a class derived from @ref async_base is a completion
handler, then the associated allocator of the derived class will
be this type.
*/
@ -260,7 +260,7 @@ public:
/** The type of executor associated with this object.
If a class derived from @ref async_op_base is a completion
If a class derived from @ref async_base is a completion
handler, then the associated executor of the derived class will
be this type.
*/
@ -269,7 +269,7 @@ public:
/** Returns the allocator associated with this object.
If a class derived from @ref async_op_base is a completion
If a class derived from @ref async_base is a completion
handler, then the object returned from this function will be used
as the associated allocator of the derived class.
*/
@ -282,7 +282,7 @@ public:
/** Returns the executor associated with this object.
If a class derived from @ref async_op_base is a completion
If a class derived from @ref async_base is a completion
handler, then the object returned from this function will be used
as the associated executor of the derived class.
*/
@ -319,7 +319,7 @@ public:
arguments forwarded. It is undefined to call either of
@ref invoke or @ref invoke_now more than once.
Any temporary objects allocated with @ref allocate_stable will
Any temporary objects allocated with @ref beast::allocate_stable will
be automatically destroyed before the final completion handler
is invoked.
@ -359,7 +359,7 @@ public:
arguments forwarded. It is undefined to call either of
@ref invoke or @ref invoke_now more than once.
Any temporary objects allocated with @ref allocate_stable will
Any temporary objects allocated with @ref beast::allocate_stable will
be automatically destroyed before the final completion handler
is invoked.
@ -385,12 +385,12 @@ public:
friend
void asio_handler_invoke(
Function&& f,
async_op_base<
async_base<
Handler_, Executor1_, Allocator_>* p);
friend
void* asio_handler_allocate(
std::size_t size, async_op_base* p)
std::size_t size, async_base* p)
{
using net::asio_handler_allocate;
return asio_handler_allocate(
@ -400,7 +400,7 @@ public:
friend
void asio_handler_deallocate(
void* mem, std::size_t size,
async_op_base* p)
async_base* p)
{
using net::asio_handler_deallocate;
asio_handler_deallocate(mem, size,
@ -409,7 +409,7 @@ public:
friend
bool asio_handler_is_continuation(
async_op_base* p)
async_base* p)
{
using net::asio_handler_is_continuation;
return asio_handler_is_continuation(
@ -431,7 +431,7 @@ public:
The composed operation must be typical; that is, associated with one
executor of an I/O object, and invoking a caller-provided completion
handler when the operation is finished. Classes derived from
@ref async_op_base will acquire these properties:
@ref async_base will acquire these properties:
@li Ownership of the final completion handler provided upon construction.
@ -462,7 +462,7 @@ public:
do not have stable addresses, as the composed operation object is move
constructed upon each call to an initiating function. For most operations
this is not a problem. For complex operations requiring stable temporary
storage, the class @ref stable_async_op_base is provided which offers
storage, the class @ref stable_async_base is provided which offers
additional functionality:
@li The free function @ref allocate_stable may be used to allocate
@ -478,7 +478,7 @@ public:
@par Example
The following code demonstrates how @ref stable_async_op_base may be be used to
The following code demonstrates how @ref stable_async_base may be be used to
assist authoring an asynchronous initiating function, by providing all of
the boilerplate to manage the final completion handler in a way that maintains
the allocator and executor associations. Furthermore, the operation shown
@ -499,7 +499,7 @@ public:
void(error_code)>::return_type
{
using handler_type = typename net::async_completion<WriteHandler, void(error_code)>::completion_handler_type;
using base_type = stable_async_op_base<handler_type, typename AsyncWriteStream::executor_type>;
using base_type = stable_async_base<handler_type, typename AsyncWriteStream::executor_type>;
struct op : base_type
{
@ -592,15 +592,15 @@ public:
not default constructible, an instance of the type must be provided
upon construction.
@see @ref allocate_stable, @ref async_op_base
@see @ref allocate_stable, @ref async_base
*/
template<
class Handler,
class Executor1,
class Allocator = std::allocator<void>
>
class stable_async_op_base
: public async_op_base<
class stable_async_base
: public async_base<
Handler, Executor1, Allocator>
{
detail::stable_base* list_ = nullptr;
@ -629,7 +629,7 @@ public:
*/
#if BOOST_BEAST_DOXYGEN
template<class Handler>
stable_async_op_base(
stable_async_base(
Handler&& handler,
Executor1 const& ex1,
Allocator const& alloc = Allocator());
@ -639,24 +639,24 @@ public:
class = typename std::enable_if<
! std::is_same<typename
std::decay<Handler_>::type,
stable_async_op_base
stable_async_base
>::value>::type
>
stable_async_op_base(
stable_async_base(
Handler_&& handler,
Executor1 const& ex1)
: async_op_base<
: async_base<
Handler, Executor1, Allocator>(
std::forward<Handler_>(handler), ex1)
{
}
template<class Handler_>
stable_async_op_base(
stable_async_base(
Handler_&& handler,
Executor1 const& ex1,
Allocator const& alloc)
: async_op_base<
: async_base<
Handler, Executor1, Allocator>(
std::forward<Handler_>(handler), ex1, alloc)
{
@ -664,8 +664,8 @@ public:
#endif
/// Move Constructor
stable_async_op_base(stable_async_op_base&& other)
: async_op_base<Handler, Executor1, Allocator>(
stable_async_base(stable_async_base&& other)
: async_base<Handler, Executor1, Allocator>(
std::move(other))
, list_(boost::exchange(other.list_, nullptr))
{
@ -677,7 +677,7 @@ public:
state objects allocated with @ref allocate_stable will
be destroyed here.
*/
~stable_async_op_base()
~stable_async_base()
{
detail::stable_base::destroy_list(list_);
}
@ -696,7 +696,7 @@ public:
friend
State&
allocate_stable(
stable_async_op_base<
stable_async_base<
Handler_, Executor1_, Allocator_>& base,
Args&&... args);
};
@ -709,7 +709,7 @@ template<
class Function>
void asio_handler_invoke(
Function&& f,
async_op_base<
async_base<
Handler, Executor1, Allocator>* p)
{
using net::asio_handler_invoke;
@ -757,7 +757,7 @@ struct allocate_stable_state final
The object will be destroyed just before the completion
handler is invoked, or when the base is destroyed.
@see @ref stable_async_op_base
@see @ref stable_async_base
*/
template<
class State,
@ -767,11 +767,11 @@ template<
class... Args>
State&
allocate_stable(
stable_async_op_base<
stable_async_base<
Handler, Executor1, Allocator>& base,
Args&&... args)
{
using allocator_type = typename stable_async_op_base<
using allocator_type = typename stable_async_base<
Handler, Executor1, Allocator>::allocator_type;
using A = typename detail::allocator_traits<

View File

@ -7,8 +7,8 @@
// Official repository: https://github.com/boostorg/beast
//
#ifndef BOOST_BEAST_CORE_DETAIL_ASYNC_OP_BASE_HPP
#define BOOST_BEAST_CORE_DETAIL_ASYNC_OP_BASE_HPP
#ifndef BOOST_BEAST_CORE_DETAIL_ASYNC_BASE_HPP
#define BOOST_BEAST_CORE_DETAIL_ASYNC_BASE_HPP
#include <boost/core/exchange.hpp>

View File

@ -11,7 +11,7 @@
#define BOOST_BEAST_DETAIL_IMPL_READ_HPP
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/flat_static_buffer.hpp>
#include <boost/asio/basic_stream_socket.hpp>
#include <boost/asio/coroutine.hpp>
@ -38,7 +38,7 @@ template<
class Handler>
class read_op
: public net::coroutine
, public async_op_base<
, public async_base<
Handler, beast::executor_type<Stream>>
{
Stream& s_;
@ -56,7 +56,7 @@ public:
Stream& s,
DynamicBuffer& b,
Condition_&& cond)
: async_op_base<Handler,
: async_base<Handler,
beast::executor_type<Stream>>(
std::forward<Handler_>(h),
s.get_executor())

View File

@ -11,7 +11,7 @@
#define BOOST_BEAST_CORE_DETECT_SSL_HPP
#include <boost/beast/core/detail/config.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/error.hpp>
#include <boost/beast/core/read_size.hpp>
#include <boost/beast/core/stream_traits.hpp>
@ -447,7 +447,7 @@ namespace detail {
// which are based on macros forming a switch statement. The
// operation is derived from `coroutine` for this reason.
//
// The library type `async_op_base` takes care of all of the
// The library type `async_base` takes care of all of the
// boilerplate for writing composed operations, including:
//
// * Storing the user's completion handler
@ -457,7 +457,7 @@ namespace detail {
// * Deallocating temporary storage before invoking the handler
// * Posting the handler to the executor on an immediate completion
//
// `async_op_base` needs to know the type of the handler, as well
// `async_base` needs to know the type of the handler, as well
// as the executor of the I/O object being used. The metafunction
// `executor_type` returns the type of executor used by an
// I/O object.
@ -468,7 +468,7 @@ template<
class DynamicBuffer>
class detect_ssl_op
: public boost::asio::coroutine
, public async_op_base<
, public async_base<
DetectHandler, executor_type<AsyncReadStream>>
{
// This composed operation has trivial state,
@ -495,7 +495,7 @@ public:
DetectHandler_&& handler,
AsyncReadStream& stream,
DynamicBuffer& buffer)
: beast::async_op_base<
: beast::async_base<
DetectHandler_,
beast::executor_type<AsyncReadStream>>(
std::forward<DetectHandler_>(handler),

View File

@ -10,7 +10,7 @@
#ifndef BOOST_BEAST_CORE_IMPL_BASIC_STREAM_HPP
#define BOOST_BEAST_CORE_IMPL_BASIC_STREAM_HPP
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/buffer_size.hpp>
#include <boost/beast/core/buffers_prefix.hpp>
#include <boost/beast/core/detail/type_traits.hpp>
@ -202,7 +202,7 @@ struct basic_stream<Protocol, Executor, RatePolicy>::ops
template<bool isRead, class Buffers, class Handler>
class transfer_op
: public async_op_base<Handler, Executor>
: public async_base<Handler, Executor>
, public boost::asio::coroutine
{
boost::shared_ptr<impl_type> impl_;
@ -294,7 +294,7 @@ public:
Handler_&& h,
basic_stream& s,
Buffers const& b)
: async_op_base<Handler, Executor>(
: async_base<Handler, Executor>(
std::forward<Handler_>(h), s.get_executor())
, impl_(s.impl_)
, pg_(state().pending)
@ -404,7 +404,7 @@ public:
template<class Handler>
class connect_op
: public async_op_base<Handler, Executor>
: public async_base<Handler, Executor>
{
boost::shared_ptr<impl_type> impl_;
pending_guard pg0_;
@ -422,7 +422,7 @@ public:
Handler_&& h,
basic_stream& s,
endpoint_type ep)
: async_op_base<Handler, Executor>(
: async_base<Handler, Executor>(
std::forward<Handler_>(h), s.get_executor())
, impl_(s.impl_)
, pg0_(impl_->read.pending)
@ -450,7 +450,7 @@ public:
basic_stream& s,
Endpoints const& eps,
Condition const& cond)
: async_op_base<Handler, Executor>(
: async_base<Handler, Executor>(
std::forward<Handler_>(h), s.get_executor())
, impl_(s.impl_)
, pg0_(impl_->read.pending)
@ -478,7 +478,7 @@ public:
basic_stream& s,
Iterator begin, Iterator end,
Condition const& cond)
: async_op_base<Handler, Executor>(
: async_base<Handler, Executor>(
std::forward<Handler_>(h), s.get_executor())
, impl_(s.impl_)
, pg0_(impl_->read.pending)

View File

@ -10,7 +10,7 @@
#ifndef BOOST_BEAST_IMPL_BUFFERED_READ_STREAM_HPP
#define BOOST_BEAST_IMPL_BUFFERED_READ_STREAM_HPP
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/error.hpp>
#include <boost/beast/core/read_size.hpp>
@ -29,7 +29,7 @@ struct buffered_read_stream<Stream, DynamicBuffer>::ops
template<class MutableBufferSequence, class Handler>
class read_op
: public async_op_base<Handler,
: public async_base<Handler,
beast::executor_type<buffered_read_stream>>
{
buffered_read_stream& s_;
@ -45,7 +45,7 @@ public:
Handler_&& h,
buffered_read_stream& s,
MutableBufferSequence const& b)
: async_op_base<
: async_base<
Handler, beast::executor_type<buffered_read_stream>>(
std::forward<Handler_>(h), s.get_executor())
, s_(s)

View File

@ -10,7 +10,7 @@
#ifndef BOOST_BEAST_CORE_IMPL_FLAT_STREAM_HPP
#define BOOST_BEAST_CORE_IMPL_FLAT_STREAM_HPP
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/buffers_prefix.hpp>
#include <boost/beast/core/static_buffer.hpp>
#include <boost/beast/core/stream_traits.hpp>
@ -28,7 +28,7 @@ struct flat_stream<NextLayer>::ops
template<class Handler>
class write_op
: public async_op_base<Handler,
: public async_base<Handler,
beast::executor_type<flat_stream>>
, public net::coroutine
{
@ -40,7 +40,7 @@ public:
Handler_&& h,
flat_stream<NextLayer>& s,
ConstBufferSequence const& b)
: async_op_base<Handler,
: async_base<Handler,
beast::executor_type<flat_stream>>(
std::forward<Handler_>(h),
s.get_executor())

View File

@ -12,7 +12,7 @@
#if BOOST_BEAST_USE_WIN32_FILE
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/buffers_range.hpp>
#include <boost/beast/core/detail/clamp.hpp>
@ -331,7 +331,7 @@ template<
bool isRequest, class Fields,
class Handler>
class write_some_win32_op
: public beast::async_op_base<Handler, Executor>
: public beast::async_base<Handler, Executor>
{
net::basic_stream_socket<
Protocol, Executor>& sock_;
@ -348,7 +348,7 @@ public:
Protocol, Executor>& s,
serializer<isRequest,
basic_file_body<file_win32>,Fields>& sr)
: async_op_base<
: async_base<
Handler, Executor>(
std::forward<Handler_>(h),
s.get_executor())

View File

@ -14,7 +14,7 @@
#include <boost/beast/http/error.hpp>
#include <boost/beast/http/parser.hpp>
#include <boost/beast/http/read.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/stream_traits.hpp>
#include <boost/beast/core/detail/read.hpp>
#include <boost/asio/error.hpp>
@ -158,7 +158,7 @@ template<
bool isRequest, class Body, class Allocator,
class Handler>
class read_msg_op
: public beast::stable_async_op_base<
: public beast::stable_async_base<
Handler, beast::executor_type<Stream>>
, public net::coroutine
{
@ -193,7 +193,7 @@ public:
Stream& s,
DynamicBuffer& b,
message_type& m)
: stable_async_op_base<
: stable_async_base<
Handler, beast::executor_type<Stream>>(
std::forward<Handler_>(h), s.get_executor())
, d_(beast::allocate_stable<data>(

View File

@ -11,7 +11,7 @@
#define BOOST_BEAST_HTTP_IMPL_WRITE_HPP
#include <boost/beast/http/type_traits.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/buffers_range.hpp>
#include <boost/beast/core/ostream.hpp>
@ -34,7 +34,7 @@ template<
class Stream,
bool isRequest, class Body, class Fields>
class write_some_op
: public beast::async_op_base<
: public beast::async_base<
Handler, beast::executor_type<Stream>>
{
Stream& s_;
@ -72,7 +72,7 @@ public:
Handler_&& h,
Stream& s,
serializer<isRequest, Body, Fields>& sr)
: async_op_base<
: async_base<
Handler, beast::executor_type<Stream>>(
std::forward<Handler_>(h), s.get_executor())
, s_(s)
@ -157,7 +157,7 @@ template<
class Predicate,
bool isRequest, class Body, class Fields>
class write_op
: public beast::async_op_base<
: public beast::async_base<
Handler, beast::executor_type<Stream>>
, public net::coroutine
{
@ -171,7 +171,7 @@ public:
Handler_&& h,
Stream& s,
serializer<isRequest, Body, Fields>& sr)
: async_op_base<
: async_base<
Handler, beast::executor_type<Stream>>(
std::forward<Handler_>(h), s.get_executor())
, s_(s)
@ -219,7 +219,7 @@ template<
class Stream,
bool isRequest, class Body, class Fields>
class write_msg_op
: public beast::stable_async_op_base<
: public beast::stable_async_base<
Handler, beast::executor_type<Stream>>
{
Stream& s_;
@ -233,7 +233,7 @@ public:
Handler_&& h,
Stream& s,
Args&&... args)
: stable_async_op_base<
: stable_async_base<
Handler, beast::executor_type<Stream>>(
std::forward<Handler_>(h), s.get_executor())
, s_(s)

View File

@ -17,7 +17,7 @@
#include <boost/beast/http/read.hpp>
#include <boost/beast/http/string_body.hpp>
#include <boost/beast/http/write.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/buffer_size.hpp>
#include <boost/beast/core/stream_traits.hpp>
#include <boost/beast/core/detail/buffer.hpp>
@ -170,7 +170,7 @@ build_response(
template<class NextLayer, bool deflateSupported>
template<class Handler>
class stream<NextLayer, deflateSupported>::response_op
: public beast::stable_async_op_base<
: public beast::stable_async_base<
Handler, beast::executor_type<stream>>
, public net::coroutine
{
@ -190,7 +190,7 @@ public:
http::basic_fields<Allocator>> const& req,
Decorator const& decorator,
bool cont = false)
: stable_async_op_base<Handler,
: stable_async_base<Handler,
beast::executor_type<stream>>(
std::forward<Handler_>(h),
sp->stream.get_executor())
@ -243,7 +243,7 @@ public:
template<class NextLayer, bool deflateSupported>
template<class Handler, class Decorator>
class stream<NextLayer, deflateSupported>::accept_op
: public beast::stable_async_op_base<
: public beast::stable_async_base<
Handler, beast::executor_type<stream>>
, public net::coroutine
{
@ -258,7 +258,7 @@ public:
boost::shared_ptr<impl_type> const& sp,
Decorator const& decorator,
Buffers const& buffers)
: stable_async_op_base<Handler,
: stable_async_base<Handler,
beast::executor_type<stream>>(
std::forward<Handler_>(h),
sp->stream.get_executor())

View File

@ -13,7 +13,7 @@
#include <boost/beast/websocket/teardown.hpp>
#include <boost/beast/websocket/detail/mask.hpp>
#include <boost/beast/websocket/impl/stream_impl.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/flat_static_buffer.hpp>
#include <boost/beast/core/stream_traits.hpp>
#include <boost/beast/core/detail/bind_continuation.hpp>
@ -36,7 +36,7 @@ namespace websocket {
template<class NextLayer, bool deflateSupported>
template<class Handler>
class stream<NextLayer, deflateSupported>::close_op
: public beast::stable_async_op_base<
: public beast::stable_async_base<
Handler, beast::executor_type<stream>>
, public net::coroutine
{
@ -52,7 +52,7 @@ public:
Handler_&& h,
boost::shared_ptr<impl_type> const& sp,
close_reason const& cr)
: stable_async_op_base<Handler,
: stable_async_base<Handler,
beast::executor_type<stream>>(
std::forward<Handler_>(h),
sp->stream.get_executor())

View File

@ -16,7 +16,7 @@
#include <boost/beast/http/message.hpp>
#include <boost/beast/http/read.hpp>
#include <boost/beast/http/write.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/flat_buffer.hpp>
#include <boost/beast/core/stream_traits.hpp>
#include <boost/asio/coroutine.hpp>
@ -35,7 +35,7 @@ namespace websocket {
template<class NextLayer, bool deflateSupported>
template<class Handler>
class stream<NextLayer, deflateSupported>::handshake_op
: public beast::stable_async_op_base<Handler,
: public beast::stable_async_base<Handler,
beast::executor_type<stream>>
, public net::coroutine
{
@ -65,7 +65,7 @@ public:
response_type* res_p,
string_view host, string_view target,
Decorator const& decorator)
: stable_async_op_base<Handler,
: stable_async_base<Handler,
beast::executor_type<stream>>(
std::forward<Handler_>(h),
sp->stream.get_executor())

View File

@ -10,7 +10,7 @@
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_PING_HPP
#define BOOST_BEAST_WEBSOCKET_IMPL_PING_HPP
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/stream_traits.hpp>
#include <boost/beast/core/detail/bind_continuation.hpp>
@ -33,7 +33,7 @@ namespace websocket {
template<class NextLayer, bool deflateSupported>
template<class Handler>
class stream<NextLayer, deflateSupported>::ping_op
: public beast::stable_async_op_base<
: public beast::stable_async_base<
Handler, beast::executor_type<stream>>
, public net::coroutine
{
@ -49,7 +49,7 @@ public:
boost::shared_ptr<impl_type> const& sp,
detail::opcode op,
ping_data const& payload)
: stable_async_op_base<Handler,
: stable_async_base<Handler,
beast::executor_type<stream>>(
std::forward<Handler_>(h),
sp->stream.get_executor())

View File

@ -14,7 +14,7 @@
#include <boost/beast/websocket/teardown.hpp>
#include <boost/beast/websocket/detail/mask.hpp>
#include <boost/beast/websocket/impl/stream_impl.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/buffers_prefix.hpp>
#include <boost/beast/core/buffers_suffix.hpp>
@ -45,7 +45,7 @@ namespace websocket {
template<class NextLayer, bool deflateSupported>
template<class Handler, class MutableBufferSequence>
class stream<NextLayer, deflateSupported>::read_some_op
: public beast::async_op_base<
: public beast::async_base<
Handler, beast::executor_type<stream>>
, public net::coroutine
{
@ -65,7 +65,7 @@ public:
Handler_&& h,
boost::shared_ptr<impl_type> const& sp,
MutableBufferSequence const& bs)
: async_op_base<
: async_base<
Handler, beast::executor_type<stream>>(
std::forward<Handler_>(h),
sp->stream.get_executor())
@ -613,7 +613,7 @@ public:
template<class NextLayer, bool deflateSupported>
template<class Handler, class DynamicBuffer>
class stream<NextLayer, deflateSupported>::read_op
: public beast::async_op_base<
: public beast::async_base<
Handler, beast::executor_type<stream>>
, public net::coroutine
{
@ -631,7 +631,7 @@ public:
DynamicBuffer& b,
std::size_t limit,
bool some)
: async_op_base<Handler,
: async_base<Handler,
beast::executor_type<stream>>(
std::forward<Handler_>(h),
sp->stream.get_executor())

View File

@ -10,7 +10,7 @@
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_TEARDOWN_HPP
#define BOOST_BEAST_WEBSOCKET_IMPL_TEARDOWN_HPP
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/stream_traits.hpp>
#include <boost/beast/core/detail/bind_continuation.hpp>
@ -29,7 +29,7 @@ template<
class Protocol, class Executor,
class Handler>
class teardown_tcp_op
: public beast::async_op_base<
: public beast::async_base<
Handler, beast::executor_type<
net::basic_stream_socket<
Protocol, Executor>>>
@ -48,7 +48,7 @@ public:
Handler_&& h,
socket_type& s,
role_type role)
: async_op_base<Handler,
: async_base<Handler,
beast::executor_type<
net::basic_stream_socket<
Protocol, Executor>>>(

View File

@ -11,7 +11,7 @@
#define BOOST_BEAST_WEBSOCKET_IMPL_WRITE_HPP
#include <boost/beast/websocket/detail/mask.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/bind_handler.hpp>
#include <boost/beast/core/buffer_size.hpp>
#include <boost/beast/core/buffers_cat.hpp>
@ -39,7 +39,7 @@ namespace websocket {
template<class NextLayer, bool deflateSupported>
template<class Handler, class Buffers>
class stream<NextLayer, deflateSupported>::write_some_op
: public beast::async_op_base<
: public beast::async_base<
Handler, beast::executor_type<stream>>
, public net::coroutine
{
@ -73,7 +73,7 @@ public:
boost::shared_ptr<impl_type> const& sp,
bool fin,
Buffers const& bs)
: beast::async_op_base<Handler,
: beast::async_base<Handler,
beast::executor_type<stream>>(
std::forward<Handler_>(h),
sp->stream.get_executor())

View File

@ -10,7 +10,6 @@
local SOURCES =
error.cpp
icy_stream.cpp
ssl_stream.cpp
stream.cpp
;

View File

@ -1,15 +0,0 @@
//
// Copyright (c) 2016-2019 Vinnie Falco (vinnie dot falco at gmail dot com)
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Official repository: https://github.com/boostorg/beast
//
#if BOOST_BEAST_USE_OPENSSL
// Test that header file is self-contained.
#include <boost/beast/_experimental/core/ssl_stream.hpp>
#endif

View File

@ -31,7 +31,7 @@ add_executable (tests-beast-core
_detail_tuple.cpp
_detail_variant.cpp
_detail_varint.cpp
async_op_base.cpp
async_base.cpp
basic_stream.cpp
bind_handler.cpp
buffer_size.cpp

View File

@ -19,7 +19,7 @@ local SOURCES =
_detail_tuple.cpp
_detail_variant.cpp
_detail_varint.cpp
async_op_base.cpp
async_base.cpp
basic_stream.cpp
bind_handler.cpp
buffer_size.cpp

View File

@ -8,7 +8,7 @@
//
// Test that header file is self-contained.
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include "test_handler.hpp"
@ -164,7 +164,7 @@ struct associated_executor<
namespace boost {
namespace beast {
class async_op_base_test : public beast::unit_test::suite
class async_base_test : public beast::unit_test::suite
{
public:
// no associated allocator
@ -173,7 +173,7 @@ public:
std::is_same<
std::allocator<void>,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, no_alloc>,
net::io_context::executor_type>
>>::value);
@ -182,7 +182,7 @@ public:
std::is_same<
std::allocator<int>,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, no_alloc>,
net::io_context::executor_type,
std::allocator<int>>
@ -192,7 +192,7 @@ public:
std::is_same<
std::allocator<void>,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, no_alloc>,
net::io_context::executor_type>,
std::allocator<int> // ignored
@ -202,7 +202,7 @@ public:
std::is_same<
std::allocator<int>,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, no_alloc>,
net::io_context::executor_type,
std::allocator<int>>,
@ -215,7 +215,7 @@ public:
std::is_same<
nested_alloc::allocator_type,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, nested_alloc>,
net::io_context::executor_type>
>>::value);
@ -224,7 +224,7 @@ public:
std::is_same<
nested_alloc::allocator_type,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, nested_alloc>,
net::io_context::executor_type,
std::allocator<int>> // ignored
@ -234,7 +234,7 @@ public:
std::is_same<
nested_alloc::allocator_type,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, nested_alloc>,
net::io_context::executor_type>,
std::allocator<int> // ignored
@ -244,7 +244,7 @@ public:
std::is_same<
nested_alloc::allocator_type,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, nested_alloc>,
net::io_context::executor_type,
std::allocator<int>>, // ignored
@ -257,7 +257,7 @@ public:
std::is_same<
intrusive_alloc::allocator_type,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, intrusive_alloc>,
net::io_context::executor_type>
>>::value);
@ -266,7 +266,7 @@ public:
std::is_same<
intrusive_alloc::allocator_type,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, intrusive_alloc>,
net::io_context::executor_type,
std::allocator<int>> // ignored
@ -276,7 +276,7 @@ public:
std::is_same<
intrusive_alloc::allocator_type,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, intrusive_alloc>,
net::io_context::executor_type>,
std::allocator<int> // ignored
@ -286,7 +286,7 @@ public:
std::is_same<
intrusive_alloc::allocator_type,
net::associated_allocator_t<
async_op_base<
async_base<
handler<no_ex, intrusive_alloc>,
net::io_context::executor_type,
std::allocator<int>>, // ignored
@ -299,7 +299,7 @@ public:
std::is_same<
ex1_type,
net::associated_executor_t<
async_op_base<
async_base<
handler<no_ex, no_alloc>,
ex1_type>
>>::value);
@ -308,7 +308,7 @@ public:
std::is_same<
ex1_type,
net::associated_executor_t<
async_op_base<
async_base<
handler<no_ex, no_alloc>,
ex1_type>,
net::system_executor // ignored
@ -320,7 +320,7 @@ public:
std::is_same<
nested_ex::executor_type,
net::associated_executor_t<
async_op_base<
async_base<
handler<nested_ex, no_alloc>,
ex1_type>
>>::value);
@ -329,7 +329,7 @@ public:
std::is_same<
nested_ex::executor_type,
net::associated_executor_t<
async_op_base<
async_base<
handler<nested_ex, no_alloc>,
ex1_type>,
net::system_executor // ignored
@ -341,7 +341,7 @@ public:
std::is_same<
intrusive_ex::executor_type,
net::associated_executor_t<
async_op_base<
async_base<
handler<intrusive_ex, no_alloc>,
ex1_type>
>>::value);
@ -350,7 +350,7 @@ public:
std::is_same<
intrusive_ex::executor_type,
net::associated_executor_t<
async_op_base<
async_base<
handler<intrusive_ex, no_alloc>,
ex1_type>,
net::system_executor // ignored
@ -374,7 +374,7 @@ public:
{
simple_allocator alloc;
simple_allocator alloc2;
async_op_base<
async_base<
move_only_handler,
simple_executor,
simple_allocator> op(
@ -387,7 +387,7 @@ public:
{
simple_executor ex;
simple_executor ex2;
async_op_base<
async_base<
move_only_handler,
simple_executor> op(
move_only_handler{}, ex);
@ -397,7 +397,7 @@ public:
// move construction
{
async_op_base<
async_base<
move_only_handler,
simple_executor> op(
move_only_handler{}, {});
@ -407,7 +407,7 @@ public:
// observers
{
bool b = false;
async_op_base<
async_base<
legacy_handler,
simple_executor> op(
legacy_handler{b}, {});
@ -421,7 +421,7 @@ public:
// invocation
{
net::io_context ioc;
async_op_base<
async_base<
test::handler,
net::io_context::executor_type> op(
test::any_handler(), ioc.get_executor());
@ -429,7 +429,7 @@ public:
}
{
net::io_context ioc;
async_op_base<
async_base<
test::handler,
net::io_context::executor_type> op(
test::any_handler(), ioc.get_executor());
@ -437,7 +437,7 @@ public:
ioc.run();
}
{
async_op_base<
async_base<
test::handler,
simple_executor> op(
test::any_handler(), {});
@ -448,7 +448,7 @@ public:
legacy_handler::test(
[](legacy_handler h)
{
return async_op_base<
return async_base<
legacy_handler,
simple_executor>(
std::move(h), {});
@ -462,7 +462,7 @@ public:
{
simple_allocator alloc;
simple_allocator alloc2;
stable_async_op_base<
stable_async_base<
move_only_handler,
simple_executor,
simple_allocator> op(
@ -475,7 +475,7 @@ public:
{
simple_executor ex;
simple_executor ex2;
stable_async_op_base<
stable_async_base<
move_only_handler,
simple_executor> op(
move_only_handler{}, ex);
@ -485,7 +485,7 @@ public:
// move construction
{
stable_async_op_base<
stable_async_base<
move_only_handler,
simple_executor> op(
move_only_handler{}, {});
@ -495,7 +495,7 @@ public:
// invocation
{
net::io_context ioc;
stable_async_op_base<
stable_async_base<
test::handler,
net::io_context::executor_type> op(
test::any_handler(), ioc.get_executor());
@ -503,7 +503,7 @@ public:
}
{
net::io_context ioc;
stable_async_op_base<
stable_async_base<
test::handler,
net::io_context::executor_type> op(
test::any_handler(), ioc.get_executor());
@ -511,7 +511,7 @@ public:
ioc.run();
}
{
stable_async_op_base<
stable_async_base<
test::handler,
simple_executor> op(
test::any_handler(), {});
@ -522,7 +522,7 @@ public:
legacy_handler::test(
[](legacy_handler h)
{
return stable_async_op_base<
return stable_async_base<
legacy_handler,
simple_executor>(
std::move(h), {});
@ -542,7 +542,7 @@ public:
destroyed = true;
}
};
stable_async_op_base<
stable_async_base<
move_only_handler,
simple_executor> op(
move_only_handler{}, {});
@ -561,7 +561,7 @@ public:
std::exception{});
}
};
stable_async_op_base<
stable_async_base<
move_only_handler,
simple_executor> op(
move_only_handler{}, {});
@ -585,7 +585,7 @@ public:
async_read(AsyncReadStream& stream, net::mutable_buffer buffer, ReadHandler&& handler)
{
using handler_type = BOOST_ASIO_HANDLER_TYPE(ReadHandler, void(error_code, std::size_t));
using base_type = async_op_base<handler_type, typename AsyncReadStream::executor_type>;
using base_type = async_base<handler_type, typename AsyncReadStream::executor_type>;
struct op : base_type
{
@ -641,7 +641,7 @@ public:
void(error_code)>::return_type
{
using handler_type = typename net::async_completion<WriteHandler, void(error_code)>::completion_handler_type;
using base_type = stable_async_op_base<handler_type, typename AsyncWriteStream::executor_type>;
using base_type = stable_async_base<handler_type, typename AsyncWriteStream::executor_type>;
struct op : base_type
{
@ -728,8 +728,8 @@ public:
}
};
BEAST_EXPECT((&async_op_base_test::async_read<test::stream, handler>));
BEAST_EXPECT((&async_op_base_test::async_write_messages<test::stream, std::string, handler>));
BEAST_EXPECT((&async_base_test::async_read<test::stream, handler>));
BEAST_EXPECT((&async_base_test::async_write_messages<test::stream, std::string, handler>));
}
//--------------------------------------------------------------------------
@ -743,7 +743,7 @@ public:
}
};
BEAST_DEFINE_TESTSUITE(beast,core,async_op_base);
BEAST_DEFINE_TESTSUITE(beast,core,async_base);
} // beast
} // boost

View File

@ -11,7 +11,7 @@
#include <boost/beast/_experimental/unit_test/suite.hpp>
#include <boost/beast/_experimental/test/stream.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/buffers_prefix.hpp>
#include <boost/beast/core/error.hpp>
#include <boost/beast/core/flat_buffer.hpp>

View File

@ -11,7 +11,7 @@
#include <boost/beast/_experimental/unit_test/suite.hpp>
#include <boost/beast/_experimental/test/stream.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/error.hpp>
#include <boost/beast/core/stream_traits.hpp>
#include <boost/beast/websocket.hpp>
@ -86,8 +86,8 @@ class counted_stream
{
using handler_type = typename std::decay<ReadHandler>::type;
// async_op_base handles all of the composed operation boilerplate for us
using base = async_op_base<
// async_base handles all of the composed operation boilerplate for us
using base = async_base<
handler_type, beast::executor_type<NextLayer>>;
// Our composed operation is implemented as a completion handler object
@ -132,8 +132,8 @@ class counted_stream
{
using handler_type = typename std::decay<WriteHandler>::type;
// async_op_base handles all of the composed operation boilerplate for us
using base = async_op_base<
// async_base handles all of the composed operation boilerplate for us
using base = async_base<
handler_type, beast::executor_type<NextLayer>>;
// Our composed operation is implemented as a completion handler object

View File

@ -11,7 +11,7 @@
#include <boost/beast/_experimental/unit_test/suite.hpp>
#include <boost/beast/_experimental/test/stream.hpp>
#include <boost/beast/core/async_op_base.hpp>
#include <boost/beast/core/async_base.hpp>
#include <boost/beast/core/error.hpp>
#include <boost/beast/core/stream_traits.hpp>
#include <boost/beast/websocket.hpp>