forked from boostorg/beast
Fix all async initiating functions with use_awaitable:
Add trait:
is_completion_token_for
Fixes for
buffered_read_stream
Add tests for
basic_stream
buffered_read_stream
flat_stream
http (all)
websocket (all)
resolves #1920
This commit is contained in:
14 files changed
+382
-6
No files matched your search
@@ -110,7 +110,7 @@ struct run_read_op
|
||||
operator()(
|
||||
ReadHandler&& h,
|
||||
buffered_read_stream* s,
|
||||
Buffers const& b)
|
||||
Buffers const* b)
|
||||
{
|
||||
// If you get an error on the following line it means
|
||||
// that your handler does not meet the documented type
|
||||
@@ -124,7 +124,7 @@ struct run_read_op
|
||||
read_op<
|
||||
Buffers,
|
||||
typename std::decay<ReadHandler>::type>(
|
||||
std::forward<ReadHandler>(h), *s, b);
|
||||
std::forward<ReadHandler>(h), *s, *b);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -153,7 +153,7 @@ async_write_some(
|
||||
static_assert(net::is_const_buffer_sequence<
|
||||
ConstBufferSequence>::value,
|
||||
"ConstBufferSequence type requirements not met");
|
||||
static_assert(detail::is_invocable<WriteHandler,
|
||||
static_assert(detail::is_completion_token_for<WriteHandler,
|
||||
void(error_code, std::size_t)>::value,
|
||||
"WriteHandler type requirements not met");
|
||||
return next_layer_.async_write_some(buffers,
|
||||
@@ -233,7 +233,7 @@ async_read_some(
|
||||
typename ops::run_read_op{},
|
||||
handler,
|
||||
this,
|
||||
buffers);
|
||||
&buffers);
|
||||
}
|
||||
|
||||
} // beast
|
||||
|
||||
Reference in new issue
Block a user