* std::vector.
*/
template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteHandler
+ BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
+ typename AsyncWriteStream::executor_type)>
+BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
void (boost::system::error_code, std::size_t))
async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler
+ BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(
+ typename AsyncWriteStream::executor_type),
typename enable_if<
is_const_buffer_sequence<ConstBufferSequence>::value
>::type* = 0);
* buffers in one go, and how to use it with arrays, boost::array or
* std::vector.
*/
-template <typename AsyncWriteStream, typename ConstBufferSequence,
- typename CompletionCondition, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+template <typename AsyncWriteStream,
+ typename ConstBufferSequence, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteHandler>
+BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
void (boost::system::error_code, std::size_t))
async_write(AsyncWriteStream& s, const ConstBufferSequence& buffers,
CompletionCondition completion_condition,
* immediate completion, invocation of the handler will be performed in a
* manner equivalent to using boost::asio::post().
*/
-template <typename AsyncWriteStream,
- typename DynamicBuffer_v1, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+template <typename AsyncWriteStream, typename DynamicBuffer_v1,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteHandler
+ BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
+ typename AsyncWriteStream::executor_type)>
+BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
void (boost::system::error_code, std::size_t))
async_write(AsyncWriteStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler
+ BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(
+ typename AsyncWriteStream::executor_type),
typename enable_if<
is_dynamic_buffer_v1<typename decay<DynamicBuffer_v1>::type>::value
&& !is_dynamic_buffer_v2<typename decay<DynamicBuffer_v1>::type>::value
* immediate completion, invocation of the handler will be performed in a
* manner equivalent to using boost::asio::post().
*/
-template <typename AsyncWriteStream, typename DynamicBuffer_v1,
- typename CompletionCondition, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v1, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteHandler>
+BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
void (boost::system::error_code, std::size_t))
async_write(AsyncWriteStream& s,
BOOST_ASIO_MOVE_ARG(DynamicBuffer_v1) buffers,
* immediate completion, invocation of the handler will be performed in a
* manner equivalent to using boost::asio::post().
*/
-template <typename AsyncWriteStream, typename Allocator, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+template <typename AsyncWriteStream, typename Allocator,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteHandler
+ BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
+ typename AsyncWriteStream::executor_type)>
+BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
void (boost::system::error_code, std::size_t))
async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler);
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler
+ BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(
+ typename AsyncWriteStream::executor_type));
/// Start an asynchronous operation to write a certain amount of data to a
/// stream.
* immediate completion, invocation of the handler will be performed in a
* manner equivalent to using boost::asio::post().
*/
-template <typename AsyncWriteStream, typename Allocator,
- typename CompletionCondition, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+template <typename AsyncWriteStream,
+ typename Allocator, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteHandler>
+BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
void (boost::system::error_code, std::size_t))
async_write(AsyncWriteStream& s, basic_streambuf<Allocator>& b,
CompletionCondition completion_condition,
* immediate completion, invocation of the handler will be performed in a
* manner equivalent to using boost::asio::post().
*/
-template <typename AsyncWriteStream,
- typename DynamicBuffer_v2, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+template <typename AsyncWriteStream, typename DynamicBuffer_v2,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteHandler
+ BOOST_ASIO_DEFAULT_COMPLETION_TOKEN_TYPE(
+ typename AsyncWriteStream::executor_type)>
+BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
void (boost::system::error_code, std::size_t))
async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
- BOOST_ASIO_MOVE_ARG(WriteHandler) handler,
+ BOOST_ASIO_MOVE_ARG(WriteHandler) handler
+ BOOST_ASIO_DEFAULT_COMPLETION_TOKEN(
+ typename AsyncWriteStream::executor_type),
typename enable_if<
is_dynamic_buffer_v2<DynamicBuffer_v2>::value
>::type* = 0);
* immediate completion, invocation of the handler will be performed in a
* manner equivalent to using boost::asio::post().
*/
-template <typename AsyncWriteStream, typename DynamicBuffer_v2,
- typename CompletionCondition, typename WriteHandler>
-BOOST_ASIO_INITFN_RESULT_TYPE(WriteHandler,
+template <typename AsyncWriteStream,
+ typename DynamicBuffer_v2, typename CompletionCondition,
+ BOOST_ASIO_COMPLETION_TOKEN_FOR(void (boost::system::error_code,
+ std::size_t)) WriteHandler>
+BOOST_ASIO_INITFN_AUTO_RESULT_TYPE(WriteHandler,
void (boost::system::error_code, std::size_t))
async_write(AsyncWriteStream& s, DynamicBuffer_v2 buffers,
CompletionCondition completion_condition,