mirror of
https://github.com/boostorg/beast.git
synced 2025-07-29 20:37:31 +02:00
async_write requires a non-const message:
This is necessary to meet the requirements for asynchronous operations: http://www.boost.org/doc/libs/1_64_0/doc/html/boost_asio/reference/asynchronous_operations.html Specifically, that the caller must ensure the validity of the message argument until the handler is invoked. object
This commit is contained in:
@ -5,6 +5,8 @@ Version 64:
|
||||
* Simplify websocket write_op
|
||||
* Exemplars are compiled code
|
||||
* Better User-Agent in examples
|
||||
* async_write requires a non-const message
|
||||
* Doc tidying
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
@ -359,7 +359,7 @@ class write_msg_op
|
||||
Body, Fields, no_chunk_decorator> sr;
|
||||
|
||||
data(Handler& h, Stream& s_, message<
|
||||
isRequest, Body, Fields> const& m_)
|
||||
isRequest, Body, Fields>& m_)
|
||||
: s(s_)
|
||||
, sr(m_, no_chunk_decorator{})
|
||||
{
|
||||
@ -766,7 +766,7 @@ template<class AsyncWriteStream,
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
async_write(AsyncWriteStream& stream,
|
||||
message<isRequest, Body, Fields> const& msg,
|
||||
message<isRequest, Body, Fields>& msg,
|
||||
WriteHandler&& handler)
|
||||
{
|
||||
static_assert(
|
||||
|
@ -488,7 +488,7 @@ template<class AsyncWriteStream,
|
||||
async_return_type<
|
||||
WriteHandler, void(error_code)>
|
||||
async_write(AsyncWriteStream& stream,
|
||||
message<isRequest, Body, Fields> const& msg,
|
||||
message<isRequest, Body, Fields>& msg,
|
||||
WriteHandler&& handler);
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user