mirror of
https://github.com/boostorg/beast.git
synced 2025-08-01 22:04:34 +02:00
@@ -1,5 +1,6 @@
|
|||||||
Version XXX:
|
Version XXX:
|
||||||
|
|
||||||
|
* Fix async_detect_ssl with use_awaitable
|
||||||
* Add clang coroutines-ts to circleci config
|
* Add clang coroutines-ts to circleci config
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@@ -374,13 +374,13 @@ struct run_detect_ssl_op
|
|||||||
void operator()(
|
void operator()(
|
||||||
DetectHandler&& h,
|
DetectHandler&& h,
|
||||||
AsyncReadStream* s, // references are passed as pointers
|
AsyncReadStream* s, // references are passed as pointers
|
||||||
DynamicBuffer& b)
|
DynamicBuffer* b)
|
||||||
{
|
{
|
||||||
detect_ssl_op<
|
detect_ssl_op<
|
||||||
typename std::decay<DetectHandler>::type,
|
typename std::decay<DetectHandler>::type,
|
||||||
AsyncReadStream,
|
AsyncReadStream,
|
||||||
DynamicBuffer>(
|
DynamicBuffer>(
|
||||||
std::forward<DetectHandler>(h), *s, b);
|
std::forward<DetectHandler>(h), *s, *b);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -439,7 +439,7 @@ async_detect_ssl(
|
|||||||
detail::run_detect_ssl_op{},
|
detail::run_detect_ssl_op{},
|
||||||
token,
|
token,
|
||||||
&stream, // pass the reference by pointer
|
&stream, // pass the reference by pointer
|
||||||
buffer);
|
&buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
//]
|
//]
|
||||||
|
@@ -16,6 +16,11 @@
|
|||||||
#include <boost/beast/core/flat_buffer.hpp>
|
#include <boost/beast/core/flat_buffer.hpp>
|
||||||
#include <boost/beast/core/string.hpp>
|
#include <boost/beast/core/string.hpp>
|
||||||
#include <boost/core/exchange.hpp>
|
#include <boost/core/exchange.hpp>
|
||||||
|
#if BOOST_ASIO_HAS_CO_AWAIT
|
||||||
|
#include <boost/asio/awaitable.hpp>
|
||||||
|
#include <boost/asio/co_spawn.hpp>
|
||||||
|
#include <boost/asio/use_awaitable.hpp>
|
||||||
|
#endif
|
||||||
namespace boost {
|
namespace boost {
|
||||||
namespace beast {
|
namespace beast {
|
||||||
|
|
||||||
@@ -166,12 +171,25 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if BOOST_ASIO_HAS_CO_AWAIT
|
||||||
|
void testAwaitableCompiles(test::stream& stream, flat_buffer& b)
|
||||||
|
{
|
||||||
|
static_assert(
|
||||||
|
std::is_same_v<
|
||||||
|
net::awaitable<bool>, decltype(
|
||||||
|
async_detect_ssl(stream, b, net::use_awaitable))>);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
run() override
|
run() override
|
||||||
{
|
{
|
||||||
testDetect();
|
testDetect();
|
||||||
testRead();
|
testRead();
|
||||||
testAsyncRead();
|
testAsyncRead();
|
||||||
|
#if BOOST_ASIO_HAS_CO_AWAIT
|
||||||
|
boost::ignore_unused(&detect_ssl_test::testAwaitableCompiles);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user