2 / Copyright (c) 2003-2019 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:Endpoint Endpoint requirements]
10 A type `X` meets the `Endpoint` requirements if it satisfies the requirements
11 of `Destructible` (C++Std [destructible]), `DefaultConstructible` (C++Std
12 [defaultconstructible]), `CopyConstructible` (C++Std [copyconstructible]),
13 and `CopyAssignable` (C++Std [copyassignable]), as well as the additional
14 requirements listed below.
16 The default constructor and move operations of the type `X` shall not exit via
19 In the table below, `a` denotes a (possibly const) value of type `X`, and `u`
20 denotes an identifier.
22 [table Endpoint requirements
23 [[expression] [type] [assertion/note\npre/post-conditions]]
26 [type meeting [link boost_asio.reference.Protocol `Protocol`] requirements]
36 In the table below, `a` denotes a (possibly const) value of type `X`, `b`
37 denotes a value of type `X`, and `s` denotes a (possibly const) value of a type
38 that is convertible to `size_t` and denotes a size in bytes.
40 [table Endpoint requirements for extensible implementations
41 [[expression] [type] [assertion/note\npre/post-conditions]]
46 Returns a pointer suitable for passing as the /address/ argument to
47 functions such as __POSIX__ __connect__, or as the /dest_addr/ argument
48 to functions such as __POSIX__ __sendto__. The implementation shall
49 perform a `static_cast` on the pointer to convert it to `const
57 Returns a pointer suitable for passing as the /address/ argument to
58 functions such as __POSIX__ __accept__, __getpeername__, __getsockname__
59 and __recvfrom__. The implementation shall perform a `static_cast` on the
60 pointer to convert it to `sockaddr*`.
67 Returns a value suitable for passing as the /address_len/ argument
68 to functions such as __POSIX__ __connect__, or as the /dest_len/ argument
69 to functions such as __POSIX__ __sendto__, after appropriate integer
70 conversion has been performed.
78 post: `a.size() == s`\n
79 Passed the value contained in the /address_len/ argument to functions
80 such as __POSIX__ __accept__, __getpeername__, __getsockname__ and
81 __recvfrom__, after successful completion of the function. Permitted to
82 throw an exception if the protocol associated with the endpoint object
83 `a` does not support the specified size.
90 Returns a value suitable for passing as the /address_len/ argument to
91 functions such as __POSIX__ __accept__, __getpeername__, __getsockname__
92 and __recvfrom__, after appropriate integer conversion has been performed.