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:Endpoint Endpoint requirements]
10 An endpoint must meet the requirements of `CopyConstructible` types (C++ Std,
11 20.1.3), and the requirements of `Assignable` types (C++ Std, 23.1).
13 In the table below, `X` denotes an endpoint class, `a` denotes a value of type
14 `X`, `s` denotes a size in bytes, and `u` denotes an identifier.
16 [table Endpoint requirements
17 [[expression] [type] [assertion/note\npre/post-conditions]]
20 [type meeting [link boost_asio.reference.Protocol protocol] requirements]
42 Returns a pointer suitable for passing as the /address/ argument to
43 __POSIX__ functions such as __accept__, __getpeername__, __getsockname__
44 and __recvfrom__. The implementation shall perform a
45 `reinterpret_cast` on the pointer to convert it to `sockaddr*`.
53 Returns a pointer suitable for passing as the /address/ argument to
54 __POSIX__ functions such as __connect__, or as the /dest_addr/ argument
55 to __POSIX__ functions such as __sendto__. The implementation shall
56 perform a `reinterpret_cast` on the pointer to convert it to `const
64 Returns a value suitable for passing as the /address_len/ argument
65 to __POSIX__ functions such as __connect__, or as the /dest_len/ argument
66 to __POSIX__ functions such as __sendto__, after appropriate integer
67 conversion has been performed.
74 post: `a.size() == s`\n
75 Passed the value contained in the /address_len/ argument to __POSIX__
76 functions such as __accept__, __getpeername__, __getsockname__ and
77 __recvfrom__, after successful completion of the function. Permitted to
78 throw an exception if the protocol associated with the endpoint object `a`
79 does not support the specified size.
86 Returns a value suitable for passing as the /address_len/ argument to
87 __POSIX__ functions such as __accept__, __getpeername__, __getsockname__
88 and __recvfrom__, after appropriate integer conversion has been performed.