11 #ifndef ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_SERVICE_HPP 12 #define ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_SERVICE_HPP 14 #if defined(_MSC_VER) && (_MSC_VER >= 1200) 16 #endif // defined(_MSC_VER) && (_MSC_VER >= 1200) 20 #if defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) \ 21 || defined(GENERATING_DOCUMENTATION) 36 class random_access_handle_service
37 #if defined(GENERATING_DOCUMENTATION)
44 #if defined(GENERATING_DOCUMENTATION) 51 typedef detail::win_iocp_handle_service service_impl_type;
55 #if defined(GENERATING_DOCUMENTATION) 56 typedef implementation_defined implementation_type;
58 typedef service_impl_type::implementation_type implementation_type;
62 #if defined(GENERATING_DOCUMENTATION) 63 typedef implementation_defined native_type;
65 typedef service_impl_type::native_handle_type native_type;
69 #if defined(GENERATING_DOCUMENTATION) 70 typedef implementation_defined native_handle_type;
72 typedef service_impl_type::native_handle_type native_handle_type;
77 :
asio::detail::service_base<
78 random_access_handle_service>(io_service),
79 service_impl_(io_service)
84 void construct(implementation_type& impl)
86 service_impl_.construct(impl);
89 #if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 90 void move_construct(implementation_type& impl,
92 implementation_type& other_impl)
94 service_impl_.move_construct(impl, other_impl);
98 void move_assign(implementation_type& impl,
99 random_access_handle_service& other_service,
100 implementation_type& other_impl)
102 service_impl_.move_assign(impl, other_service.service_impl_, other_impl);
104 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 107 void destroy(implementation_type& impl)
109 service_impl_.destroy(impl);
116 return service_impl_.assign(impl, handle, ec);
120 bool is_open(
const implementation_type& impl)
const 122 return service_impl_.is_open(impl);
129 return service_impl_.close(impl, ec);
133 native_type native(implementation_type& impl)
135 return service_impl_.native_handle(impl);
139 native_handle_type native_handle(implementation_type& impl)
141 return service_impl_.native_handle(impl);
148 return service_impl_.cancel(impl, ec);
152 template <
typename ConstBufferSequence>
153 std::size_t write_some_at(implementation_type& impl, uint64_t
offset,
156 return service_impl_.write_some_at(impl, offset, buffers, ec);
160 template <
typename ConstBufferSequence,
typename WriteHandler>
163 async_write_some_at(implementation_type& impl,
164 uint64_t offset, const ConstBufferSequence& buffers,
171 service_impl_.async_write_some_at(impl, offset, buffers,
init.handler);
173 return init.result.get();
177 template <
typename MutableBufferSequence>
178 std::size_t read_some_at(implementation_type& impl, uint64_t offset,
181 return service_impl_.read_some_at(impl, offset, buffers, ec);
185 template <
typename MutableBufferSequence,
typename ReadHandler>
188 async_read_some_at(implementation_type& impl,
189 uint64_t offset, const MutableBufferSequence& buffers,
196 service_impl_.async_read_some_at(impl, offset, buffers,
init.handler);
198 return init.result.get();
203 void shutdown_service()
205 service_impl_.shutdown_service();
209 service_impl_type service_impl_;
217 #endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) 220 #endif // ASIO_WINDOWS_RANDOM_ACCESS_HANDLE_SERVICE_HPP Class used to uniquely identify a service.
Provides core I/O functionality.
asio::basic_streambuf< Allocator > MatchCondition enable_if< is_match_condition< MatchCondition >::value >::type *detail::async_result_init< ReadHandler, void(asio::error_code, std::size_t)> init(ASIO_MOVE_CAST(ReadHandler)(handler))
ASIO_INITFN_RESULT_TYPE(ComposedConnectHandler, void(asio::error_code, Iterator)) async_connect(basic_socket< Protocol
const MutableBufferSequence & buffers
asio::basic_streambuf< Allocator > CompletionCondition ASIO_MOVE_ARG(ReadHandler) handler)
Class to represent an error code value.
ASIO_DECL int close(int d, state_type &state, asio::error_code &ec)
#define ASIO_MOVE_CAST(type)
Base class for all io_service services.