Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / asio / doc / requirements / Protocol.qbk
1 [/
2  / Copyright (c) 2003-2019 Christopher M. Kohlhoff (chris at kohlhoff dot com)
3  /
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)
6  /]
7
8 [section:Protocol Protocol requirements]
9
10 A type `X` meets the `Protocol` requirements if it satisfies the requirements
11 of `Destructible` (C++Std [destructible]), `CopyConstructible` (C++Std
12 [copyconstructible]), and `CopyAssignable` (C++Std [copyassignable]), as well
13 as the additional requirements listed below.
14
15 No copy or move operation of the type `X` shall exit via an exception.
16
17 [table Protocol requirements
18   [[expression] [return type] [assertion/note\npre/post-conditions]]
19   [
20     [`X::endpoint`]
21     [type meeting [link boost_asio.reference.Endpoint endpoint] requirements]
22     []
23   ]
24 ]
25
26 In the table below, `a` denotes a (possibly const) value of type `X`.
27
28 [table Protocol requirements for extensible implementations
29   [[expression] [return type] [assertion/note\npre/post-conditions]]
30   [
31     [`a.family()`]
32     [`int`]
33     [
34       Returns a value suitable for passing as the /domain/ argument to
35       __POSIX__ __socket__ (or equivalent).
36     ]
37   ]
38   [
39     [`a.type()`]
40     [`int`]
41     [
42       Returns a value suitable for passing as the /type/ argument to __POSIX__
43       __socket__ (or equivalent).
44     ]
45   ]
46   [
47     [`a.protocol()`]
48     [`int`]
49     [
50       Returns a value suitable for passing as the /protocol/ argument to
51       __POSIX__ __socket__ (or equivalent).
52     ]
53   ]
54 ]
55
56 [endsect]