Protocol.qbk 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. [section:Protocol Protocol requirements]
  8. A type `X` meets the `Protocol` requirements if it satisfies the requirements
  9. of `Destructible` (C++Std [destructible]), `CopyConstructible` (C++Std
  10. [copyconstructible]), and `CopyAssignable` (C++Std [copyassignable]), as well
  11. as the additional requirements listed below.
  12. No copy or move operation of the type `X` shall exit via an exception.
  13. [table Protocol requirements
  14. [[expression] [return type] [assertion/note\npre/post-conditions]]
  15. [
  16. [`X::endpoint`]
  17. [type meeting [link boost_asio.reference.Endpoint endpoint] requirements]
  18. []
  19. ]
  20. ]
  21. In the table below, `a` denotes a (possibly const) value of type `X`.
  22. [table Protocol requirements for extensible implementations
  23. [[expression] [return type] [assertion/note\npre/post-conditions]]
  24. [
  25. [`a.family()`]
  26. [`int`]
  27. [
  28. Returns a value suitable for passing as the /domain/ argument to
  29. __POSIX__ __socket__ (or equivalent).
  30. ]
  31. ]
  32. [
  33. [`a.type()`]
  34. [`int`]
  35. [
  36. Returns a value suitable for passing as the /type/ argument to __POSIX__
  37. __socket__ (or equivalent).
  38. ]
  39. ]
  40. [
  41. [`a.protocol()`]
  42. [`int`]
  43. [
  44. Returns a value suitable for passing as the /protocol/ argument to
  45. __POSIX__ __socket__ (or equivalent).
  46. ]
  47. ]
  48. ]
  49. [endsect]