2 / Copyright (c) 2003-2016 Christopher M. Kohlhoff (chris at kohlhoff dot com)
4 / Distributed under the Boost Software License, Version 1.0. (See accompanying
5 / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
8 [section:HandleService Handle service requirements]
10 A handle service must meet the requirements for an [link
11 boost_asio.reference.IoObjectService I/O object service] with support for movability,
12 as well as the additional requirements listed below.
14 In the table below, `X` denotes a handle service class, `a` and `ao` denote
15 values of type `X`, `b` and `c` denote values of type `X::implementation_type`,
16 `n` denotes a value of type `X::native_handle_type`, `ec` denotes a value of
17 type `error_code`, and `u` and `v` denote identifiers.
19 [table HandleService requirements
20 [[expression] [return type] [assertion/note\npre/post-condition]]
22 [`X::native_handle_type`]
25 The implementation-defined native representation of a handle. Must
26 satisfy the requirements of `CopyConstructible` types (C++ Std, 20.1.3),
27 and the requirements of `Assignable` types (C++ Std, 23.1).
34 From [link boost_asio.reference.IoObjectService IoObjectService]
36 post: `!a.is_open(b)`.
43 From [link boost_asio.reference.IoObjectService IoObjectService]
44 requirements. Implicitly cancels asynchronous operations, as if by calling
50 a.move_construct(b, c);
54 From [link boost_asio.reference.IoObjectService IoObjectService] requirements.
55 The underlying native representation is moved from `c` to `b`.
60 a.move_assign(b, ao, c);
64 From [link boost_asio.reference.IoObjectService IoObjectService] requirements.
65 Implicitly cancels asynchronous operations associated with `b`, as if by
66 calling `a.close(b, ec)`. Then the underlying native representation is
67 moved from `c` to `b`.
76 pre: `!a.is_open(b)`.\n
77 post: `!!ec || a.is_open(b)`.
91 const X::implementation_type& v = b;
104 If `a.is_open()` is true, causes any outstanding asynchronous operations
105 to complete as soon as possible. Handlers for cancelled operations shall
106 be passed the error code `error::operation_aborted`.\n
107 post: `!a.is_open(b)`.
114 [`X::native_handle_type`]
124 pre: `a.is_open(b)`.\n
125 Causes any outstanding asynchronous operations to complete as soon as
126 possible. Handlers for cancelled operations shall be passed the error
127 code `error::operation_aborted`.