11 #ifndef ASIO_DETAIL_WINRT_SOCKET_RECV_OP_HPP 12 #define ASIO_DETAIL_WINRT_SOCKET_RECV_OP_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_WINDOWS_RUNTIME) 36 template <
typename MutableBufferSequence,
typename Handler>
37 class winrt_socket_recv_op :
38 public winrt_async_op<Windows::Storage::Streams::IBuffer^>
43 winrt_socket_recv_op(
const MutableBufferSequence&
buffers, Handler& handler)
44 : winrt_async_op<Windows::Storage::Streams::IBuffer^>(
45 &winrt_socket_recv_op::do_complete),
55 winrt_socket_recv_op* o(static_cast<winrt_socket_recv_op*>(base));
56 ptr p = { asio::detail::addressof(o->handler_), o, o };
60 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING) 65 MutableBufferSequence>::validate(o->buffers_);
67 #endif // defined(ASIO_ENABLE_BUFFER_DEBUGGING) 69 std::size_t bytes_transferred = o->result_ ? o->result_->Length : 0;
70 if (bytes_transferred == 0 && !o->ec_ &&
72 MutableBufferSequence>::all_empty(o->buffers_))
83 detail::binder2<Handler, asio::error_code, std::size_t>
84 handler(o->handler_, o->ec_, bytes_transferred);
85 p.h = asio::detail::addressof(handler.handler_);
99 MutableBufferSequence buffers_;
108 #endif // defined(ASIO_WINDOWS_RUNTIME) 110 #endif // ASIO_DETAIL_WINRT_SOCKET_RECV_OP_HPP
#define ASIO_HANDLER_INVOCATION_END
asio::basic_streambuf< Allocator > & b
null_fenced_block fenced_block
class task_io_service io_service_impl
void invoke(Function &function, Context &context)
const MutableBufferSequence & buffers
Holds a buffer that can be modified.
#define ASIO_HANDLER_INVOCATION_BEGIN(args)
Class to represent an error code value.
task_io_service_operation operation
#define ASIO_DEFINE_HANDLER_PTR(op)
#define ASIO_HANDLER_COMPLETION(args)
#define ASIO_MOVE_CAST(type)