mirror of
https://github.com/boostorg/beast.git
synced 2025-07-31 21:34:46 +02:00
Rename to async_base, stable_async_base
This commit is contained in:
12
CHANGELOG.md
12
CHANGELOG.md
@@ -1,3 +1,15 @@
|
|||||||
|
Version 221:
|
||||||
|
|
||||||
|
* Rename to async_base, stable_async_base
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
Version 220:
|
||||||
|
|
||||||
|
* Documentation and release notes
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
Version 219:
|
Version 219:
|
||||||
|
|
||||||
* More split definitions in test::stream
|
* More split definitions in test::stream
|
||||||
|
@@ -44,8 +44,8 @@ composed operations:
|
|||||||
[table Asynchronous Helpers
|
[table Asynchronous Helpers
|
||||||
[[Name][Description]]
|
[[Name][Description]]
|
||||||
[[
|
[[
|
||||||
[link beast.ref.boost__beast__async_op_base `async_op_base`]
|
[link beast.ref.boost__beast__async_base `async_op_base`]
|
||||||
[link beast.ref.boost__beast__stable_async_op_base `stable_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
|
This class is designed to be used as a base class when authoring
|
||||||
composed asynchronous operations expressed as an intermediate
|
composed asynchronous operations expressed as an intermediate
|
||||||
|
@@ -23,7 +23,7 @@
|
|||||||
<entry valign="top">
|
<entry valign="top">
|
||||||
<bridgehead renderas="sect3">Classes <emphasis role="normal">(1 of 2)</emphasis></bridgehead>
|
<bridgehead renderas="sect3">Classes <emphasis role="normal">(1 of 2)</emphasis></bridgehead>
|
||||||
<simplelist type="vert" columns="1">
|
<simplelist type="vert" columns="1">
|
||||||
<member><link linkend="beast.ref.boost__beast__async_op_base">async_op_base</link> <emphasis role="green">★</emphasis></member>
|
<member><link linkend="beast.ref.boost__beast__async_base">async_base</link> <emphasis role="green">★</emphasis></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__basic_stream">basic_stream</link> <emphasis role="green">★</emphasis></member>
|
<member><link linkend="beast.ref.boost__beast__basic_stream">basic_stream</link> <emphasis role="green">★</emphasis></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__file">file</link></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>
|
<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__span">span</link></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__simple_rate_policy">simple_rate_policy</link> <emphasis role="green">★</emphasis></member>
|
<member><link linkend="beast.ref.boost__beast__simple_rate_policy">simple_rate_policy</link> <emphasis role="green">★</emphasis></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__static_string">static_string</link></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> <emphasis role="green">★</emphasis></member>
|
<member><link linkend="beast.ref.boost__beast__stable_async_base">stable_async_base</link> <emphasis role="green">★</emphasis></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__string_param">string_param</link></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__string_view">string_view</link></member>
|
||||||
<member><link linkend="beast.ref.boost__beast__tcp_stream">tcp_stream</link> <emphasis role="green">★</emphasis></member>
|
<member><link linkend="beast.ref.boost__beast__tcp_stream">tcp_stream</link> <emphasis role="green">★</emphasis></member>
|
||||||
|
@@ -11,6 +11,8 @@
|
|||||||
|
|
||||||
[/-----------------------------------------------------------------------------]
|
[/-----------------------------------------------------------------------------]
|
||||||
|
|
||||||
|
[/
|
||||||
|
|
||||||
* [phrase library..[@/libs/beast/ Beast]:]
|
* [phrase library..[@/libs/beast/ Beast]:]
|
||||||
'''<emphasis role="bold"><emphasis role="red">BIG Update!!!</emphasis></emphasis>''' The
|
'''<emphasis role="bold"><emphasis role="red">BIG Update!!!</emphasis></emphasis>''' The
|
||||||
[@/libs/beast/doc/html/beast/quickref.html reference]
|
[@/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],
|
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p1322r0.html P1322R0],
|
||||||
no more `bind_executor` at call sites!
|
no more `bind_executor` at call sites!
|
||||||
* Base classes
|
* 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__async_base.html `async_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__stable_async_base.html `stable_async_base`] and
|
||||||
handle all composed operation boilerplate for you.
|
handle all composed operation boilerplate for you.
|
||||||
* [@/libs/beast/doc/html/beast/ref/boost__beast__ssl_stream.html `ssl_stream`] provides a
|
* [@/libs/beast/doc/html/beast/ref/boost__beast__ssl_stream.html `ssl_stream`] provides a
|
||||||
movable, assignable SSL stream with a flat write optimization.
|
movable, assignable SSL stream with a flat write optimization.
|
||||||
@@ -58,6 +60,8 @@
|
|||||||
[@/libs/beast/doc/html/beast/release_notes.html Release Notes]
|
[@/libs/beast/doc/html/beast/release_notes.html Release Notes]
|
||||||
for a complete list of changes.
|
for a complete list of changes.
|
||||||
|
|
||||||
|
]
|
||||||
|
|
||||||
[/-----------------------------------------------------------------------------]
|
[/-----------------------------------------------------------------------------]
|
||||||
|
|
||||||
[heading Boost 1.70]
|
[heading Boost 1.70]
|
||||||
@@ -144,8 +148,8 @@
|
|||||||
* New trait `buffers_type`
|
* New trait `buffers_type`
|
||||||
|
|
||||||
* New classes
|
* New classes
|
||||||
`async_op_base`,
|
`async_base`,
|
||||||
`stable_async_op_base`
|
`stable_async_base`
|
||||||
* Handle boilerplate for writing composed operations
|
* Handle boilerplate for writing composed operations
|
||||||
* New
|
* New
|
||||||
`allocate_stable`
|
`allocate_stable`
|
||||||
|
@@ -104,7 +104,6 @@ WARN_LOGFILE =
|
|||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
INPUT = \
|
INPUT = \
|
||||||
$(LIB_DIR)/include/boost/beast/ \
|
$(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/http \
|
||||||
$(LIB_DIR)/include/boost/beast/_experimental/test \
|
$(LIB_DIR)/include/boost/beast/_experimental/test \
|
||||||
$(LIB_DIR)/include/boost/beast/core \
|
$(LIB_DIR)/include/boost/beast/core \
|
||||||
|
@@ -143,7 +143,7 @@ async_echo(
|
|||||||
|
|
||||||
using handler_type = BOOST_ASIO_HANDLER_TYPE(CompletionToken, void(beast::error_code));
|
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
|
// handler for us, and provides all of the boilerplate for forwarding
|
||||||
// the associated allocator and associated executor from the caller's
|
// the associated allocator and associated executor from the caller's
|
||||||
// handler to our operation. It also maintains a `net::executor_work_guard`
|
// 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).
|
// performs more than one asynchronous operation in a row).
|
||||||
// We declare this type alias to make the code easier to read.
|
// 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 >*/
|
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 >*/
|
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
|
// 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
|
// take care of boilerplate and we derived from net::coroutine to
|
||||||
// allow the reenter and yield keywords to work.
|
// allow the reenter and yield keywords to work.
|
||||||
|
|
||||||
@@ -174,7 +174,7 @@ async_echo(
|
|||||||
DynamicBuffer& buffer,
|
DynamicBuffer& buffer,
|
||||||
handler_type&& handler)
|
handler_type&& handler)
|
||||||
: base_type(
|
: 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.get_executor()) /*< and also needs to know which executor to use. >*/
|
||||||
, stream_(stream)
|
, stream_(stream)
|
||||||
, buffer_(buffer)
|
, buffer_(buffer)
|
||||||
@@ -304,7 +304,7 @@ async_echo(
|
|||||||
// if cont == false (meaning, that the call stack still includes
|
// if cont == false (meaning, that the call stack still includes
|
||||||
// the frame of the initiating function) then we need to use
|
// the frame of the initiating function) then we need to use
|
||||||
// `net::post` to cause us to be called again after the initiating
|
// `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
|
// calling the final completion handler, using post if the
|
||||||
// first argument is false, otherwise invoking it directly.
|
// first argument is false, otherwise invoking it directly.
|
||||||
|
|
||||||
|
@@ -40,16 +40,11 @@ namespace http {
|
|||||||
|
|
||||||
@par Example
|
@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:
|
you would write:
|
||||||
|
|
||||||
@code
|
@code
|
||||||
http::icy_stream<ip::tcp::socket> is{io_context};
|
http::icy_stream<tcp_stream> is(ioc);
|
||||||
@endcode
|
|
||||||
Alternatively, you can write:
|
|
||||||
@code
|
|
||||||
ip::tcp::socket sock{io_context};
|
|
||||||
http::icy_stream<ip::tcp::socket&> is{sock};
|
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
@tparam NextLayer The type representing the next layer, to which
|
@tparam NextLayer The type representing the next layer, to which
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_CORE_IMPL_ICY_STREAM_HPP
|
#ifndef BOOST_BEAST_CORE_IMPL_ICY_STREAM_HPP
|
||||||
#define 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/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_size.hpp>
|
||||||
#include <boost/beast/core/buffers_adaptor.hpp>
|
#include <boost/beast/core/buffers_adaptor.hpp>
|
||||||
@@ -123,7 +123,7 @@ struct icy_stream<NextLayer>::ops
|
|||||||
|
|
||||||
template<class Buffers, class Handler>
|
template<class Buffers, class Handler>
|
||||||
class read_op
|
class read_op
|
||||||
: public beast::stable_async_op_base<Handler,
|
: public beast::stable_async_base<Handler,
|
||||||
beast::executor_type<icy_stream>>
|
beast::executor_type<icy_stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -159,7 +159,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
icy_stream& s,
|
icy_stream& s,
|
||||||
Buffers const& b)
|
Buffers const& b)
|
||||||
: stable_async_op_base<Handler,
|
: stable_async_base<Handler,
|
||||||
beast::executor_type<icy_stream>>(
|
beast::executor_type<icy_stream>>(
|
||||||
std::forward<Handler_>(h), s.get_executor())
|
std::forward<Handler_>(h), s.get_executor())
|
||||||
, d_(beast::allocate_stable<data>(*this, s, b))
|
, d_(beast::allocate_stable<data>(*this, s, b))
|
||||||
|
@@ -7,13 +7,13 @@
|
|||||||
// Official repository: https://github.com/boostorg/beast
|
// Official repository: https://github.com/boostorg/beast
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef BOOST_BEAST_CORE_ASYNC_OP_BASE_HPP
|
#ifndef BOOST_BEAST_CORE_ASYNC_BASE_HPP
|
||||||
#define BOOST_BEAST_CORE_ASYNC_OP_BASE_HPP
|
#define BOOST_BEAST_CORE_ASYNC_BASE_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.hpp>
|
#include <boost/beast/core/detail/config.hpp>
|
||||||
#include <boost/beast/core/bind_handler.hpp>
|
#include <boost/beast/core/bind_handler.hpp>
|
||||||
#include <boost/beast/core/detail/allocator.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_allocator.hpp>
|
||||||
#include <boost/asio/associated_executor.hpp>
|
#include <boost/asio/associated_executor.hpp>
|
||||||
#include <boost/asio/bind_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
|
The composed operation must be typical; that is, associated with one
|
||||||
executor of an I/O object, and invoking a caller-provided completion
|
executor of an I/O object, and invoking a caller-provided completion
|
||||||
handler when the operation is finished. Classes derived from
|
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.
|
@li Ownership of the final completion handler provided upon construction.
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ namespace beast {
|
|||||||
|
|
||||||
@par Example
|
@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
|
assist authoring an asynchronous initiating function, by providing all of
|
||||||
the boilerplate to manage the final completion handler in a way that
|
the boilerplate to manage the final completion handler in a way that
|
||||||
maintains the allocator and executor associations:
|
maintains the allocator and executor associations:
|
||||||
@@ -82,7 +82,7 @@ namespace beast {
|
|||||||
async_read(AsyncReadStream& stream, net::mutable_buffer buffer, ReadHandler&& handler)
|
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 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
|
struct op : base_type
|
||||||
{
|
{
|
||||||
@@ -132,7 +132,7 @@ namespace beast {
|
|||||||
do not have stable addresses, as the composed operation object is move
|
do not have stable addresses, as the composed operation object is move
|
||||||
constructed upon each call to an initiating function. For most operations
|
constructed upon each call to an initiating function. For most operations
|
||||||
this is not a problem. For complex operations requiring stable temporary
|
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:
|
additional functionality:
|
||||||
|
|
||||||
@li The free function @ref allocate_stable may be used to allocate
|
@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
|
not default constructible, an instance of the type must be provided
|
||||||
upon construction.
|
upon construction.
|
||||||
|
|
||||||
@see @ref stable_async_op_base
|
@see @ref stable_async_base
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
class Handler,
|
class Handler,
|
||||||
class Executor1,
|
class Executor1,
|
||||||
class Allocator = std::allocator<void>
|
class Allocator = std::allocator<void>
|
||||||
>
|
>
|
||||||
class async_op_base
|
class async_base
|
||||||
#if ! BOOST_BEAST_DOXYGEN
|
#if ! BOOST_BEAST_DOXYGEN
|
||||||
: private boost::empty_value<Allocator>
|
: private boost::empty_value<Allocator>
|
||||||
#endif
|
#endif
|
||||||
@@ -212,7 +212,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
#if BOOST_BEAST_DOXYGEN
|
#if BOOST_BEAST_DOXYGEN
|
||||||
template<class Handler_>
|
template<class Handler_>
|
||||||
async_op_base(
|
async_base(
|
||||||
Handler&& handler,
|
Handler&& handler,
|
||||||
Executor1 const& ex1,
|
Executor1 const& ex1,
|
||||||
Allocator const& alloc = Allocator());
|
Allocator const& alloc = Allocator());
|
||||||
@@ -222,10 +222,10 @@ public:
|
|||||||
class = typename std::enable_if<
|
class = typename std::enable_if<
|
||||||
! std::is_same<typename
|
! std::is_same<typename
|
||||||
std::decay<Handler_>::type,
|
std::decay<Handler_>::type,
|
||||||
async_op_base
|
async_base
|
||||||
>::value>::type
|
>::value>::type
|
||||||
>
|
>
|
||||||
async_op_base(
|
async_base(
|
||||||
Handler_&& handler,
|
Handler_&& handler,
|
||||||
Executor1 const& ex1)
|
Executor1 const& ex1)
|
||||||
: h_(std::forward<Handler_>(handler))
|
: h_(std::forward<Handler_>(handler))
|
||||||
@@ -234,7 +234,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
template<class Handler_>
|
template<class Handler_>
|
||||||
async_op_base(
|
async_base(
|
||||||
Handler_&& handler,
|
Handler_&& handler,
|
||||||
Executor1 const& ex1,
|
Executor1 const& ex1,
|
||||||
Allocator const& alloc)
|
Allocator const& alloc)
|
||||||
@@ -247,11 +247,11 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Move Constructor
|
/// Move Constructor
|
||||||
async_op_base(async_op_base&& other) = default;
|
async_base(async_base&& other) = default;
|
||||||
|
|
||||||
/** The type of allocator associated with this object.
|
/** 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
|
handler, then the associated allocator of the derived class will
|
||||||
be this type.
|
be this type.
|
||||||
*/
|
*/
|
||||||
@@ -260,7 +260,7 @@ public:
|
|||||||
|
|
||||||
/** The type of executor associated with this object.
|
/** 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
|
handler, then the associated executor of the derived class will
|
||||||
be this type.
|
be this type.
|
||||||
*/
|
*/
|
||||||
@@ -269,7 +269,7 @@ public:
|
|||||||
|
|
||||||
/** Returns the allocator associated with this object.
|
/** 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
|
handler, then the object returned from this function will be used
|
||||||
as the associated allocator of the derived class.
|
as the associated allocator of the derived class.
|
||||||
*/
|
*/
|
||||||
@@ -282,7 +282,7 @@ public:
|
|||||||
|
|
||||||
/** Returns the executor associated with this object.
|
/** 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
|
handler, then the object returned from this function will be used
|
||||||
as the associated executor of the derived class.
|
as the associated executor of the derived class.
|
||||||
*/
|
*/
|
||||||
@@ -319,7 +319,7 @@ public:
|
|||||||
arguments forwarded. It is undefined to call either of
|
arguments forwarded. It is undefined to call either of
|
||||||
@ref invoke or @ref invoke_now more than once.
|
@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
|
be automatically destroyed before the final completion handler
|
||||||
is invoked.
|
is invoked.
|
||||||
|
|
||||||
@@ -359,7 +359,7 @@ public:
|
|||||||
arguments forwarded. It is undefined to call either of
|
arguments forwarded. It is undefined to call either of
|
||||||
@ref invoke or @ref invoke_now more than once.
|
@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
|
be automatically destroyed before the final completion handler
|
||||||
is invoked.
|
is invoked.
|
||||||
|
|
||||||
@@ -385,12 +385,12 @@ public:
|
|||||||
friend
|
friend
|
||||||
void asio_handler_invoke(
|
void asio_handler_invoke(
|
||||||
Function&& f,
|
Function&& f,
|
||||||
async_op_base<
|
async_base<
|
||||||
Handler_, Executor1_, Allocator_>* p);
|
Handler_, Executor1_, Allocator_>* p);
|
||||||
|
|
||||||
friend
|
friend
|
||||||
void* asio_handler_allocate(
|
void* asio_handler_allocate(
|
||||||
std::size_t size, async_op_base* p)
|
std::size_t size, async_base* p)
|
||||||
{
|
{
|
||||||
using net::asio_handler_allocate;
|
using net::asio_handler_allocate;
|
||||||
return asio_handler_allocate(
|
return asio_handler_allocate(
|
||||||
@@ -400,7 +400,7 @@ public:
|
|||||||
friend
|
friend
|
||||||
void asio_handler_deallocate(
|
void asio_handler_deallocate(
|
||||||
void* mem, std::size_t size,
|
void* mem, std::size_t size,
|
||||||
async_op_base* p)
|
async_base* p)
|
||||||
{
|
{
|
||||||
using net::asio_handler_deallocate;
|
using net::asio_handler_deallocate;
|
||||||
asio_handler_deallocate(mem, size,
|
asio_handler_deallocate(mem, size,
|
||||||
@@ -409,7 +409,7 @@ public:
|
|||||||
|
|
||||||
friend
|
friend
|
||||||
bool asio_handler_is_continuation(
|
bool asio_handler_is_continuation(
|
||||||
async_op_base* p)
|
async_base* p)
|
||||||
{
|
{
|
||||||
using net::asio_handler_is_continuation;
|
using net::asio_handler_is_continuation;
|
||||||
return 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
|
The composed operation must be typical; that is, associated with one
|
||||||
executor of an I/O object, and invoking a caller-provided completion
|
executor of an I/O object, and invoking a caller-provided completion
|
||||||
handler when the operation is finished. Classes derived from
|
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.
|
@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
|
do not have stable addresses, as the composed operation object is move
|
||||||
constructed upon each call to an initiating function. For most operations
|
constructed upon each call to an initiating function. For most operations
|
||||||
this is not a problem. For complex operations requiring stable temporary
|
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:
|
additional functionality:
|
||||||
|
|
||||||
@li The free function @ref allocate_stable may be used to allocate
|
@li The free function @ref allocate_stable may be used to allocate
|
||||||
@@ -478,7 +478,7 @@ public:
|
|||||||
|
|
||||||
@par Example
|
@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
|
assist authoring an asynchronous initiating function, by providing all of
|
||||||
the boilerplate to manage the final completion handler in a way that maintains
|
the boilerplate to manage the final completion handler in a way that maintains
|
||||||
the allocator and executor associations. Furthermore, the operation shown
|
the allocator and executor associations. Furthermore, the operation shown
|
||||||
@@ -499,7 +499,7 @@ public:
|
|||||||
void(error_code)>::return_type
|
void(error_code)>::return_type
|
||||||
{
|
{
|
||||||
using handler_type = typename net::async_completion<WriteHandler, void(error_code)>::completion_handler_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
|
struct op : base_type
|
||||||
{
|
{
|
||||||
@@ -592,15 +592,15 @@ public:
|
|||||||
not default constructible, an instance of the type must be provided
|
not default constructible, an instance of the type must be provided
|
||||||
upon construction.
|
upon construction.
|
||||||
|
|
||||||
@see @ref allocate_stable, @ref async_op_base
|
@see @ref allocate_stable, @ref async_base
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
class Handler,
|
class Handler,
|
||||||
class Executor1,
|
class Executor1,
|
||||||
class Allocator = std::allocator<void>
|
class Allocator = std::allocator<void>
|
||||||
>
|
>
|
||||||
class stable_async_op_base
|
class stable_async_base
|
||||||
: public async_op_base<
|
: public async_base<
|
||||||
Handler, Executor1, Allocator>
|
Handler, Executor1, Allocator>
|
||||||
{
|
{
|
||||||
detail::stable_base* list_ = nullptr;
|
detail::stable_base* list_ = nullptr;
|
||||||
@@ -629,7 +629,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
#if BOOST_BEAST_DOXYGEN
|
#if BOOST_BEAST_DOXYGEN
|
||||||
template<class Handler>
|
template<class Handler>
|
||||||
stable_async_op_base(
|
stable_async_base(
|
||||||
Handler&& handler,
|
Handler&& handler,
|
||||||
Executor1 const& ex1,
|
Executor1 const& ex1,
|
||||||
Allocator const& alloc = Allocator());
|
Allocator const& alloc = Allocator());
|
||||||
@@ -639,24 +639,24 @@ public:
|
|||||||
class = typename std::enable_if<
|
class = typename std::enable_if<
|
||||||
! std::is_same<typename
|
! std::is_same<typename
|
||||||
std::decay<Handler_>::type,
|
std::decay<Handler_>::type,
|
||||||
stable_async_op_base
|
stable_async_base
|
||||||
>::value>::type
|
>::value>::type
|
||||||
>
|
>
|
||||||
stable_async_op_base(
|
stable_async_base(
|
||||||
Handler_&& handler,
|
Handler_&& handler,
|
||||||
Executor1 const& ex1)
|
Executor1 const& ex1)
|
||||||
: async_op_base<
|
: async_base<
|
||||||
Handler, Executor1, Allocator>(
|
Handler, Executor1, Allocator>(
|
||||||
std::forward<Handler_>(handler), ex1)
|
std::forward<Handler_>(handler), ex1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
template<class Handler_>
|
template<class Handler_>
|
||||||
stable_async_op_base(
|
stable_async_base(
|
||||||
Handler_&& handler,
|
Handler_&& handler,
|
||||||
Executor1 const& ex1,
|
Executor1 const& ex1,
|
||||||
Allocator const& alloc)
|
Allocator const& alloc)
|
||||||
: async_op_base<
|
: async_base<
|
||||||
Handler, Executor1, Allocator>(
|
Handler, Executor1, Allocator>(
|
||||||
std::forward<Handler_>(handler), ex1, alloc)
|
std::forward<Handler_>(handler), ex1, alloc)
|
||||||
{
|
{
|
||||||
@@ -664,8 +664,8 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/// Move Constructor
|
/// Move Constructor
|
||||||
stable_async_op_base(stable_async_op_base&& other)
|
stable_async_base(stable_async_base&& other)
|
||||||
: async_op_base<Handler, Executor1, Allocator>(
|
: async_base<Handler, Executor1, Allocator>(
|
||||||
std::move(other))
|
std::move(other))
|
||||||
, list_(boost::exchange(other.list_, nullptr))
|
, list_(boost::exchange(other.list_, nullptr))
|
||||||
{
|
{
|
||||||
@@ -677,7 +677,7 @@ public:
|
|||||||
state objects allocated with @ref allocate_stable will
|
state objects allocated with @ref allocate_stable will
|
||||||
be destroyed here.
|
be destroyed here.
|
||||||
*/
|
*/
|
||||||
~stable_async_op_base()
|
~stable_async_base()
|
||||||
{
|
{
|
||||||
detail::stable_base::destroy_list(list_);
|
detail::stable_base::destroy_list(list_);
|
||||||
}
|
}
|
||||||
@@ -696,7 +696,7 @@ public:
|
|||||||
friend
|
friend
|
||||||
State&
|
State&
|
||||||
allocate_stable(
|
allocate_stable(
|
||||||
stable_async_op_base<
|
stable_async_base<
|
||||||
Handler_, Executor1_, Allocator_>& base,
|
Handler_, Executor1_, Allocator_>& base,
|
||||||
Args&&... args);
|
Args&&... args);
|
||||||
};
|
};
|
||||||
@@ -709,7 +709,7 @@ template<
|
|||||||
class Function>
|
class Function>
|
||||||
void asio_handler_invoke(
|
void asio_handler_invoke(
|
||||||
Function&& f,
|
Function&& f,
|
||||||
async_op_base<
|
async_base<
|
||||||
Handler, Executor1, Allocator>* p)
|
Handler, Executor1, Allocator>* p)
|
||||||
{
|
{
|
||||||
using net::asio_handler_invoke;
|
using net::asio_handler_invoke;
|
||||||
@@ -757,7 +757,7 @@ struct allocate_stable_state final
|
|||||||
The object will be destroyed just before the completion
|
The object will be destroyed just before the completion
|
||||||
handler is invoked, or when the base is destroyed.
|
handler is invoked, or when the base is destroyed.
|
||||||
|
|
||||||
@see @ref stable_async_op_base
|
@see @ref stable_async_base
|
||||||
*/
|
*/
|
||||||
template<
|
template<
|
||||||
class State,
|
class State,
|
||||||
@@ -767,11 +767,11 @@ template<
|
|||||||
class... Args>
|
class... Args>
|
||||||
State&
|
State&
|
||||||
allocate_stable(
|
allocate_stable(
|
||||||
stable_async_op_base<
|
stable_async_base<
|
||||||
Handler, Executor1, Allocator>& base,
|
Handler, Executor1, Allocator>& base,
|
||||||
Args&&... args)
|
Args&&... args)
|
||||||
{
|
{
|
||||||
using allocator_type = typename stable_async_op_base<
|
using allocator_type = typename stable_async_base<
|
||||||
Handler, Executor1, Allocator>::allocator_type;
|
Handler, Executor1, Allocator>::allocator_type;
|
||||||
|
|
||||||
using A = typename detail::allocator_traits<
|
using A = typename detail::allocator_traits<
|
@@ -7,8 +7,8 @@
|
|||||||
// Official repository: https://github.com/boostorg/beast
|
// Official repository: https://github.com/boostorg/beast
|
||||||
//
|
//
|
||||||
|
|
||||||
#ifndef BOOST_BEAST_CORE_DETAIL_ASYNC_OP_BASE_HPP
|
#ifndef BOOST_BEAST_CORE_DETAIL_ASYNC_BASE_HPP
|
||||||
#define BOOST_BEAST_CORE_DETAIL_ASYNC_OP_BASE_HPP
|
#define BOOST_BEAST_CORE_DETAIL_ASYNC_BASE_HPP
|
||||||
|
|
||||||
#include <boost/core/exchange.hpp>
|
#include <boost/core/exchange.hpp>
|
||||||
|
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_DETAIL_IMPL_READ_HPP
|
#define BOOST_BEAST_DETAIL_IMPL_READ_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/bind_handler.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/beast/core/flat_static_buffer.hpp>
|
||||||
#include <boost/asio/basic_stream_socket.hpp>
|
#include <boost/asio/basic_stream_socket.hpp>
|
||||||
#include <boost/asio/coroutine.hpp>
|
#include <boost/asio/coroutine.hpp>
|
||||||
@@ -38,7 +38,7 @@ template<
|
|||||||
class Handler>
|
class Handler>
|
||||||
class read_op
|
class read_op
|
||||||
: public net::coroutine
|
: public net::coroutine
|
||||||
, public async_op_base<
|
, public async_base<
|
||||||
Handler, beast::executor_type<Stream>>
|
Handler, beast::executor_type<Stream>>
|
||||||
{
|
{
|
||||||
Stream& s_;
|
Stream& s_;
|
||||||
@@ -56,7 +56,7 @@ public:
|
|||||||
Stream& s,
|
Stream& s,
|
||||||
DynamicBuffer& b,
|
DynamicBuffer& b,
|
||||||
Condition_&& cond)
|
Condition_&& cond)
|
||||||
: async_op_base<Handler,
|
: async_base<Handler,
|
||||||
beast::executor_type<Stream>>(
|
beast::executor_type<Stream>>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
s.get_executor())
|
s.get_executor())
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_CORE_DETECT_SSL_HPP
|
#define BOOST_BEAST_CORE_DETECT_SSL_HPP
|
||||||
|
|
||||||
#include <boost/beast/core/detail/config.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/error.hpp>
|
||||||
#include <boost/beast/core/read_size.hpp>
|
#include <boost/beast/core/read_size.hpp>
|
||||||
#include <boost/beast/core/stream_traits.hpp>
|
#include <boost/beast/core/stream_traits.hpp>
|
||||||
@@ -447,7 +447,7 @@ namespace detail {
|
|||||||
// which are based on macros forming a switch statement. The
|
// which are based on macros forming a switch statement. The
|
||||||
// operation is derived from `coroutine` for this reason.
|
// 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:
|
// boilerplate for writing composed operations, including:
|
||||||
//
|
//
|
||||||
// * Storing the user's completion handler
|
// * Storing the user's completion handler
|
||||||
@@ -457,7 +457,7 @@ namespace detail {
|
|||||||
// * Deallocating temporary storage before invoking the handler
|
// * Deallocating temporary storage before invoking the handler
|
||||||
// * Posting the handler to the executor on an immediate completion
|
// * 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
|
// as the executor of the I/O object being used. The metafunction
|
||||||
// `executor_type` returns the type of executor used by an
|
// `executor_type` returns the type of executor used by an
|
||||||
// I/O object.
|
// I/O object.
|
||||||
@@ -468,7 +468,7 @@ template<
|
|||||||
class DynamicBuffer>
|
class DynamicBuffer>
|
||||||
class detect_ssl_op
|
class detect_ssl_op
|
||||||
: public boost::asio::coroutine
|
: public boost::asio::coroutine
|
||||||
, public async_op_base<
|
, public async_base<
|
||||||
DetectHandler, executor_type<AsyncReadStream>>
|
DetectHandler, executor_type<AsyncReadStream>>
|
||||||
{
|
{
|
||||||
// This composed operation has trivial state,
|
// This composed operation has trivial state,
|
||||||
@@ -495,7 +495,7 @@ public:
|
|||||||
DetectHandler_&& handler,
|
DetectHandler_&& handler,
|
||||||
AsyncReadStream& stream,
|
AsyncReadStream& stream,
|
||||||
DynamicBuffer& buffer)
|
DynamicBuffer& buffer)
|
||||||
: beast::async_op_base<
|
: beast::async_base<
|
||||||
DetectHandler_,
|
DetectHandler_,
|
||||||
beast::executor_type<AsyncReadStream>>(
|
beast::executor_type<AsyncReadStream>>(
|
||||||
std::forward<DetectHandler_>(handler),
|
std::forward<DetectHandler_>(handler),
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_CORE_IMPL_BASIC_STREAM_HPP
|
#ifndef BOOST_BEAST_CORE_IMPL_BASIC_STREAM_HPP
|
||||||
#define 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/buffer_size.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/detail/type_traits.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>
|
template<bool isRead, class Buffers, class Handler>
|
||||||
class transfer_op
|
class transfer_op
|
||||||
: public async_op_base<Handler, Executor>
|
: public async_base<Handler, Executor>
|
||||||
, public boost::asio::coroutine
|
, public boost::asio::coroutine
|
||||||
{
|
{
|
||||||
boost::shared_ptr<impl_type> impl_;
|
boost::shared_ptr<impl_type> impl_;
|
||||||
@@ -294,7 +294,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
basic_stream& s,
|
basic_stream& s,
|
||||||
Buffers const& b)
|
Buffers const& b)
|
||||||
: async_op_base<Handler, Executor>(
|
: async_base<Handler, Executor>(
|
||||||
std::forward<Handler_>(h), s.get_executor())
|
std::forward<Handler_>(h), s.get_executor())
|
||||||
, impl_(s.impl_)
|
, impl_(s.impl_)
|
||||||
, pg_(state().pending)
|
, pg_(state().pending)
|
||||||
@@ -404,7 +404,7 @@ public:
|
|||||||
|
|
||||||
template<class Handler>
|
template<class Handler>
|
||||||
class connect_op
|
class connect_op
|
||||||
: public async_op_base<Handler, Executor>
|
: public async_base<Handler, Executor>
|
||||||
{
|
{
|
||||||
boost::shared_ptr<impl_type> impl_;
|
boost::shared_ptr<impl_type> impl_;
|
||||||
pending_guard pg0_;
|
pending_guard pg0_;
|
||||||
@@ -422,7 +422,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
basic_stream& s,
|
basic_stream& s,
|
||||||
endpoint_type ep)
|
endpoint_type ep)
|
||||||
: async_op_base<Handler, Executor>(
|
: async_base<Handler, Executor>(
|
||||||
std::forward<Handler_>(h), s.get_executor())
|
std::forward<Handler_>(h), s.get_executor())
|
||||||
, impl_(s.impl_)
|
, impl_(s.impl_)
|
||||||
, pg0_(impl_->read.pending)
|
, pg0_(impl_->read.pending)
|
||||||
@@ -450,7 +450,7 @@ public:
|
|||||||
basic_stream& s,
|
basic_stream& s,
|
||||||
Endpoints const& eps,
|
Endpoints const& eps,
|
||||||
Condition const& cond)
|
Condition const& cond)
|
||||||
: async_op_base<Handler, Executor>(
|
: async_base<Handler, Executor>(
|
||||||
std::forward<Handler_>(h), s.get_executor())
|
std::forward<Handler_>(h), s.get_executor())
|
||||||
, impl_(s.impl_)
|
, impl_(s.impl_)
|
||||||
, pg0_(impl_->read.pending)
|
, pg0_(impl_->read.pending)
|
||||||
@@ -478,7 +478,7 @@ public:
|
|||||||
basic_stream& s,
|
basic_stream& s,
|
||||||
Iterator begin, Iterator end,
|
Iterator begin, Iterator end,
|
||||||
Condition const& cond)
|
Condition const& cond)
|
||||||
: async_op_base<Handler, Executor>(
|
: async_base<Handler, Executor>(
|
||||||
std::forward<Handler_>(h), s.get_executor())
|
std::forward<Handler_>(h), s.get_executor())
|
||||||
, impl_(s.impl_)
|
, impl_(s.impl_)
|
||||||
, pg0_(impl_->read.pending)
|
, pg0_(impl_->read.pending)
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_IMPL_BUFFERED_READ_STREAM_HPP
|
#ifndef BOOST_BEAST_IMPL_BUFFERED_READ_STREAM_HPP
|
||||||
#define 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/bind_handler.hpp>
|
||||||
#include <boost/beast/core/error.hpp>
|
#include <boost/beast/core/error.hpp>
|
||||||
#include <boost/beast/core/read_size.hpp>
|
#include <boost/beast/core/read_size.hpp>
|
||||||
@@ -29,7 +29,7 @@ struct buffered_read_stream<Stream, DynamicBuffer>::ops
|
|||||||
|
|
||||||
template<class MutableBufferSequence, class Handler>
|
template<class MutableBufferSequence, class Handler>
|
||||||
class read_op
|
class read_op
|
||||||
: public async_op_base<Handler,
|
: public async_base<Handler,
|
||||||
beast::executor_type<buffered_read_stream>>
|
beast::executor_type<buffered_read_stream>>
|
||||||
{
|
{
|
||||||
buffered_read_stream& s_;
|
buffered_read_stream& s_;
|
||||||
@@ -45,7 +45,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
buffered_read_stream& s,
|
buffered_read_stream& s,
|
||||||
MutableBufferSequence const& b)
|
MutableBufferSequence const& b)
|
||||||
: async_op_base<
|
: async_base<
|
||||||
Handler, beast::executor_type<buffered_read_stream>>(
|
Handler, beast::executor_type<buffered_read_stream>>(
|
||||||
std::forward<Handler_>(h), s.get_executor())
|
std::forward<Handler_>(h), s.get_executor())
|
||||||
, s_(s)
|
, s_(s)
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_CORE_IMPL_FLAT_STREAM_HPP
|
#ifndef BOOST_BEAST_CORE_IMPL_FLAT_STREAM_HPP
|
||||||
#define 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/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/static_buffer.hpp>
|
#include <boost/beast/core/static_buffer.hpp>
|
||||||
#include <boost/beast/core/stream_traits.hpp>
|
#include <boost/beast/core/stream_traits.hpp>
|
||||||
@@ -28,7 +28,7 @@ struct flat_stream<NextLayer>::ops
|
|||||||
|
|
||||||
template<class Handler>
|
template<class Handler>
|
||||||
class write_op
|
class write_op
|
||||||
: public async_op_base<Handler,
|
: public async_base<Handler,
|
||||||
beast::executor_type<flat_stream>>
|
beast::executor_type<flat_stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -40,7 +40,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
flat_stream<NextLayer>& s,
|
flat_stream<NextLayer>& s,
|
||||||
ConstBufferSequence const& b)
|
ConstBufferSequence const& b)
|
||||||
: async_op_base<Handler,
|
: async_base<Handler,
|
||||||
beast::executor_type<flat_stream>>(
|
beast::executor_type<flat_stream>>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
s.get_executor())
|
s.get_executor())
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#if BOOST_BEAST_USE_WIN32_FILE
|
#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/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffers_range.hpp>
|
#include <boost/beast/core/buffers_range.hpp>
|
||||||
#include <boost/beast/core/detail/clamp.hpp>
|
#include <boost/beast/core/detail/clamp.hpp>
|
||||||
@@ -331,7 +331,7 @@ template<
|
|||||||
bool isRequest, class Fields,
|
bool isRequest, class Fields,
|
||||||
class Handler>
|
class Handler>
|
||||||
class write_some_win32_op
|
class write_some_win32_op
|
||||||
: public beast::async_op_base<Handler, Executor>
|
: public beast::async_base<Handler, Executor>
|
||||||
{
|
{
|
||||||
net::basic_stream_socket<
|
net::basic_stream_socket<
|
||||||
Protocol, Executor>& sock_;
|
Protocol, Executor>& sock_;
|
||||||
@@ -348,7 +348,7 @@ public:
|
|||||||
Protocol, Executor>& s,
|
Protocol, Executor>& s,
|
||||||
serializer<isRequest,
|
serializer<isRequest,
|
||||||
basic_file_body<file_win32>,Fields>& sr)
|
basic_file_body<file_win32>,Fields>& sr)
|
||||||
: async_op_base<
|
: async_base<
|
||||||
Handler, Executor>(
|
Handler, Executor>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
s.get_executor())
|
s.get_executor())
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#include <boost/beast/http/error.hpp>
|
#include <boost/beast/http/error.hpp>
|
||||||
#include <boost/beast/http/parser.hpp>
|
#include <boost/beast/http/parser.hpp>
|
||||||
#include <boost/beast/http/read.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/stream_traits.hpp>
|
||||||
#include <boost/beast/core/detail/read.hpp>
|
#include <boost/beast/core/detail/read.hpp>
|
||||||
#include <boost/asio/error.hpp>
|
#include <boost/asio/error.hpp>
|
||||||
@@ -158,7 +158,7 @@ template<
|
|||||||
bool isRequest, class Body, class Allocator,
|
bool isRequest, class Body, class Allocator,
|
||||||
class Handler>
|
class Handler>
|
||||||
class read_msg_op
|
class read_msg_op
|
||||||
: public beast::stable_async_op_base<
|
: public beast::stable_async_base<
|
||||||
Handler, beast::executor_type<Stream>>
|
Handler, beast::executor_type<Stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -193,7 +193,7 @@ public:
|
|||||||
Stream& s,
|
Stream& s,
|
||||||
DynamicBuffer& b,
|
DynamicBuffer& b,
|
||||||
message_type& m)
|
message_type& m)
|
||||||
: stable_async_op_base<
|
: stable_async_base<
|
||||||
Handler, beast::executor_type<Stream>>(
|
Handler, beast::executor_type<Stream>>(
|
||||||
std::forward<Handler_>(h), s.get_executor())
|
std::forward<Handler_>(h), s.get_executor())
|
||||||
, d_(beast::allocate_stable<data>(
|
, d_(beast::allocate_stable<data>(
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_HTTP_IMPL_WRITE_HPP
|
#define BOOST_BEAST_HTTP_IMPL_WRITE_HPP
|
||||||
|
|
||||||
#include <boost/beast/http/type_traits.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/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffers_range.hpp>
|
#include <boost/beast/core/buffers_range.hpp>
|
||||||
#include <boost/beast/core/ostream.hpp>
|
#include <boost/beast/core/ostream.hpp>
|
||||||
@@ -34,7 +34,7 @@ template<
|
|||||||
class Stream,
|
class Stream,
|
||||||
bool isRequest, class Body, class Fields>
|
bool isRequest, class Body, class Fields>
|
||||||
class write_some_op
|
class write_some_op
|
||||||
: public beast::async_op_base<
|
: public beast::async_base<
|
||||||
Handler, beast::executor_type<Stream>>
|
Handler, beast::executor_type<Stream>>
|
||||||
{
|
{
|
||||||
Stream& s_;
|
Stream& s_;
|
||||||
@@ -72,7 +72,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
Stream& s,
|
Stream& s,
|
||||||
serializer<isRequest, Body, Fields>& sr)
|
serializer<isRequest, Body, Fields>& sr)
|
||||||
: async_op_base<
|
: async_base<
|
||||||
Handler, beast::executor_type<Stream>>(
|
Handler, beast::executor_type<Stream>>(
|
||||||
std::forward<Handler_>(h), s.get_executor())
|
std::forward<Handler_>(h), s.get_executor())
|
||||||
, s_(s)
|
, s_(s)
|
||||||
@@ -157,7 +157,7 @@ template<
|
|||||||
class Predicate,
|
class Predicate,
|
||||||
bool isRequest, class Body, class Fields>
|
bool isRequest, class Body, class Fields>
|
||||||
class write_op
|
class write_op
|
||||||
: public beast::async_op_base<
|
: public beast::async_base<
|
||||||
Handler, beast::executor_type<Stream>>
|
Handler, beast::executor_type<Stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -171,7 +171,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
Stream& s,
|
Stream& s,
|
||||||
serializer<isRequest, Body, Fields>& sr)
|
serializer<isRequest, Body, Fields>& sr)
|
||||||
: async_op_base<
|
: async_base<
|
||||||
Handler, beast::executor_type<Stream>>(
|
Handler, beast::executor_type<Stream>>(
|
||||||
std::forward<Handler_>(h), s.get_executor())
|
std::forward<Handler_>(h), s.get_executor())
|
||||||
, s_(s)
|
, s_(s)
|
||||||
@@ -219,7 +219,7 @@ template<
|
|||||||
class Stream,
|
class Stream,
|
||||||
bool isRequest, class Body, class Fields>
|
bool isRequest, class Body, class Fields>
|
||||||
class write_msg_op
|
class write_msg_op
|
||||||
: public beast::stable_async_op_base<
|
: public beast::stable_async_base<
|
||||||
Handler, beast::executor_type<Stream>>
|
Handler, beast::executor_type<Stream>>
|
||||||
{
|
{
|
||||||
Stream& s_;
|
Stream& s_;
|
||||||
@@ -233,7 +233,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
Stream& s,
|
Stream& s,
|
||||||
Args&&... args)
|
Args&&... args)
|
||||||
: stable_async_op_base<
|
: stable_async_base<
|
||||||
Handler, beast::executor_type<Stream>>(
|
Handler, beast::executor_type<Stream>>(
|
||||||
std::forward<Handler_>(h), s.get_executor())
|
std::forward<Handler_>(h), s.get_executor())
|
||||||
, s_(s)
|
, s_(s)
|
||||||
|
@@ -17,7 +17,7 @@
|
|||||||
#include <boost/beast/http/read.hpp>
|
#include <boost/beast/http/read.hpp>
|
||||||
#include <boost/beast/http/string_body.hpp>
|
#include <boost/beast/http/string_body.hpp>
|
||||||
#include <boost/beast/http/write.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/buffer_size.hpp>
|
||||||
#include <boost/beast/core/stream_traits.hpp>
|
#include <boost/beast/core/stream_traits.hpp>
|
||||||
#include <boost/beast/core/detail/buffer.hpp>
|
#include <boost/beast/core/detail/buffer.hpp>
|
||||||
@@ -170,7 +170,7 @@ build_response(
|
|||||||
template<class NextLayer, bool deflateSupported>
|
template<class NextLayer, bool deflateSupported>
|
||||||
template<class Handler>
|
template<class Handler>
|
||||||
class stream<NextLayer, deflateSupported>::response_op
|
class stream<NextLayer, deflateSupported>::response_op
|
||||||
: public beast::stable_async_op_base<
|
: public beast::stable_async_base<
|
||||||
Handler, beast::executor_type<stream>>
|
Handler, beast::executor_type<stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -190,7 +190,7 @@ public:
|
|||||||
http::basic_fields<Allocator>> const& req,
|
http::basic_fields<Allocator>> const& req,
|
||||||
Decorator const& decorator,
|
Decorator const& decorator,
|
||||||
bool cont = false)
|
bool cont = false)
|
||||||
: stable_async_op_base<Handler,
|
: stable_async_base<Handler,
|
||||||
beast::executor_type<stream>>(
|
beast::executor_type<stream>>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
sp->stream.get_executor())
|
sp->stream.get_executor())
|
||||||
@@ -243,7 +243,7 @@ public:
|
|||||||
template<class NextLayer, bool deflateSupported>
|
template<class NextLayer, bool deflateSupported>
|
||||||
template<class Handler, class Decorator>
|
template<class Handler, class Decorator>
|
||||||
class stream<NextLayer, deflateSupported>::accept_op
|
class stream<NextLayer, deflateSupported>::accept_op
|
||||||
: public beast::stable_async_op_base<
|
: public beast::stable_async_base<
|
||||||
Handler, beast::executor_type<stream>>
|
Handler, beast::executor_type<stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -258,7 +258,7 @@ public:
|
|||||||
boost::shared_ptr<impl_type> const& sp,
|
boost::shared_ptr<impl_type> const& sp,
|
||||||
Decorator const& decorator,
|
Decorator const& decorator,
|
||||||
Buffers const& buffers)
|
Buffers const& buffers)
|
||||||
: stable_async_op_base<Handler,
|
: stable_async_base<Handler,
|
||||||
beast::executor_type<stream>>(
|
beast::executor_type<stream>>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
sp->stream.get_executor())
|
sp->stream.get_executor())
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include <boost/beast/websocket/teardown.hpp>
|
#include <boost/beast/websocket/teardown.hpp>
|
||||||
#include <boost/beast/websocket/detail/mask.hpp>
|
#include <boost/beast/websocket/detail/mask.hpp>
|
||||||
#include <boost/beast/websocket/impl/stream_impl.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/flat_static_buffer.hpp>
|
||||||
#include <boost/beast/core/stream_traits.hpp>
|
#include <boost/beast/core/stream_traits.hpp>
|
||||||
#include <boost/beast/core/detail/bind_continuation.hpp>
|
#include <boost/beast/core/detail/bind_continuation.hpp>
|
||||||
@@ -36,7 +36,7 @@ namespace websocket {
|
|||||||
template<class NextLayer, bool deflateSupported>
|
template<class NextLayer, bool deflateSupported>
|
||||||
template<class Handler>
|
template<class Handler>
|
||||||
class stream<NextLayer, deflateSupported>::close_op
|
class stream<NextLayer, deflateSupported>::close_op
|
||||||
: public beast::stable_async_op_base<
|
: public beast::stable_async_base<
|
||||||
Handler, beast::executor_type<stream>>
|
Handler, beast::executor_type<stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -52,7 +52,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
boost::shared_ptr<impl_type> const& sp,
|
boost::shared_ptr<impl_type> const& sp,
|
||||||
close_reason const& cr)
|
close_reason const& cr)
|
||||||
: stable_async_op_base<Handler,
|
: stable_async_base<Handler,
|
||||||
beast::executor_type<stream>>(
|
beast::executor_type<stream>>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
sp->stream.get_executor())
|
sp->stream.get_executor())
|
||||||
|
@@ -16,7 +16,7 @@
|
|||||||
#include <boost/beast/http/message.hpp>
|
#include <boost/beast/http/message.hpp>
|
||||||
#include <boost/beast/http/read.hpp>
|
#include <boost/beast/http/read.hpp>
|
||||||
#include <boost/beast/http/write.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/flat_buffer.hpp>
|
||||||
#include <boost/beast/core/stream_traits.hpp>
|
#include <boost/beast/core/stream_traits.hpp>
|
||||||
#include <boost/asio/coroutine.hpp>
|
#include <boost/asio/coroutine.hpp>
|
||||||
@@ -35,7 +35,7 @@ namespace websocket {
|
|||||||
template<class NextLayer, bool deflateSupported>
|
template<class NextLayer, bool deflateSupported>
|
||||||
template<class Handler>
|
template<class Handler>
|
||||||
class stream<NextLayer, deflateSupported>::handshake_op
|
class stream<NextLayer, deflateSupported>::handshake_op
|
||||||
: public beast::stable_async_op_base<Handler,
|
: public beast::stable_async_base<Handler,
|
||||||
beast::executor_type<stream>>
|
beast::executor_type<stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -65,7 +65,7 @@ public:
|
|||||||
response_type* res_p,
|
response_type* res_p,
|
||||||
string_view host, string_view target,
|
string_view host, string_view target,
|
||||||
Decorator const& decorator)
|
Decorator const& decorator)
|
||||||
: stable_async_op_base<Handler,
|
: stable_async_base<Handler,
|
||||||
beast::executor_type<stream>>(
|
beast::executor_type<stream>>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
sp->stream.get_executor())
|
sp->stream.get_executor())
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_PING_HPP
|
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_PING_HPP
|
||||||
#define 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/bind_handler.hpp>
|
||||||
#include <boost/beast/core/stream_traits.hpp>
|
#include <boost/beast/core/stream_traits.hpp>
|
||||||
#include <boost/beast/core/detail/bind_continuation.hpp>
|
#include <boost/beast/core/detail/bind_continuation.hpp>
|
||||||
@@ -33,7 +33,7 @@ namespace websocket {
|
|||||||
template<class NextLayer, bool deflateSupported>
|
template<class NextLayer, bool deflateSupported>
|
||||||
template<class Handler>
|
template<class Handler>
|
||||||
class stream<NextLayer, deflateSupported>::ping_op
|
class stream<NextLayer, deflateSupported>::ping_op
|
||||||
: public beast::stable_async_op_base<
|
: public beast::stable_async_base<
|
||||||
Handler, beast::executor_type<stream>>
|
Handler, beast::executor_type<stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -49,7 +49,7 @@ public:
|
|||||||
boost::shared_ptr<impl_type> const& sp,
|
boost::shared_ptr<impl_type> const& sp,
|
||||||
detail::opcode op,
|
detail::opcode op,
|
||||||
ping_data const& payload)
|
ping_data const& payload)
|
||||||
: stable_async_op_base<Handler,
|
: stable_async_base<Handler,
|
||||||
beast::executor_type<stream>>(
|
beast::executor_type<stream>>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
sp->stream.get_executor())
|
sp->stream.get_executor())
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
#include <boost/beast/websocket/teardown.hpp>
|
#include <boost/beast/websocket/teardown.hpp>
|
||||||
#include <boost/beast/websocket/detail/mask.hpp>
|
#include <boost/beast/websocket/detail/mask.hpp>
|
||||||
#include <boost/beast/websocket/impl/stream_impl.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/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffers_prefix.hpp>
|
#include <boost/beast/core/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/buffers_suffix.hpp>
|
#include <boost/beast/core/buffers_suffix.hpp>
|
||||||
@@ -45,7 +45,7 @@ namespace websocket {
|
|||||||
template<class NextLayer, bool deflateSupported>
|
template<class NextLayer, bool deflateSupported>
|
||||||
template<class Handler, class MutableBufferSequence>
|
template<class Handler, class MutableBufferSequence>
|
||||||
class stream<NextLayer, deflateSupported>::read_some_op
|
class stream<NextLayer, deflateSupported>::read_some_op
|
||||||
: public beast::async_op_base<
|
: public beast::async_base<
|
||||||
Handler, beast::executor_type<stream>>
|
Handler, beast::executor_type<stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -65,7 +65,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
boost::shared_ptr<impl_type> const& sp,
|
boost::shared_ptr<impl_type> const& sp,
|
||||||
MutableBufferSequence const& bs)
|
MutableBufferSequence const& bs)
|
||||||
: async_op_base<
|
: async_base<
|
||||||
Handler, beast::executor_type<stream>>(
|
Handler, beast::executor_type<stream>>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
sp->stream.get_executor())
|
sp->stream.get_executor())
|
||||||
@@ -613,7 +613,7 @@ public:
|
|||||||
template<class NextLayer, bool deflateSupported>
|
template<class NextLayer, bool deflateSupported>
|
||||||
template<class Handler, class DynamicBuffer>
|
template<class Handler, class DynamicBuffer>
|
||||||
class stream<NextLayer, deflateSupported>::read_op
|
class stream<NextLayer, deflateSupported>::read_op
|
||||||
: public beast::async_op_base<
|
: public beast::async_base<
|
||||||
Handler, beast::executor_type<stream>>
|
Handler, beast::executor_type<stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -631,7 +631,7 @@ public:
|
|||||||
DynamicBuffer& b,
|
DynamicBuffer& b,
|
||||||
std::size_t limit,
|
std::size_t limit,
|
||||||
bool some)
|
bool some)
|
||||||
: async_op_base<Handler,
|
: async_base<Handler,
|
||||||
beast::executor_type<stream>>(
|
beast::executor_type<stream>>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
sp->stream.get_executor())
|
sp->stream.get_executor())
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_TEARDOWN_HPP
|
#ifndef BOOST_BEAST_WEBSOCKET_IMPL_TEARDOWN_HPP
|
||||||
#define 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/bind_handler.hpp>
|
||||||
#include <boost/beast/core/stream_traits.hpp>
|
#include <boost/beast/core/stream_traits.hpp>
|
||||||
#include <boost/beast/core/detail/bind_continuation.hpp>
|
#include <boost/beast/core/detail/bind_continuation.hpp>
|
||||||
@@ -29,7 +29,7 @@ template<
|
|||||||
class Protocol, class Executor,
|
class Protocol, class Executor,
|
||||||
class Handler>
|
class Handler>
|
||||||
class teardown_tcp_op
|
class teardown_tcp_op
|
||||||
: public beast::async_op_base<
|
: public beast::async_base<
|
||||||
Handler, beast::executor_type<
|
Handler, beast::executor_type<
|
||||||
net::basic_stream_socket<
|
net::basic_stream_socket<
|
||||||
Protocol, Executor>>>
|
Protocol, Executor>>>
|
||||||
@@ -48,7 +48,7 @@ public:
|
|||||||
Handler_&& h,
|
Handler_&& h,
|
||||||
socket_type& s,
|
socket_type& s,
|
||||||
role_type role)
|
role_type role)
|
||||||
: async_op_base<Handler,
|
: async_base<Handler,
|
||||||
beast::executor_type<
|
beast::executor_type<
|
||||||
net::basic_stream_socket<
|
net::basic_stream_socket<
|
||||||
Protocol, Executor>>>(
|
Protocol, Executor>>>(
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define BOOST_BEAST_WEBSOCKET_IMPL_WRITE_HPP
|
#define BOOST_BEAST_WEBSOCKET_IMPL_WRITE_HPP
|
||||||
|
|
||||||
#include <boost/beast/websocket/detail/mask.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/bind_handler.hpp>
|
||||||
#include <boost/beast/core/buffer_size.hpp>
|
#include <boost/beast/core/buffer_size.hpp>
|
||||||
#include <boost/beast/core/buffers_cat.hpp>
|
#include <boost/beast/core/buffers_cat.hpp>
|
||||||
@@ -39,7 +39,7 @@ namespace websocket {
|
|||||||
template<class NextLayer, bool deflateSupported>
|
template<class NextLayer, bool deflateSupported>
|
||||||
template<class Handler, class Buffers>
|
template<class Handler, class Buffers>
|
||||||
class stream<NextLayer, deflateSupported>::write_some_op
|
class stream<NextLayer, deflateSupported>::write_some_op
|
||||||
: public beast::async_op_base<
|
: public beast::async_base<
|
||||||
Handler, beast::executor_type<stream>>
|
Handler, beast::executor_type<stream>>
|
||||||
, public net::coroutine
|
, public net::coroutine
|
||||||
{
|
{
|
||||||
@@ -73,7 +73,7 @@ public:
|
|||||||
boost::shared_ptr<impl_type> const& sp,
|
boost::shared_ptr<impl_type> const& sp,
|
||||||
bool fin,
|
bool fin,
|
||||||
Buffers const& bs)
|
Buffers const& bs)
|
||||||
: beast::async_op_base<Handler,
|
: beast::async_base<Handler,
|
||||||
beast::executor_type<stream>>(
|
beast::executor_type<stream>>(
|
||||||
std::forward<Handler_>(h),
|
std::forward<Handler_>(h),
|
||||||
sp->stream.get_executor())
|
sp->stream.get_executor())
|
||||||
|
@@ -10,7 +10,6 @@
|
|||||||
local SOURCES =
|
local SOURCES =
|
||||||
error.cpp
|
error.cpp
|
||||||
icy_stream.cpp
|
icy_stream.cpp
|
||||||
ssl_stream.cpp
|
|
||||||
stream.cpp
|
stream.cpp
|
||||||
;
|
;
|
||||||
|
|
||||||
|
@@ -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
|
|
@@ -31,7 +31,7 @@ add_executable (tests-beast-core
|
|||||||
_detail_tuple.cpp
|
_detail_tuple.cpp
|
||||||
_detail_variant.cpp
|
_detail_variant.cpp
|
||||||
_detail_varint.cpp
|
_detail_varint.cpp
|
||||||
async_op_base.cpp
|
async_base.cpp
|
||||||
basic_stream.cpp
|
basic_stream.cpp
|
||||||
bind_handler.cpp
|
bind_handler.cpp
|
||||||
buffer_size.cpp
|
buffer_size.cpp
|
||||||
|
@@ -19,7 +19,7 @@ local SOURCES =
|
|||||||
_detail_tuple.cpp
|
_detail_tuple.cpp
|
||||||
_detail_variant.cpp
|
_detail_variant.cpp
|
||||||
_detail_varint.cpp
|
_detail_varint.cpp
|
||||||
async_op_base.cpp
|
async_base.cpp
|
||||||
basic_stream.cpp
|
basic_stream.cpp
|
||||||
bind_handler.cpp
|
bind_handler.cpp
|
||||||
buffer_size.cpp
|
buffer_size.cpp
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
//
|
//
|
||||||
|
|
||||||
// Test that header file is self-contained.
|
// 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"
|
#include "test_handler.hpp"
|
||||||
|
|
||||||
@@ -164,7 +164,7 @@ struct associated_executor<
|
|||||||
namespace boost {
|
namespace boost {
|
||||||
namespace beast {
|
namespace beast {
|
||||||
|
|
||||||
class async_op_base_test : public beast::unit_test::suite
|
class async_base_test : public beast::unit_test::suite
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
// no associated allocator
|
// no associated allocator
|
||||||
@@ -173,7 +173,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
std::allocator<void>,
|
std::allocator<void>,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, no_alloc>,
|
handler<no_ex, no_alloc>,
|
||||||
net::io_context::executor_type>
|
net::io_context::executor_type>
|
||||||
>>::value);
|
>>::value);
|
||||||
@@ -182,7 +182,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
std::allocator<int>,
|
std::allocator<int>,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, no_alloc>,
|
handler<no_ex, no_alloc>,
|
||||||
net::io_context::executor_type,
|
net::io_context::executor_type,
|
||||||
std::allocator<int>>
|
std::allocator<int>>
|
||||||
@@ -192,7 +192,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
std::allocator<void>,
|
std::allocator<void>,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, no_alloc>,
|
handler<no_ex, no_alloc>,
|
||||||
net::io_context::executor_type>,
|
net::io_context::executor_type>,
|
||||||
std::allocator<int> // ignored
|
std::allocator<int> // ignored
|
||||||
@@ -202,7 +202,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
std::allocator<int>,
|
std::allocator<int>,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, no_alloc>,
|
handler<no_ex, no_alloc>,
|
||||||
net::io_context::executor_type,
|
net::io_context::executor_type,
|
||||||
std::allocator<int>>,
|
std::allocator<int>>,
|
||||||
@@ -215,7 +215,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
nested_alloc::allocator_type,
|
nested_alloc::allocator_type,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, nested_alloc>,
|
handler<no_ex, nested_alloc>,
|
||||||
net::io_context::executor_type>
|
net::io_context::executor_type>
|
||||||
>>::value);
|
>>::value);
|
||||||
@@ -224,7 +224,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
nested_alloc::allocator_type,
|
nested_alloc::allocator_type,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, nested_alloc>,
|
handler<no_ex, nested_alloc>,
|
||||||
net::io_context::executor_type,
|
net::io_context::executor_type,
|
||||||
std::allocator<int>> // ignored
|
std::allocator<int>> // ignored
|
||||||
@@ -234,7 +234,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
nested_alloc::allocator_type,
|
nested_alloc::allocator_type,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, nested_alloc>,
|
handler<no_ex, nested_alloc>,
|
||||||
net::io_context::executor_type>,
|
net::io_context::executor_type>,
|
||||||
std::allocator<int> // ignored
|
std::allocator<int> // ignored
|
||||||
@@ -244,7 +244,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
nested_alloc::allocator_type,
|
nested_alloc::allocator_type,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, nested_alloc>,
|
handler<no_ex, nested_alloc>,
|
||||||
net::io_context::executor_type,
|
net::io_context::executor_type,
|
||||||
std::allocator<int>>, // ignored
|
std::allocator<int>>, // ignored
|
||||||
@@ -257,7 +257,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
intrusive_alloc::allocator_type,
|
intrusive_alloc::allocator_type,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, intrusive_alloc>,
|
handler<no_ex, intrusive_alloc>,
|
||||||
net::io_context::executor_type>
|
net::io_context::executor_type>
|
||||||
>>::value);
|
>>::value);
|
||||||
@@ -266,7 +266,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
intrusive_alloc::allocator_type,
|
intrusive_alloc::allocator_type,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, intrusive_alloc>,
|
handler<no_ex, intrusive_alloc>,
|
||||||
net::io_context::executor_type,
|
net::io_context::executor_type,
|
||||||
std::allocator<int>> // ignored
|
std::allocator<int>> // ignored
|
||||||
@@ -276,7 +276,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
intrusive_alloc::allocator_type,
|
intrusive_alloc::allocator_type,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, intrusive_alloc>,
|
handler<no_ex, intrusive_alloc>,
|
||||||
net::io_context::executor_type>,
|
net::io_context::executor_type>,
|
||||||
std::allocator<int> // ignored
|
std::allocator<int> // ignored
|
||||||
@@ -286,7 +286,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
intrusive_alloc::allocator_type,
|
intrusive_alloc::allocator_type,
|
||||||
net::associated_allocator_t<
|
net::associated_allocator_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, intrusive_alloc>,
|
handler<no_ex, intrusive_alloc>,
|
||||||
net::io_context::executor_type,
|
net::io_context::executor_type,
|
||||||
std::allocator<int>>, // ignored
|
std::allocator<int>>, // ignored
|
||||||
@@ -299,7 +299,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
ex1_type,
|
ex1_type,
|
||||||
net::associated_executor_t<
|
net::associated_executor_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, no_alloc>,
|
handler<no_ex, no_alloc>,
|
||||||
ex1_type>
|
ex1_type>
|
||||||
>>::value);
|
>>::value);
|
||||||
@@ -308,7 +308,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
ex1_type,
|
ex1_type,
|
||||||
net::associated_executor_t<
|
net::associated_executor_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<no_ex, no_alloc>,
|
handler<no_ex, no_alloc>,
|
||||||
ex1_type>,
|
ex1_type>,
|
||||||
net::system_executor // ignored
|
net::system_executor // ignored
|
||||||
@@ -320,7 +320,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
nested_ex::executor_type,
|
nested_ex::executor_type,
|
||||||
net::associated_executor_t<
|
net::associated_executor_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<nested_ex, no_alloc>,
|
handler<nested_ex, no_alloc>,
|
||||||
ex1_type>
|
ex1_type>
|
||||||
>>::value);
|
>>::value);
|
||||||
@@ -329,7 +329,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
nested_ex::executor_type,
|
nested_ex::executor_type,
|
||||||
net::associated_executor_t<
|
net::associated_executor_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<nested_ex, no_alloc>,
|
handler<nested_ex, no_alloc>,
|
||||||
ex1_type>,
|
ex1_type>,
|
||||||
net::system_executor // ignored
|
net::system_executor // ignored
|
||||||
@@ -341,7 +341,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
intrusive_ex::executor_type,
|
intrusive_ex::executor_type,
|
||||||
net::associated_executor_t<
|
net::associated_executor_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<intrusive_ex, no_alloc>,
|
handler<intrusive_ex, no_alloc>,
|
||||||
ex1_type>
|
ex1_type>
|
||||||
>>::value);
|
>>::value);
|
||||||
@@ -350,7 +350,7 @@ public:
|
|||||||
std::is_same<
|
std::is_same<
|
||||||
intrusive_ex::executor_type,
|
intrusive_ex::executor_type,
|
||||||
net::associated_executor_t<
|
net::associated_executor_t<
|
||||||
async_op_base<
|
async_base<
|
||||||
handler<intrusive_ex, no_alloc>,
|
handler<intrusive_ex, no_alloc>,
|
||||||
ex1_type>,
|
ex1_type>,
|
||||||
net::system_executor // ignored
|
net::system_executor // ignored
|
||||||
@@ -374,7 +374,7 @@ public:
|
|||||||
{
|
{
|
||||||
simple_allocator alloc;
|
simple_allocator alloc;
|
||||||
simple_allocator alloc2;
|
simple_allocator alloc2;
|
||||||
async_op_base<
|
async_base<
|
||||||
move_only_handler,
|
move_only_handler,
|
||||||
simple_executor,
|
simple_executor,
|
||||||
simple_allocator> op(
|
simple_allocator> op(
|
||||||
@@ -387,7 +387,7 @@ public:
|
|||||||
{
|
{
|
||||||
simple_executor ex;
|
simple_executor ex;
|
||||||
simple_executor ex2;
|
simple_executor ex2;
|
||||||
async_op_base<
|
async_base<
|
||||||
move_only_handler,
|
move_only_handler,
|
||||||
simple_executor> op(
|
simple_executor> op(
|
||||||
move_only_handler{}, ex);
|
move_only_handler{}, ex);
|
||||||
@@ -397,7 +397,7 @@ public:
|
|||||||
|
|
||||||
// move construction
|
// move construction
|
||||||
{
|
{
|
||||||
async_op_base<
|
async_base<
|
||||||
move_only_handler,
|
move_only_handler,
|
||||||
simple_executor> op(
|
simple_executor> op(
|
||||||
move_only_handler{}, {});
|
move_only_handler{}, {});
|
||||||
@@ -407,7 +407,7 @@ public:
|
|||||||
// observers
|
// observers
|
||||||
{
|
{
|
||||||
bool b = false;
|
bool b = false;
|
||||||
async_op_base<
|
async_base<
|
||||||
legacy_handler,
|
legacy_handler,
|
||||||
simple_executor> op(
|
simple_executor> op(
|
||||||
legacy_handler{b}, {});
|
legacy_handler{b}, {});
|
||||||
@@ -421,7 +421,7 @@ public:
|
|||||||
// invocation
|
// invocation
|
||||||
{
|
{
|
||||||
net::io_context ioc;
|
net::io_context ioc;
|
||||||
async_op_base<
|
async_base<
|
||||||
test::handler,
|
test::handler,
|
||||||
net::io_context::executor_type> op(
|
net::io_context::executor_type> op(
|
||||||
test::any_handler(), ioc.get_executor());
|
test::any_handler(), ioc.get_executor());
|
||||||
@@ -429,7 +429,7 @@ public:
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
net::io_context ioc;
|
net::io_context ioc;
|
||||||
async_op_base<
|
async_base<
|
||||||
test::handler,
|
test::handler,
|
||||||
net::io_context::executor_type> op(
|
net::io_context::executor_type> op(
|
||||||
test::any_handler(), ioc.get_executor());
|
test::any_handler(), ioc.get_executor());
|
||||||
@@ -437,7 +437,7 @@ public:
|
|||||||
ioc.run();
|
ioc.run();
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
async_op_base<
|
async_base<
|
||||||
test::handler,
|
test::handler,
|
||||||
simple_executor> op(
|
simple_executor> op(
|
||||||
test::any_handler(), {});
|
test::any_handler(), {});
|
||||||
@@ -448,7 +448,7 @@ public:
|
|||||||
legacy_handler::test(
|
legacy_handler::test(
|
||||||
[](legacy_handler h)
|
[](legacy_handler h)
|
||||||
{
|
{
|
||||||
return async_op_base<
|
return async_base<
|
||||||
legacy_handler,
|
legacy_handler,
|
||||||
simple_executor>(
|
simple_executor>(
|
||||||
std::move(h), {});
|
std::move(h), {});
|
||||||
@@ -462,7 +462,7 @@ public:
|
|||||||
{
|
{
|
||||||
simple_allocator alloc;
|
simple_allocator alloc;
|
||||||
simple_allocator alloc2;
|
simple_allocator alloc2;
|
||||||
stable_async_op_base<
|
stable_async_base<
|
||||||
move_only_handler,
|
move_only_handler,
|
||||||
simple_executor,
|
simple_executor,
|
||||||
simple_allocator> op(
|
simple_allocator> op(
|
||||||
@@ -475,7 +475,7 @@ public:
|
|||||||
{
|
{
|
||||||
simple_executor ex;
|
simple_executor ex;
|
||||||
simple_executor ex2;
|
simple_executor ex2;
|
||||||
stable_async_op_base<
|
stable_async_base<
|
||||||
move_only_handler,
|
move_only_handler,
|
||||||
simple_executor> op(
|
simple_executor> op(
|
||||||
move_only_handler{}, ex);
|
move_only_handler{}, ex);
|
||||||
@@ -485,7 +485,7 @@ public:
|
|||||||
|
|
||||||
// move construction
|
// move construction
|
||||||
{
|
{
|
||||||
stable_async_op_base<
|
stable_async_base<
|
||||||
move_only_handler,
|
move_only_handler,
|
||||||
simple_executor> op(
|
simple_executor> op(
|
||||||
move_only_handler{}, {});
|
move_only_handler{}, {});
|
||||||
@@ -495,7 +495,7 @@ public:
|
|||||||
// invocation
|
// invocation
|
||||||
{
|
{
|
||||||
net::io_context ioc;
|
net::io_context ioc;
|
||||||
stable_async_op_base<
|
stable_async_base<
|
||||||
test::handler,
|
test::handler,
|
||||||
net::io_context::executor_type> op(
|
net::io_context::executor_type> op(
|
||||||
test::any_handler(), ioc.get_executor());
|
test::any_handler(), ioc.get_executor());
|
||||||
@@ -503,7 +503,7 @@ public:
|
|||||||
}
|
}
|
||||||
{
|
{
|
||||||
net::io_context ioc;
|
net::io_context ioc;
|
||||||
stable_async_op_base<
|
stable_async_base<
|
||||||
test::handler,
|
test::handler,
|
||||||
net::io_context::executor_type> op(
|
net::io_context::executor_type> op(
|
||||||
test::any_handler(), ioc.get_executor());
|
test::any_handler(), ioc.get_executor());
|
||||||
@@ -511,7 +511,7 @@ public:
|
|||||||
ioc.run();
|
ioc.run();
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
stable_async_op_base<
|
stable_async_base<
|
||||||
test::handler,
|
test::handler,
|
||||||
simple_executor> op(
|
simple_executor> op(
|
||||||
test::any_handler(), {});
|
test::any_handler(), {});
|
||||||
@@ -522,7 +522,7 @@ public:
|
|||||||
legacy_handler::test(
|
legacy_handler::test(
|
||||||
[](legacy_handler h)
|
[](legacy_handler h)
|
||||||
{
|
{
|
||||||
return stable_async_op_base<
|
return stable_async_base<
|
||||||
legacy_handler,
|
legacy_handler,
|
||||||
simple_executor>(
|
simple_executor>(
|
||||||
std::move(h), {});
|
std::move(h), {});
|
||||||
@@ -542,7 +542,7 @@ public:
|
|||||||
destroyed = true;
|
destroyed = true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
stable_async_op_base<
|
stable_async_base<
|
||||||
move_only_handler,
|
move_only_handler,
|
||||||
simple_executor> op(
|
simple_executor> op(
|
||||||
move_only_handler{}, {});
|
move_only_handler{}, {});
|
||||||
@@ -561,7 +561,7 @@ public:
|
|||||||
std::exception{});
|
std::exception{});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
stable_async_op_base<
|
stable_async_base<
|
||||||
move_only_handler,
|
move_only_handler,
|
||||||
simple_executor> op(
|
simple_executor> op(
|
||||||
move_only_handler{}, {});
|
move_only_handler{}, {});
|
||||||
@@ -585,7 +585,7 @@ public:
|
|||||||
async_read(AsyncReadStream& stream, net::mutable_buffer buffer, ReadHandler&& handler)
|
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 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
|
struct op : base_type
|
||||||
{
|
{
|
||||||
@@ -641,7 +641,7 @@ public:
|
|||||||
void(error_code)>::return_type
|
void(error_code)>::return_type
|
||||||
{
|
{
|
||||||
using handler_type = typename net::async_completion<WriteHandler, void(error_code)>::completion_handler_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
|
struct op : base_type
|
||||||
{
|
{
|
||||||
@@ -728,8 +728,8 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
BEAST_EXPECT((&async_op_base_test::async_read<test::stream, handler>));
|
BEAST_EXPECT((&async_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_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
|
} // beast
|
||||||
} // boost
|
} // boost
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
#include <boost/beast/_experimental/test/stream.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/buffers_prefix.hpp>
|
||||||
#include <boost/beast/core/error.hpp>
|
#include <boost/beast/core/error.hpp>
|
||||||
#include <boost/beast/core/flat_buffer.hpp>
|
#include <boost/beast/core/flat_buffer.hpp>
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
#include <boost/beast/_experimental/test/stream.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/error.hpp>
|
||||||
#include <boost/beast/core/stream_traits.hpp>
|
#include <boost/beast/core/stream_traits.hpp>
|
||||||
#include <boost/beast/websocket.hpp>
|
#include <boost/beast/websocket.hpp>
|
||||||
@@ -86,8 +86,8 @@ class counted_stream
|
|||||||
{
|
{
|
||||||
using handler_type = typename std::decay<ReadHandler>::type;
|
using handler_type = typename std::decay<ReadHandler>::type;
|
||||||
|
|
||||||
// async_op_base handles all of the composed operation boilerplate for us
|
// async_base handles all of the composed operation boilerplate for us
|
||||||
using base = async_op_base<
|
using base = async_base<
|
||||||
handler_type, beast::executor_type<NextLayer>>;
|
handler_type, beast::executor_type<NextLayer>>;
|
||||||
|
|
||||||
// Our composed operation is implemented as a completion handler object
|
// 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;
|
using handler_type = typename std::decay<WriteHandler>::type;
|
||||||
|
|
||||||
// async_op_base handles all of the composed operation boilerplate for us
|
// async_base handles all of the composed operation boilerplate for us
|
||||||
using base = async_op_base<
|
using base = async_base<
|
||||||
handler_type, beast::executor_type<NextLayer>>;
|
handler_type, beast::executor_type<NextLayer>>;
|
||||||
|
|
||||||
// Our composed operation is implemented as a completion handler object
|
// Our composed operation is implemented as a completion handler object
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
#include <boost/beast/_experimental/unit_test/suite.hpp>
|
||||||
#include <boost/beast/_experimental/test/stream.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/error.hpp>
|
||||||
#include <boost/beast/core/stream_traits.hpp>
|
#include <boost/beast/core/stream_traits.hpp>
|
||||||
#include <boost/beast/websocket.hpp>
|
#include <boost/beast/websocket.hpp>
|
||||||
|
Reference in New Issue
Block a user