11 #ifndef ASIO_WINDOWS_BASIC_HANDLE_HPP 12 #define ASIO_WINDOWS_BASIC_HANDLE_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(ASIO_HAS_WINDOWS_STREAM_HANDLE) \ 22 || defined(ASIO_HAS_WINDOWS_OBJECT_HANDLE) \ 23 || defined(GENERATING_DOCUMENTATION) 43 template <
typename HandleService>
45 :
public basic_io_object<HandleService>
50 typedef typename HandleService::native_handle_type native_type;
53 typedef typename HandleService::native_handle_type native_handle_type;
56 typedef basic_handle<HandleService> lowest_layer_type;
66 : basic_io_object<HandleService>(io_service)
82 const native_handle_type& handle)
83 : basic_io_object<HandleService>(io_service)
86 this->get_service().assign(this->get_implementation(), handle, ec);
90 #if defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 100 basic_handle(basic_handle&& other)
101 : basic_io_object<HandleService>(
115 basic_handle& operator=(basic_handle&& other)
117 basic_io_object<HandleService>::operator=(
121 #endif // defined(ASIO_HAS_MOVE) || defined(GENERATING_DOCUMENTATION) 132 lowest_layer_type& lowest_layer()
146 const lowest_layer_type& lowest_layer()
const 159 void assign(
const native_handle_type& handle)
162 this->get_service().assign(this->get_implementation(), handle, ec);
177 return this->get_service().assign(this->get_implementation(), handle, ec);
183 return this->get_service().is_open(this->get_implementation());
197 this->get_service().close(this->get_implementation(), ec);
211 return this->get_service().close(this->get_implementation(), ec);
222 return this->get_service().native_handle(this->get_implementation());
231 native_handle_type native_handle()
233 return this->get_service().native_handle(this->get_implementation());
247 this->get_service().cancel(this->get_implementation(), ec);
261 return this->get_service().cancel(this->get_implementation(), ec);
276 #endif // defined(ASIO_HAS_WINDOWS_RANDOM_ACCESS_HANDLE) 281 #endif // ASIO_WINDOWS_BASIC_HANDLE_HPP void throw_error(const asio::error_code &err)
Provides core I/O functionality.
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)