Protocol.html 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Protocol requirements</title>
  5. <link rel="stylesheet" href="../../boostbook.css" type="text/css">
  6. <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
  7. <link rel="home" href="../../index.html" title="Asio">
  8. <link rel="up" href="../reference.html" title="Reference">
  9. <link rel="prev" href="ObjectHandleService.html" title="Object handle service requirements">
  10. <link rel="next" href="RandomAccessHandleService.html" title="Random access handle service requirements">
  11. </head>
  12. <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
  13. <table cellpadding="2" width="100%"><tr><td valign="top"><img alt="asio C++ library" width="250" height="60" src="../../asio.png"></td></tr></table>
  14. <hr>
  15. <div class="spirit-nav">
  16. <a accesskey="p" href="ObjectHandleService.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="RandomAccessHandleService.html"><img src="../../next.png" alt="Next"></a>
  17. </div>
  18. <div class="section">
  19. <div class="titlepage"><div><div><h3 class="title">
  20. <a name="asio.reference.Protocol"></a><a class="link" href="Protocol.html" title="Protocol requirements">Protocol requirements</a>
  21. </h3></div></div></div>
  22. <p>
  23. A protocol must meet the requirements of <code class="computeroutput"><span class="identifier">CopyConstructible</span></code>
  24. types (C++ Std, 20.1.3), and the requirements of <code class="computeroutput"><span class="identifier">Assignable</span></code>
  25. types (C++ Std, 23.1).
  26. </p>
  27. <p>
  28. In the table below, <code class="computeroutput"><span class="identifier">X</span></code> denotes
  29. a protocol class, and <code class="computeroutput"><span class="identifier">a</span></code> denotes
  30. a value of <code class="computeroutput"><span class="identifier">X</span></code>.
  31. </p>
  32. <div class="table">
  33. <a name="asio.reference.Protocol.t0"></a><p class="title"><b>Table&#160;20.&#160;Protocol requirements</b></p>
  34. <div class="table-contents"><table class="table" summary="Protocol requirements">
  35. <colgroup>
  36. <col>
  37. <col>
  38. <col>
  39. </colgroup>
  40. <thead><tr>
  41. <th>
  42. <p>
  43. expression
  44. </p>
  45. </th>
  46. <th>
  47. <p>
  48. return type
  49. </p>
  50. </th>
  51. <th>
  52. <p>
  53. assertion/note<br> pre/post-conditions
  54. </p>
  55. </th>
  56. </tr></thead>
  57. <tbody>
  58. <tr>
  59. <td>
  60. <p>
  61. <code class="computeroutput"><span class="identifier">X</span><span class="special">::</span><span class="identifier">endpoint</span></code>
  62. </p>
  63. </td>
  64. <td>
  65. <p>
  66. type meeting <a class="link" href="Endpoint.html" title="Endpoint requirements">endpoint</a>
  67. requirements
  68. </p>
  69. </td>
  70. <td>
  71. </td>
  72. </tr>
  73. <tr>
  74. <td>
  75. <p>
  76. <code class="computeroutput"><span class="identifier">a</span><span class="special">.</span><span class="identifier">family</span><span class="special">()</span></code>
  77. </p>
  78. </td>
  79. <td>
  80. <p>
  81. <code class="computeroutput"><span class="keyword">int</span></code>
  82. </p>
  83. </td>
  84. <td>
  85. <p>
  86. Returns a value suitable for passing as the <span class="emphasis"><em>domain</em></span>
  87. argument to <span class="emphasis"><em>POSIX</em></span> <a href="http://www.opengroup.org/onlinepubs/000095399/functions/socket.html" target="_top"><code class="computeroutput"><span class="identifier">socket</span><span class="special">()</span></code></a>
  88. (or equivalent).
  89. </p>
  90. </td>
  91. </tr>
  92. <tr>
  93. <td>
  94. <p>
  95. <code class="computeroutput"><span class="identifier">a</span><span class="special">.</span><span class="identifier">type</span><span class="special">()</span></code>
  96. </p>
  97. </td>
  98. <td>
  99. <p>
  100. <code class="computeroutput"><span class="keyword">int</span></code>
  101. </p>
  102. </td>
  103. <td>
  104. <p>
  105. Returns a value suitable for passing as the <span class="emphasis"><em>type</em></span>
  106. argument to <span class="emphasis"><em>POSIX</em></span> <a href="http://www.opengroup.org/onlinepubs/000095399/functions/socket.html" target="_top"><code class="computeroutput"><span class="identifier">socket</span><span class="special">()</span></code></a>
  107. (or equivalent).
  108. </p>
  109. </td>
  110. </tr>
  111. <tr>
  112. <td>
  113. <p>
  114. <code class="computeroutput"><span class="identifier">a</span><span class="special">.</span><span class="identifier">protocol</span><span class="special">()</span></code>
  115. </p>
  116. </td>
  117. <td>
  118. <p>
  119. <code class="computeroutput"><span class="keyword">int</span></code>
  120. </p>
  121. </td>
  122. <td>
  123. <p>
  124. Returns a value suitable for passing as the <span class="emphasis"><em>protocol</em></span>
  125. argument to <span class="emphasis"><em>POSIX</em></span> <a href="http://www.opengroup.org/onlinepubs/000095399/functions/socket.html" target="_top"><code class="computeroutput"><span class="identifier">socket</span><span class="special">()</span></code></a>
  126. (or equivalent).
  127. </p>
  128. </td>
  129. </tr>
  130. </tbody>
  131. </table></div>
  132. </div>
  133. <br class="table-break">
  134. </div>
  135. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  136. <td align="left"></td>
  137. <td align="right"><div class="copyright-footer">Copyright &#169; 2003-2014 Christopher M. Kohlhoff<p>
  138. Distributed under the Boost Software License, Version 1.0. (See accompanying
  139. file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
  140. </p>
  141. </div></td>
  142. </tr></table>
  143. <hr>
  144. <div class="spirit-nav">
  145. <a accesskey="p" href="ObjectHandleService.html"><img src="../../prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../home.png" alt="Home"></a><a accesskey="n" href="RandomAccessHandleService.html"><img src="../../next.png" alt="Next"></a>
  146. </div>
  147. </body>
  148. </html>