#include <boost/asio/detail/handler_alloc_helpers.hpp>
#include <boost/asio/detail/handler_cont_helpers.hpp>
#include <boost/asio/detail/handler_invoke_helpers.hpp>
+#include <boost/asio/detail/handler_tracking.hpp>
#include <boost/asio/detail/handler_type_requirements.hpp>
#include <boost/asio/detail/non_const_lvalue.hpp>
#include <boost/asio/detail/throw_error.hpp>
else
break;
}
- return tmp.total_consumed();;
+ return tmp.total_consumed();
}
} // namespace detail
max_size = this->check_for_completion(ec, buffers_.total_consumed());
do
{
- stream_.async_write_some(buffers_.prepare(max_size),
- BOOST_ASIO_MOVE_CAST(write_op)(*this));
+ {
+ BOOST_ASIO_HANDLER_LOCATION((__FILE__, __LINE__, "async_write"));
+ stream_.async_write_some(buffers_.prepare(max_size),
+ BOOST_ASIO_MOVE_CAST(write_op)(*this));
+ }
return; default:
buffers_.consume(bytes_transferred);
if ((!ec && bytes_transferred == 0) || buffers_.empty())
template <typename AsyncWriteStream, typename ConstBufferSequence,
typename ConstBufferIterator, typename CompletionCondition,
typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
+ inline asio_handler_allocate_is_deprecated
+ asio_handler_allocate(std::size_t size,
write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
CompletionCondition, WriteHandler>* this_handler)
{
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
+ return asio_handler_allocate_is_no_longer_used();
+#else // defined(BOOST_ASIO_NO_DEPRECATED)
return boost_asio_handler_alloc_helpers::allocate(
size, this_handler->handler_);
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename AsyncWriteStream, typename ConstBufferSequence,
typename ConstBufferIterator, typename CompletionCondition,
typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ inline asio_handler_deallocate_is_deprecated
+ asio_handler_deallocate(void* pointer, std::size_t size,
write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
CompletionCondition, WriteHandler>* this_handler)
{
boost_asio_handler_alloc_helpers::deallocate(
pointer, size, this_handler->handler_);
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ return asio_handler_deallocate_is_no_longer_used();
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename AsyncWriteStream, typename ConstBufferSequence,
template <typename Function, typename AsyncWriteStream,
typename ConstBufferSequence, typename ConstBufferIterator,
typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
+ inline asio_handler_invoke_is_deprecated
+ asio_handler_invoke(Function& function,
write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
CompletionCondition, WriteHandler>* this_handler)
{
boost_asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ return asio_handler_invoke_is_no_longer_used();
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename Function, typename AsyncWriteStream,
typename ConstBufferSequence, typename ConstBufferIterator,
typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
+ inline asio_handler_invoke_is_deprecated
+ asio_handler_invoke(const Function& function,
write_op<AsyncWriteStream, ConstBufferSequence, ConstBufferIterator,
CompletionCondition, WriteHandler>* this_handler)
{
boost_asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ return asio_handler_invoke_is_no_longer_used();
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename AsyncWriteStream, typename ConstBufferSequence,
detail::write_op<AsyncWriteStream, ConstBufferSequence,
ConstBufferIterator, CompletionCondition, WriteHandler>,
Executor>
+ : detail::associated_executor_forwarding_base<WriteHandler, Executor>
{
typedef typename associated_executor<WriteHandler, Executor>::type type;
template <typename AsyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition, typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
+ inline asio_handler_allocate_is_deprecated
+ asio_handler_allocate(std::size_t size,
write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
CompletionCondition, WriteHandler>* this_handler)
{
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
+ return asio_handler_allocate_is_no_longer_used();
+#else // defined(BOOST_ASIO_NO_DEPRECATED)
return boost_asio_handler_alloc_helpers::allocate(
size, this_handler->handler_);
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename AsyncWriteStream, typename DynamicBuffer_v1,
typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ inline asio_handler_deallocate_is_deprecated
+ asio_handler_deallocate(void* pointer, std::size_t size,
write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
CompletionCondition, WriteHandler>* this_handler)
{
boost_asio_handler_alloc_helpers::deallocate(
pointer, size, this_handler->handler_);
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ return asio_handler_deallocate_is_no_longer_used();
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename AsyncWriteStream, typename DynamicBuffer_v1,
template <typename Function, typename AsyncWriteStream,
typename DynamicBuffer_v1, typename CompletionCondition,
typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
+ inline asio_handler_invoke_is_deprecated
+ asio_handler_invoke(Function& function,
write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
CompletionCondition, WriteHandler>* this_handler)
{
boost_asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ return asio_handler_invoke_is_no_longer_used();
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename Function, typename AsyncWriteStream,
typename DynamicBuffer_v1, typename CompletionCondition,
typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
+ inline asio_handler_invoke_is_deprecated
+ asio_handler_invoke(const Function& function,
write_dynbuf_v1_op<AsyncWriteStream, DynamicBuffer_v1,
CompletionCondition, WriteHandler>* this_handler)
{
boost_asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ return asio_handler_invoke_is_no_longer_used();
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename AsyncWriteStream>
detail::write_dynbuf_v1_op<AsyncWriteStream,
DynamicBuffer_v1, CompletionCondition, WriteHandler>,
Executor>
+ : detail::associated_executor_forwarding_base<WriteHandler, Executor>
{
typedef typename associated_executor<WriteHandler, Executor>::type type;
template <typename AsyncWriteStream, typename DynamicBuffer_v2,
typename CompletionCondition, typename WriteHandler>
- inline void* asio_handler_allocate(std::size_t size,
+ inline asio_handler_allocate_is_deprecated
+ asio_handler_allocate(std::size_t size,
write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
CompletionCondition, WriteHandler>* this_handler)
{
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ boost_asio_handler_alloc_helpers::allocate(size, this_handler->handler_);
+ return asio_handler_allocate_is_no_longer_used();
+#else // defined(BOOST_ASIO_NO_DEPRECATED)
return boost_asio_handler_alloc_helpers::allocate(
size, this_handler->handler_);
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename AsyncWriteStream, typename DynamicBuffer_v2,
typename CompletionCondition, typename WriteHandler>
- inline void asio_handler_deallocate(void* pointer, std::size_t size,
+ inline asio_handler_deallocate_is_deprecated
+ asio_handler_deallocate(void* pointer, std::size_t size,
write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
CompletionCondition, WriteHandler>* this_handler)
{
boost_asio_handler_alloc_helpers::deallocate(
pointer, size, this_handler->handler_);
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ return asio_handler_deallocate_is_no_longer_used();
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename AsyncWriteStream, typename DynamicBuffer_v2,
template <typename Function, typename AsyncWriteStream,
typename DynamicBuffer_v2, typename CompletionCondition,
typename WriteHandler>
- inline void asio_handler_invoke(Function& function,
+ inline asio_handler_invoke_is_deprecated
+ asio_handler_invoke(Function& function,
write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
CompletionCondition, WriteHandler>* this_handler)
{
boost_asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ return asio_handler_invoke_is_no_longer_used();
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename Function, typename AsyncWriteStream,
typename DynamicBuffer_v2, typename CompletionCondition,
typename WriteHandler>
- inline void asio_handler_invoke(const Function& function,
+ inline asio_handler_invoke_is_deprecated
+ asio_handler_invoke(const Function& function,
write_dynbuf_v2_op<AsyncWriteStream, DynamicBuffer_v2,
CompletionCondition, WriteHandler>* this_handler)
{
boost_asio_handler_invoke_helpers::invoke(
function, this_handler->handler_);
+#if defined(BOOST_ASIO_NO_DEPRECATED)
+ return asio_handler_invoke_is_no_longer_used();
+#endif // defined(BOOST_ASIO_NO_DEPRECATED)
}
template <typename AsyncWriteStream>
detail::write_dynbuf_v2_op<AsyncWriteStream,
DynamicBuffer_v2, CompletionCondition, WriteHandler>,
Executor>
+ : detail::associated_executor_forwarding_base<WriteHandler, Executor>
{
typedef typename associated_executor<WriteHandler, Executor>::type type;