mirror of
https://github.com/boostorg/beast.git
synced 2025-08-03 14:54:32 +02:00
Replace asynchronous helper macros with template aliases (API Change)
This commit is contained in:
@@ -7,6 +7,7 @@ API Changes
|
||||
* Return http::error::end_of_stream on HTTP read eof
|
||||
* Remove placeholders
|
||||
* Move prepare_buffers to prepare_buffer.hpp
|
||||
* Replace asynchronous helper macros with template aliases
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@@ -153,6 +153,7 @@
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="beast.ref.async_completion">async_completion</link></member>
|
||||
<member><link linkend="beast.ref.async_result">async_result</link></member>
|
||||
<member><link linkend="beast.ref.async_return_type">async_return_type</link></member>
|
||||
<member><link linkend="beast.ref.basic_flat_buffer">basic_flat_buffer</link></member>
|
||||
<member><link linkend="beast.ref.basic_multi_buffer">basic_multi_buffer</link></member>
|
||||
<member><link linkend="beast.ref.buffers_adapter">buffers_adapter</link></member>
|
||||
@@ -165,6 +166,7 @@
|
||||
<member><link linkend="beast.ref.flat_buffer">flat_buffer</link></member>
|
||||
<member><link linkend="beast.ref.handler_alloc">handler_alloc</link></member>
|
||||
<member><link linkend="beast.ref.handler_ptr">handler_ptr</link></member>
|
||||
<member><link linkend="beast.ref.handler_type">handler_type</link></member>
|
||||
<member><link linkend="beast.ref.multi_buffer">multi_buffer</link></member>
|
||||
<member><link linkend="beast.ref.static_buffer">static_buffer</link></member>
|
||||
<member><link linkend="beast.ref.static_buffer_n">static_buffer_n</link></member>
|
||||
@@ -185,11 +187,6 @@
|
||||
<member><link linkend="beast.ref.system_category">system_category</link></member>
|
||||
<member><link linkend="beast.ref.to_static_string">to_static_string</link></member>
|
||||
</simplelist>
|
||||
<bridgehead renderas="sect3">Macros</bridgehead>
|
||||
<simplelist type="vert" columns="1">
|
||||
<member><link linkend="beast.ref.BEAST_HANDLER_TYPE">BEAST_HANDLER_TYPE</link></member>
|
||||
<member><link linkend="beast.ref.BEAST_INITFN_RESULT_TYPE">BEAST_INITFN_RESULT_TYPE</link></member>
|
||||
</simplelist>
|
||||
</entry>
|
||||
<entry valign="top">
|
||||
<bridgehead renderas="sect3">Type Traits</bridgehead>
|
||||
|
@@ -103,8 +103,8 @@ public:
|
||||
}
|
||||
|
||||
template<class MutableBufferSequence, class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code, std::size_t)>
|
||||
async_read_some(MutableBufferSequence const& buffers,
|
||||
ReadHandler&& handler)
|
||||
{
|
||||
@@ -139,8 +139,8 @@ public:
|
||||
}
|
||||
|
||||
template<class ConstBufferSequence, class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code, std::size_t)>
|
||||
async_write_some(ConstBufferSequence const& buffers,
|
||||
WriteHandler&& handler)
|
||||
{
|
||||
|
@@ -78,8 +78,8 @@ public:
|
||||
}
|
||||
|
||||
template<class MutableBufferSequence, class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code, std::size_t)>
|
||||
async_read_some(MutableBufferSequence const& buffers,
|
||||
ReadHandler&& handler)
|
||||
{
|
||||
@@ -124,8 +124,8 @@ public:
|
||||
}
|
||||
|
||||
template<class ConstBufferSequence, class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code, std::size_t)>
|
||||
async_write_some(ConstBufferSequence const& buffers,
|
||||
WriteHandler&& handler)
|
||||
{
|
||||
|
@@ -76,8 +76,8 @@ public:
|
||||
}
|
||||
|
||||
template<class MutableBufferSequence, class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code, std::size_t)>
|
||||
async_read_some(MutableBufferSequence const& buffers,
|
||||
ReadHandler&& handler)
|
||||
{
|
||||
@@ -115,8 +115,8 @@ public:
|
||||
}
|
||||
|
||||
template<class ConstBuffeSequence, class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code, std::size_t)>
|
||||
async_write_some(ConstBuffeSequence const& buffers,
|
||||
WriteHandler&& handler)
|
||||
{
|
||||
|
@@ -59,8 +59,8 @@ public:
|
||||
}
|
||||
|
||||
template<class MutableBufferSequence, class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code, std::size_t)>
|
||||
async_read_some(MutableBufferSequence const& buffers,
|
||||
ReadHandler&& handler)
|
||||
{
|
||||
@@ -98,8 +98,8 @@ public:
|
||||
}
|
||||
|
||||
template<class ConstBufferSequence, class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code, std::size_t)>
|
||||
async_write_some(ConstBufferSequence const& buffers,
|
||||
WriteHandler&& handler)
|
||||
{
|
||||
|
@@ -37,7 +37,7 @@ namespace beast {
|
||||
completion token types. The primary template assumes that the
|
||||
@b CompletionToken is the completion handler.
|
||||
|
||||
@see @ref BEAST_INITFN_RESULT_TYPE, @ref BEAST_HANDLER_TYPE
|
||||
@see @ref async_completion, @ref async_return_type, @ref handler_type
|
||||
*/
|
||||
template<class CompletionToken, class Signature>
|
||||
class async_result
|
||||
@@ -118,6 +118,8 @@ public:
|
||||
|
||||
@note See <a href="http://cplusplus.github.io/networking-ts/draft.pdf">
|
||||
Working Draft, C++ Extensions for Networking</a>
|
||||
|
||||
@see @ref async_return_type, @ref handler_type
|
||||
*/
|
||||
template<class CompletionToken, class Signature>
|
||||
struct async_completion
|
||||
@@ -150,7 +152,7 @@ struct async_completion
|
||||
// CompletionToken is not invokable with the given signature
|
||||
static_assert(is_CompletionHandler<
|
||||
completion_handler_type, Signature>::value,
|
||||
"CompletionToken requirements not met (Signature mismatch)");
|
||||
"CompletionToken requirements not met: signature mismatch");
|
||||
}
|
||||
|
||||
/// The final completion handler, callable with the specified signature.
|
||||
@@ -165,23 +167,41 @@ struct async_completion
|
||||
CompletionToken>::type, Signature> result;
|
||||
};
|
||||
|
||||
/// @file
|
||||
/** Convert a completion token to the correct completion handler type.
|
||||
|
||||
/** @def BEAST_INITFN_RESULT_TYPE(ct, sig)
|
||||
This helps asynchronous initiation functions to meet the
|
||||
requirements of the Extensible Asynchronous Model.
|
||||
|
||||
A macro to customize the return value of asynchronous initiation functions.
|
||||
@tparam CompletionToken Specifies the model used to obtain the result of
|
||||
the asynchronous operation.
|
||||
|
||||
@tparam Signature The call signature for the completion handler type invoked
|
||||
on completion of the asynchronous operation.
|
||||
|
||||
@see @ref async_completion, @ref async_return_type
|
||||
*/
|
||||
#define BEAST_INITFN_RESULT_TYPE(ct, sig) \
|
||||
typename async_result< \
|
||||
typename std::decay<ct>::type, sig>::return_type
|
||||
template<class CompletionToken, typename Signature>
|
||||
using handler_type = typename beast::async_result<
|
||||
typename std::decay<CompletionToken>::type,
|
||||
Signature>::completion_handler_type;
|
||||
|
||||
/** @def BEAST_HANDLER_TYPE(ct, sig)
|
||||
/** Determine the return value of an asynchronous initiation function
|
||||
|
||||
A helper macro to convert a completion token to a completion handler type.
|
||||
This helps asynchronous initiation functions to meet the
|
||||
requirements of the Extensible Asynchronous Model.
|
||||
|
||||
@tparam CompletionToken Specifies the model used to obtain the result of
|
||||
the asynchronous operation.
|
||||
|
||||
@tparam Signature The call signature for the completion handler type invoked
|
||||
on completion of the asynchronous operation.
|
||||
|
||||
@see @ref async_completion, @ref handler_type
|
||||
*/
|
||||
#define BEAST_HANDLER_TYPE(ct, sig) \
|
||||
typename async_result< \
|
||||
typename std::decay<ct>::type, sig>::completion_handler_type
|
||||
template<class CompletionToken, typename Signature>
|
||||
using async_return_type = typename beast::async_result<
|
||||
typename std::decay<CompletionToken>::type,
|
||||
Signature>::return_type;
|
||||
|
||||
} // beast
|
||||
|
||||
|
@@ -272,7 +272,7 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class MutableBufferSequence, class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(ReadHandler, void(error_code))
|
||||
async_return_type<ReadHandler, void(error_code)>
|
||||
async_read_some(MutableBufferSequence const& buffers,
|
||||
ReadHandler&& handler);
|
||||
|
||||
@@ -343,7 +343,7 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class ConstBufferSequence, class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(WriteHandler, void(error_code))
|
||||
async_return_type<WriteHandler, void(error_code)>
|
||||
async_write_some(ConstBufferSequence const& buffers,
|
||||
WriteHandler&& handler);
|
||||
};
|
||||
|
@@ -162,7 +162,7 @@ auto
|
||||
buffered_read_stream<Stream, DynamicBuffer>::
|
||||
async_write_some(ConstBufferSequence const& buffers,
|
||||
WriteHandler&& handler) ->
|
||||
BEAST_INITFN_RESULT_TYPE(WriteHandler, void(error_code))
|
||||
async_return_type<WriteHandler, void(error_code)>
|
||||
{
|
||||
static_assert(is_AsyncWriteStream<next_layer_type>::value,
|
||||
"AsyncWriteStream requirements not met");
|
||||
@@ -230,7 +230,7 @@ auto
|
||||
buffered_read_stream<Stream, DynamicBuffer>::
|
||||
async_read_some(MutableBufferSequence const& buffers,
|
||||
ReadHandler&& handler) ->
|
||||
BEAST_INITFN_RESULT_TYPE(ReadHandler, void(error_code))
|
||||
async_return_type<ReadHandler, void(error_code)>
|
||||
{
|
||||
static_assert(is_AsyncReadStream<next_layer_type>::value,
|
||||
"Stream requirements not met");
|
||||
@@ -239,8 +239,8 @@ async_read_some(MutableBufferSequence const& buffers,
|
||||
"MutableBufferSequence requirements not met");
|
||||
async_completion<ReadHandler,
|
||||
void(error_code, std::size_t)> init{handler};
|
||||
read_some_op<MutableBufferSequence, BEAST_HANDLER_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))>{
|
||||
read_some_op<MutableBufferSequence, handler_type<
|
||||
ReadHandler, void(error_code, std::size_t)>>{
|
||||
init.completion_handler, *this, buffers};
|
||||
return init.result.get();
|
||||
}
|
||||
|
@@ -575,8 +575,8 @@ template<
|
||||
class DynamicBuffer,
|
||||
bool isRequest, class Derived,
|
||||
class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code, std::size_t)>
|
||||
async_read_some(
|
||||
AsyncReadStream& stream,
|
||||
DynamicBuffer& dynabuf,
|
||||
@@ -590,15 +590,15 @@ async_read_some(
|
||||
case parse_state::header:
|
||||
case parse_state::chunk_header:
|
||||
detail::read_some_buffer_op<AsyncReadStream,
|
||||
DynamicBuffer, isRequest, true, Derived, BEAST_HANDLER_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))>{
|
||||
DynamicBuffer, isRequest, true, Derived, handler_type<
|
||||
ReadHandler, void(error_code, std::size_t)>>{
|
||||
init.completion_handler, stream, dynabuf, parser};
|
||||
break;
|
||||
|
||||
default:
|
||||
detail::read_some_body_op<AsyncReadStream,
|
||||
DynamicBuffer, isRequest, Derived, BEAST_HANDLER_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))>{
|
||||
DynamicBuffer, isRequest, Derived, handler_type<
|
||||
ReadHandler, void(error_code, std::size_t)>>{
|
||||
init.completion_handler, stream, dynabuf, parser};
|
||||
break;
|
||||
}
|
||||
@@ -611,8 +611,8 @@ template<
|
||||
bool isRequest, class Derived,
|
||||
class ReadHandler>
|
||||
inline
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code, std::size_t)>
|
||||
async_read_some(
|
||||
AsyncReadStream& stream,
|
||||
DynamicBuffer& dynabuf,
|
||||
@@ -622,8 +622,8 @@ async_read_some(
|
||||
async_completion<ReadHandler,
|
||||
void(error_code, std::size_t)> init{handler};
|
||||
detail::read_some_buffer_op<AsyncReadStream,
|
||||
DynamicBuffer, isRequest, false, Derived, BEAST_HANDLER_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))>{
|
||||
DynamicBuffer, isRequest, false, Derived, handler_type<
|
||||
ReadHandler, void(error_code, std::size_t)>>{
|
||||
init.completion_handler, stream, dynabuf, parser};
|
||||
return init.result.get();
|
||||
}
|
||||
@@ -637,8 +637,8 @@ template<
|
||||
class DynamicBuffer,
|
||||
bool isRequest, bool isDirect, class Derived,
|
||||
class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code, std::size_t)>
|
||||
async_read_some(
|
||||
AsyncReadStream& stream,
|
||||
DynamicBuffer& dynabuf,
|
||||
@@ -659,8 +659,8 @@ template<
|
||||
class DynamicBuffer,
|
||||
bool isRequest, bool isDirect, class Derived,
|
||||
class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code)>
|
||||
async_read(
|
||||
AsyncReadStream& stream,
|
||||
DynamicBuffer& dynabuf,
|
||||
@@ -675,8 +675,8 @@ async_read(
|
||||
async_completion<ReadHandler,
|
||||
void(error_code)> init{handler};
|
||||
detail::parse_op<AsyncReadStream, DynamicBuffer,
|
||||
isRequest, isDirect, Derived, BEAST_HANDLER_TYPE(
|
||||
ReadHandler, void(error_code))>{
|
||||
isRequest, isDirect, Derived, handler_type<
|
||||
ReadHandler, void(error_code)>>{
|
||||
init.completion_handler, stream, dynabuf, parser};
|
||||
return init.result.get();
|
||||
}
|
||||
@@ -686,8 +686,8 @@ template<
|
||||
class DynamicBuffer,
|
||||
bool isRequest, class Body, class Fields,
|
||||
class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code)>
|
||||
async_read(
|
||||
AsyncReadStream& stream,
|
||||
DynamicBuffer& dynabuf,
|
||||
@@ -708,8 +708,8 @@ async_read(
|
||||
async_completion<ReadHandler,
|
||||
void(error_code)> init{handler};
|
||||
detail::read_message_op<AsyncReadStream, DynamicBuffer,
|
||||
isRequest, Body, Fields, BEAST_HANDLER_TYPE(
|
||||
ReadHandler, void(error_code))>{
|
||||
isRequest, Body, Fields, handler_type<
|
||||
ReadHandler, void(error_code)>>{
|
||||
init.completion_handler, stream, dynabuf, msg};
|
||||
return init.result.get();
|
||||
}
|
||||
|
@@ -213,8 +213,8 @@ write(SyncWriteStream& stream,
|
||||
template<class AsyncWriteStream,
|
||||
bool isRequest, class Fields,
|
||||
class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
async_write(AsyncWriteStream& stream,
|
||||
header<isRequest, Fields> const& msg,
|
||||
WriteHandler&& handler)
|
||||
@@ -231,7 +231,7 @@ async_write(AsyncWriteStream& stream,
|
||||
os << "\r\n";
|
||||
}
|
||||
detail::write_streambuf_op<AsyncWriteStream,
|
||||
BEAST_HANDLER_TYPE(WriteHandler, void(error_code))>{
|
||||
handler_type<WriteHandler, void(error_code)>>{
|
||||
init.completion_handler, stream, std::move(b)};
|
||||
return init.result.get();
|
||||
}
|
||||
@@ -641,8 +641,8 @@ write(SyncWriteStream& stream,
|
||||
template<class AsyncWriteStream,
|
||||
bool isRequest, class Body, class Fields,
|
||||
class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
async_write(AsyncWriteStream& stream,
|
||||
message<isRequest, Body, Fields> const& msg,
|
||||
WriteHandler&& handler)
|
||||
@@ -658,8 +658,8 @@ async_write(AsyncWriteStream& stream,
|
||||
"Writer requirements not met");
|
||||
async_completion<WriteHandler,
|
||||
void(error_code)> init{handler};
|
||||
detail::write_op<AsyncWriteStream, BEAST_HANDLER_TYPE(
|
||||
WriteHandler, void(error_code)), isRequest,
|
||||
detail::write_op<AsyncWriteStream, handler_type<
|
||||
WriteHandler, void(error_code)>, isRequest,
|
||||
Body, Fields>{init.completion_handler, stream, msg};
|
||||
return init.result.get();
|
||||
}
|
||||
|
@@ -194,8 +194,8 @@ template<
|
||||
class DynamicBuffer,
|
||||
bool isRequest, bool isDirect, class Derived,
|
||||
class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code, std::size_t))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code, std::size_t)>
|
||||
async_read_some(
|
||||
AsyncReadStream& stream,
|
||||
DynamicBuffer& dynabuf,
|
||||
@@ -344,8 +344,8 @@ template<
|
||||
class DynamicBuffer,
|
||||
bool isRequest, bool isDirect, class Derived,
|
||||
class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code)>
|
||||
async_read(
|
||||
AsyncReadStream& stream,
|
||||
DynamicBuffer& dynabuf,
|
||||
@@ -499,8 +499,8 @@ template<
|
||||
class DynamicBuffer,
|
||||
bool isRequest, class Body, class Fields,
|
||||
class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code)>
|
||||
async_read(
|
||||
AsyncReadStream& stream,
|
||||
DynamicBuffer& dynabuf,
|
||||
|
@@ -121,8 +121,8 @@ write(SyncWriteStream& stream,
|
||||
template<class AsyncWriteStream,
|
||||
bool isRequest, class Fields,
|
||||
class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
async_write(AsyncWriteStream& stream,
|
||||
header<isRequest, Fields> const& msg,
|
||||
WriteHandler&& handler);
|
||||
@@ -236,8 +236,8 @@ write(SyncWriteStream& stream,
|
||||
template<class AsyncWriteStream,
|
||||
bool isRequest, class Body, class Fields,
|
||||
class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
async_write(AsyncWriteStream& stream,
|
||||
message<isRequest, Body, Fields> const& msg,
|
||||
WriteHandler&& handler);
|
||||
|
@@ -590,8 +590,8 @@ accept_ex(http::header<true, Fields> const& req,
|
||||
|
||||
template<class NextLayer>
|
||||
template<class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_accept(AcceptHandler&& handler)
|
||||
{
|
||||
@@ -601,15 +601,15 @@ async_accept(AcceptHandler&& handler)
|
||||
void(error_code)> init{handler};
|
||||
reset();
|
||||
accept_op<decltype(&default_decorate_res),
|
||||
BEAST_HANDLER_TYPE(AcceptHandler, void(error_code))>{
|
||||
handler_type<AcceptHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, &default_decorate_res};
|
||||
return init.result.get();
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class ResponseDecorator, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_accept_ex(ResponseDecorator const& decorator,
|
||||
AcceptHandler&& handler)
|
||||
@@ -622,16 +622,16 @@ async_accept_ex(ResponseDecorator const& decorator,
|
||||
async_completion<AcceptHandler,
|
||||
void(error_code)> init{handler};
|
||||
reset();
|
||||
accept_op<ResponseDecorator, BEAST_HANDLER_TYPE(
|
||||
AcceptHandler, void(error_code))>{
|
||||
accept_op<ResponseDecorator, handler_type<
|
||||
AcceptHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, decorator};
|
||||
return init.result.get();
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class ConstBufferSequence, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_accept(ConstBufferSequence const& buffers,
|
||||
AcceptHandler&& handler)
|
||||
@@ -645,7 +645,7 @@ async_accept(ConstBufferSequence const& buffers,
|
||||
void(error_code)> init{handler};
|
||||
reset();
|
||||
accept_op<decltype(&default_decorate_res),
|
||||
BEAST_HANDLER_TYPE(AcceptHandler, void(error_code))>{
|
||||
handler_type<AcceptHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, buffers, &default_decorate_res};
|
||||
return init.result.get();
|
||||
}
|
||||
@@ -653,8 +653,8 @@ async_accept(ConstBufferSequence const& buffers,
|
||||
template<class NextLayer>
|
||||
template<class ConstBufferSequence,
|
||||
class ResponseDecorator, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_accept_ex(ConstBufferSequence const& buffers,
|
||||
ResponseDecorator const& decorator,
|
||||
@@ -671,16 +671,16 @@ async_accept_ex(ConstBufferSequence const& buffers,
|
||||
async_completion<AcceptHandler,
|
||||
void(error_code)> init{handler};
|
||||
reset();
|
||||
accept_op<ResponseDecorator, BEAST_HANDLER_TYPE(
|
||||
AcceptHandler, void(error_code))>{
|
||||
accept_op<ResponseDecorator, handler_type<
|
||||
AcceptHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, buffers, decorator};
|
||||
return init.result.get();
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class Fields, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_accept(http::header<true, Fields> const& req,
|
||||
AcceptHandler&& handler)
|
||||
@@ -690,8 +690,8 @@ async_accept(http::header<true, Fields> const& req,
|
||||
async_completion<AcceptHandler,
|
||||
void(error_code)> init{handler};
|
||||
reset();
|
||||
response_op<BEAST_HANDLER_TYPE(
|
||||
AcceptHandler, void(error_code))>{init.completion_handler,
|
||||
response_op<handler_type<
|
||||
AcceptHandler, void(error_code)>>{init.completion_handler,
|
||||
*this, req, &default_decorate_res,
|
||||
beast_asio_helpers::is_continuation(
|
||||
init.completion_handler)};
|
||||
@@ -701,8 +701,8 @@ async_accept(http::header<true, Fields> const& req,
|
||||
template<class NextLayer>
|
||||
template<class Fields,
|
||||
class ResponseDecorator, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_accept_ex(http::header<true, Fields> const& req,
|
||||
ResponseDecorator const& decorator, AcceptHandler&& handler)
|
||||
@@ -715,8 +715,8 @@ async_accept_ex(http::header<true, Fields> const& req,
|
||||
async_completion<AcceptHandler,
|
||||
void(error_code)> init{handler};
|
||||
reset();
|
||||
response_op<BEAST_HANDLER_TYPE(
|
||||
AcceptHandler, void(error_code))>{
|
||||
response_op<handler_type<
|
||||
AcceptHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, req, decorator,
|
||||
beast_asio_helpers::is_continuation(
|
||||
init.completion_handler)};
|
||||
@@ -726,8 +726,8 @@ async_accept_ex(http::header<true, Fields> const& req,
|
||||
template<class NextLayer>
|
||||
template<class Fields,
|
||||
class ConstBufferSequence, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_accept(http::header<true, Fields> const& req,
|
||||
ConstBufferSequence const& buffers,
|
||||
@@ -741,8 +741,8 @@ async_accept(http::header<true, Fields> const& req,
|
||||
async_completion<AcceptHandler,
|
||||
void(error_code)> init{handler};
|
||||
reset();
|
||||
response_op<BEAST_HANDLER_TYPE(
|
||||
AcceptHandler, void(error_code))>{
|
||||
response_op<handler_type<
|
||||
AcceptHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, req, buffers,
|
||||
&default_decorate_res, beast_asio_helpers::
|
||||
is_continuation(init.completion_handler)};
|
||||
@@ -752,8 +752,8 @@ async_accept(http::header<true, Fields> const& req,
|
||||
template<class NextLayer>
|
||||
template<class Fields, class ConstBufferSequence,
|
||||
class ResponseDecorator, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_accept_ex(http::header<true, Fields> const& req,
|
||||
ConstBufferSequence const& buffers,
|
||||
@@ -771,8 +771,8 @@ async_accept_ex(http::header<true, Fields> const& req,
|
||||
async_completion<AcceptHandler,
|
||||
void(error_code)> init{handler};
|
||||
reset();
|
||||
response_op<BEAST_HANDLER_TYPE(
|
||||
AcceptHandler, void(error_code))>{init.completion_handler,
|
||||
response_op<handler_type<
|
||||
AcceptHandler, void(error_code)>>{init.completion_handler,
|
||||
*this, req, buffers, decorator,
|
||||
beast_asio_helpers::is_continuation(
|
||||
init.completion_handler)};
|
||||
|
@@ -197,8 +197,8 @@ upcall:
|
||||
|
||||
template<class NextLayer>
|
||||
template<class CloseHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
CloseHandler, void(error_code))
|
||||
async_return_type<
|
||||
CloseHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_close(close_reason const& cr, CloseHandler&& handler)
|
||||
{
|
||||
@@ -206,8 +206,8 @@ async_close(close_reason const& cr, CloseHandler&& handler)
|
||||
"AsyncStream requirements not met");
|
||||
async_completion<CloseHandler,
|
||||
void(error_code)> init{handler};
|
||||
close_op<BEAST_HANDLER_TYPE(
|
||||
CloseHandler, void(error_code))>{
|
||||
close_op<handler_type<
|
||||
CloseHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, cr};
|
||||
return init.result.get();
|
||||
}
|
||||
|
@@ -160,8 +160,8 @@ operator()(error_code ec, bool again)
|
||||
|
||||
template<class NextLayer>
|
||||
template<class HandshakeHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
HandshakeHandler, void(error_code))
|
||||
async_return_type<
|
||||
HandshakeHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_handshake(string_view const& host,
|
||||
string_view const& target,
|
||||
@@ -171,8 +171,8 @@ async_handshake(string_view const& host,
|
||||
"AsyncStream requirements not met");
|
||||
async_completion<HandshakeHandler,
|
||||
void(error_code)> init{handler};
|
||||
handshake_op<BEAST_HANDLER_TYPE(
|
||||
HandshakeHandler, void(error_code))>{
|
||||
handshake_op<handler_type<
|
||||
HandshakeHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, nullptr, host,
|
||||
target, &default_decorate_req};
|
||||
return init.result.get();
|
||||
@@ -180,8 +180,8 @@ async_handshake(string_view const& host,
|
||||
|
||||
template<class NextLayer>
|
||||
template<class HandshakeHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
HandshakeHandler, void(error_code))
|
||||
async_return_type<
|
||||
HandshakeHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_handshake(response_type& res,
|
||||
string_view const& host,
|
||||
@@ -192,8 +192,8 @@ async_handshake(response_type& res,
|
||||
"AsyncStream requirements not met");
|
||||
async_completion<HandshakeHandler,
|
||||
void(error_code)> init{handler};
|
||||
handshake_op<BEAST_HANDLER_TYPE(
|
||||
HandshakeHandler, void(error_code))>{
|
||||
handshake_op<handler_type<
|
||||
HandshakeHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, &res, host,
|
||||
target, &default_decorate_req};
|
||||
return init.result.get();
|
||||
@@ -201,8 +201,8 @@ async_handshake(response_type& res,
|
||||
|
||||
template<class NextLayer>
|
||||
template<class RequestDecorator, class HandshakeHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
HandshakeHandler, void(error_code))
|
||||
async_return_type<
|
||||
HandshakeHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_handshake_ex(string_view const& host,
|
||||
string_view const& target,
|
||||
@@ -216,8 +216,8 @@ async_handshake_ex(string_view const& host,
|
||||
"RequestDecorator requirements not met");
|
||||
async_completion<HandshakeHandler,
|
||||
void(error_code)> init{handler};
|
||||
handshake_op<BEAST_HANDLER_TYPE(
|
||||
HandshakeHandler, void(error_code))>{
|
||||
handshake_op<handler_type<
|
||||
HandshakeHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, nullptr, host,
|
||||
target, decorator};
|
||||
return init.result.get();
|
||||
@@ -225,8 +225,8 @@ async_handshake_ex(string_view const& host,
|
||||
|
||||
template<class NextLayer>
|
||||
template<class RequestDecorator, class HandshakeHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
HandshakeHandler, void(error_code))
|
||||
async_return_type<
|
||||
HandshakeHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_handshake_ex(response_type& res,
|
||||
string_view const& host,
|
||||
@@ -241,8 +241,8 @@ async_handshake_ex(response_type& res,
|
||||
"RequestDecorator requirements not met");
|
||||
async_completion<HandshakeHandler,
|
||||
void(error_code)> init{handler};
|
||||
handshake_op<BEAST_HANDLER_TYPE(
|
||||
HandshakeHandler, void(error_code))>{
|
||||
handshake_op<handler_type<
|
||||
HandshakeHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, &res, host,
|
||||
target, decorator};
|
||||
return init.result.get();
|
||||
|
@@ -195,8 +195,8 @@ upcall:
|
||||
|
||||
template<class NextLayer>
|
||||
template<class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_ping(ping_data const& payload, WriteHandler&& handler)
|
||||
{
|
||||
@@ -204,16 +204,16 @@ async_ping(ping_data const& payload, WriteHandler&& handler)
|
||||
"AsyncStream requirements requirements not met");
|
||||
async_completion<WriteHandler,
|
||||
void(error_code)> init{handler};
|
||||
ping_op<BEAST_HANDLER_TYPE(
|
||||
WriteHandler, void(error_code))>{
|
||||
ping_op<handler_type<
|
||||
WriteHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, opcode::ping, payload};
|
||||
return init.result.get();
|
||||
}
|
||||
|
||||
template<class NextLayer>
|
||||
template<class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_pong(ping_data const& payload, WriteHandler&& handler)
|
||||
{
|
||||
@@ -221,8 +221,8 @@ async_pong(ping_data const& payload, WriteHandler&& handler)
|
||||
"AsyncStream requirements requirements not met");
|
||||
async_completion<WriteHandler,
|
||||
void(error_code)> init{handler};
|
||||
ping_op<BEAST_HANDLER_TYPE(
|
||||
WriteHandler, void(error_code))>{
|
||||
ping_op<handler_type<
|
||||
WriteHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, opcode::pong, payload};
|
||||
return init.result.get();
|
||||
}
|
||||
|
@@ -686,8 +686,8 @@ upcall:
|
||||
|
||||
template<class NextLayer>
|
||||
template<class DynamicBuffer, class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_read_frame(frame_info& fi,
|
||||
DynamicBuffer& dynabuf, ReadHandler&& handler)
|
||||
@@ -698,8 +698,8 @@ async_read_frame(frame_info& fi,
|
||||
"DynamicBuffer requirements not met");
|
||||
async_completion<ReadHandler,
|
||||
void(error_code)> init{handler};
|
||||
read_frame_op<DynamicBuffer, BEAST_HANDLER_TYPE(
|
||||
ReadHandler, void(error_code))>{init.completion_handler,
|
||||
read_frame_op<DynamicBuffer, handler_type<
|
||||
ReadHandler, void(error_code)>>{init.completion_handler,
|
||||
*this, fi, dynabuf};
|
||||
return init.result.get();
|
||||
}
|
||||
@@ -1098,8 +1098,8 @@ upcall:
|
||||
|
||||
template<class NextLayer>
|
||||
template<class DynamicBuffer, class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_read(opcode& op,
|
||||
DynamicBuffer& dynabuf, ReadHandler&& handler)
|
||||
@@ -1110,8 +1110,8 @@ async_read(opcode& op,
|
||||
"DynamicBuffer requirements not met");
|
||||
async_completion<ReadHandler,
|
||||
void(error_code)> init{handler};
|
||||
read_op<DynamicBuffer, BEAST_HANDLER_TYPE(
|
||||
ReadHandler, void(error_code))>{init.completion_handler,
|
||||
read_op<DynamicBuffer, handler_type<
|
||||
ReadHandler, void(error_code)>>{init.completion_handler,
|
||||
*this, op, dynabuf};
|
||||
return init.result.get();
|
||||
}
|
||||
|
@@ -545,8 +545,8 @@ upcall:
|
||||
|
||||
template<class NextLayer>
|
||||
template<class ConstBufferSequence, class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_write_frame(bool fin,
|
||||
ConstBufferSequence const& bs, WriteHandler&& handler)
|
||||
@@ -558,8 +558,8 @@ async_write_frame(bool fin,
|
||||
"ConstBufferSequence requirements not met");
|
||||
async_completion<WriteHandler,
|
||||
void(error_code)> init{handler};
|
||||
write_frame_op<ConstBufferSequence, BEAST_HANDLER_TYPE(
|
||||
WriteHandler, void(error_code))>{init.completion_handler,
|
||||
write_frame_op<ConstBufferSequence, handler_type<
|
||||
WriteHandler, void(error_code)>>{init.completion_handler,
|
||||
*this, fin, bs};
|
||||
return init.result.get();
|
||||
}
|
||||
@@ -895,8 +895,8 @@ operator()(error_code ec, bool again)
|
||||
|
||||
template<class NextLayer>
|
||||
template<class ConstBufferSequence, class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
stream<NextLayer>::
|
||||
async_write(ConstBufferSequence const& bs, WriteHandler&& handler)
|
||||
{
|
||||
@@ -907,8 +907,8 @@ async_write(ConstBufferSequence const& bs, WriteHandler&& handler)
|
||||
"ConstBufferSequence requirements not met");
|
||||
async_completion<WriteHandler,
|
||||
void(error_code)> init{handler};
|
||||
write_op<ConstBufferSequence, BEAST_HANDLER_TYPE(
|
||||
WriteHandler, void(error_code))>{
|
||||
write_op<ConstBufferSequence, handler_type<
|
||||
WriteHandler, void(error_code)>>{
|
||||
init.completion_handler, *this, bs};
|
||||
return init.result.get();
|
||||
}
|
||||
|
@@ -970,8 +970,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
async_accept(AcceptHandler&& handler);
|
||||
|
||||
/** Start reading and responding to a WebSocket HTTP Upgrade request.
|
||||
@@ -1025,8 +1025,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class ResponseDecorator, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
async_accept_ex(ResponseDecorator const& decorator,
|
||||
AcceptHandler&& handler);
|
||||
|
||||
@@ -1079,8 +1079,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class ConstBufferSequence, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
async_accept(ConstBufferSequence const& buffers,
|
||||
AcceptHandler&& handler);
|
||||
|
||||
@@ -1143,8 +1143,8 @@ public:
|
||||
*/
|
||||
template<class ConstBufferSequence,
|
||||
class ResponseDecorator, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
async_accept_ex(ConstBufferSequence const& buffers,
|
||||
ResponseDecorator const& decorator,
|
||||
AcceptHandler&& handler);
|
||||
@@ -1195,8 +1195,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class Fields, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
async_accept(http::header<true, Fields> const& req,
|
||||
AcceptHandler&& handler);
|
||||
|
||||
@@ -1256,8 +1256,8 @@ public:
|
||||
*/
|
||||
template<class Fields,
|
||||
class ResponseDecorator, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
async_accept_ex(http::header<true, Fields> const& req,
|
||||
ResponseDecorator const& decorator,
|
||||
AcceptHandler&& handler);
|
||||
@@ -1316,8 +1316,8 @@ public:
|
||||
*/
|
||||
template<class Fields,
|
||||
class ConstBufferSequence, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
async_accept(http::header<true, Fields> const& req,
|
||||
ConstBufferSequence const& buffers,
|
||||
AcceptHandler&& handler);
|
||||
@@ -1385,8 +1385,8 @@ public:
|
||||
*/
|
||||
template<class Fields, class ConstBufferSequence,
|
||||
class ResponseDecorator, class AcceptHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
AcceptHandler, void(error_code))
|
||||
async_return_type<
|
||||
AcceptHandler, void(error_code)>
|
||||
async_accept_ex(http::header<true, Fields> const& req,
|
||||
ConstBufferSequence const& buffers,
|
||||
ResponseDecorator const& decorator,
|
||||
@@ -1863,8 +1863,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class HandshakeHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
HandshakeHandler, void(error_code))
|
||||
async_return_type<
|
||||
HandshakeHandler, void(error_code)>
|
||||
async_handshake(string_view const& host,
|
||||
string_view const& target,
|
||||
HandshakeHandler&& handler);
|
||||
@@ -1915,8 +1915,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class HandshakeHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
HandshakeHandler, void(error_code))
|
||||
async_return_type<
|
||||
HandshakeHandler, void(error_code)>
|
||||
async_handshake(response_type& res,
|
||||
string_view const& host,
|
||||
string_view const& target,
|
||||
@@ -1973,8 +1973,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class RequestDecorator, class HandshakeHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
HandshakeHandler, void(error_code))
|
||||
async_return_type<
|
||||
HandshakeHandler, void(error_code)>
|
||||
async_handshake_ex(string_view const& host,
|
||||
string_view const& target,
|
||||
RequestDecorator const& decorator,
|
||||
@@ -2035,8 +2035,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class RequestDecorator, class HandshakeHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
HandshakeHandler, void(error_code))
|
||||
async_return_type<
|
||||
HandshakeHandler, void(error_code)>
|
||||
async_handshake_ex(response_type& res,
|
||||
string_view const& host,
|
||||
string_view const& target,
|
||||
@@ -2145,8 +2145,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class CloseHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
CloseHandler, void(error_code))
|
||||
async_return_type<
|
||||
CloseHandler, void(error_code)>
|
||||
async_close(close_reason const& cr, CloseHandler&& handler);
|
||||
|
||||
/** Send a WebSocket ping frame.
|
||||
@@ -2223,8 +2223,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
async_ping(ping_data const& payload, WriteHandler&& handler);
|
||||
|
||||
/** Send a WebSocket pong frame.
|
||||
@@ -2316,8 +2316,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
async_pong(ping_data const& payload, WriteHandler&& handler);
|
||||
|
||||
/** Read a message from the stream.
|
||||
@@ -2460,8 +2460,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class DynamicBuffer, class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code)>
|
||||
async_read(opcode& op, DynamicBuffer& dynabuf, ReadHandler&& handler);
|
||||
|
||||
/** Read a message frame from the stream.
|
||||
@@ -2614,8 +2614,8 @@ public:
|
||||
manner equivalent to using boost::asio::io_service::post().
|
||||
*/
|
||||
template<class DynamicBuffer, class ReadHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
ReadHandler, void(error_code))
|
||||
async_return_type<
|
||||
ReadHandler, void(error_code)>
|
||||
async_read_frame(frame_info& fi,
|
||||
DynamicBuffer& dynabuf, ReadHandler&& handler);
|
||||
|
||||
@@ -2736,8 +2736,8 @@ public:
|
||||
manner equivalent to using `boost::asio::io_service::post`.
|
||||
*/
|
||||
template<class ConstBufferSequence, class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
async_write(ConstBufferSequence const& buffers,
|
||||
WriteHandler&& handler);
|
||||
|
||||
@@ -2848,8 +2848,8 @@ public:
|
||||
); @endcode
|
||||
*/
|
||||
template<class ConstBufferSequence, class WriteHandler>
|
||||
BEAST_INITFN_RESULT_TYPE(
|
||||
WriteHandler, void(error_code))
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
async_write_frame(bool fin,
|
||||
ConstBufferSequence const& buffers, WriteHandler&& handler);
|
||||
|
||||
|
Reference in New Issue
Block a user