11 #ifndef ASIO_DETAIL_WIN_IOCP_SOCKET_RECVFROM_OP_HPP 12 #define ASIO_DETAIL_WIN_IOCP_SOCKET_RECVFROM_OP_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_HAS_IOCP) 37 template <
typename MutableBufferSequence,
typename Endpo
int,
typename Handler>
38 class win_iocp_socket_recvfrom_op :
public operation 43 win_iocp_socket_recvfrom_op(Endpoint& endpoint,
45 const MutableBufferSequence&
buffers, Handler& handler)
46 :
operation(&win_iocp_socket_recvfrom_op::do_complete),
48 endpoint_size_(static_cast<int>(endpoint.capacity())),
49 cancel_token_(cancel_token),
57 return endpoint_size_;
62 std::size_t bytes_transferred)
67 win_iocp_socket_recvfrom_op* o(
68 static_cast<win_iocp_socket_recvfrom_op*>(base));
69 ptr p = { asio::detail::addressof(o->handler_), o, o };
73 #if defined(ASIO_ENABLE_BUFFER_DEBUGGING) 78 MutableBufferSequence>::validate(o->buffers_);
80 #endif // defined(ASIO_ENABLE_BUFFER_DEBUGGING) 82 socket_ops::complete_iocp_recvfrom(o->cancel_token_, ec);
85 o->endpoint_.resize(o->endpoint_size_);
93 detail::binder2<Handler, asio::error_code, std::size_t>
94 handler(o->handler_, ec, bytes_transferred);
95 p.h = asio::detail::addressof(handler.handler_);
112 MutableBufferSequence buffers_;
121 #endif // defined(ASIO_HAS_IOCP) 123 #endif // ASIO_DETAIL_WIN_IOCP_SOCKET_RECVFROM_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)
weak_ptr< void > weak_cancel_token_type
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)