11 #ifndef ASIO_DETAIL_WIN_IOCP_OVERLAPPED_PTR_HPP 12 #define ASIO_DETAIL_WIN_IOCP_OVERLAPPED_PTR_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_HAS_IOCP) 35 class win_iocp_overlapped_ptr
40 win_iocp_overlapped_ptr()
47 template <
typename Handler>
48 explicit win_iocp_overlapped_ptr(
57 ~win_iocp_overlapped_ptr()
69 iocp_service_->work_finished();
76 template <
typename Handler>
79 typedef win_iocp_overlapped_op<Handler> op;
80 typename op::ptr p = { asio::detail::addressof(handler),
82 sizeof(op), handler), 0 };
83 p.p =
new (p.v) op(handler);
86 &io_service.impl_,
"overlapped"));
88 io_service.impl_.work_started();
92 iocp_service_ = &io_service.impl_;
102 const OVERLAPPED*
get()
const 108 OVERLAPPED* release()
111 iocp_service_->on_pending(ptr_);
113 OVERLAPPED* tmp = ptr_;
121 std::size_t bytes_transferred)
125 iocp_service_->on_completion(ptr_, ec,
126 static_cast<DWORD>(bytes_transferred));
133 win_iocp_operation* ptr_;
134 win_iocp_io_service* iocp_service_;
142 #endif // defined(ASIO_HAS_IOCP) 144 #endif // ASIO_DETAIL_WIN_IOCP_OVERLAPPED_PTR_HPP Provides core I/O functionality.
asio::basic_streambuf< Allocator > CompletionCondition ASIO_MOVE_ARG(ReadHandler) handler)
Class to represent an error code value.
void * allocate(std::size_t s, Handler &h)
#define ASIO_MOVE_CAST(type)
#define ASIO_HANDLER_CREATION(args)