GettableSocketOption.html 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <html>
  2. <head>
  3. <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
  4. <title>Gettable socket option 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="GettableSerialPortOption.html" title="Gettable serial port option requirements">
  10. <link rel="next" href="Handler.html" title="Handlers">
  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="GettableSerialPortOption.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="Handler.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.GettableSocketOption"></a><a class="link" href="GettableSocketOption.html" title="Gettable socket option requirements">Gettable socket
  21. option requirements</a>
  22. </h3></div></div></div>
  23. <p>
  24. In the table below, <code class="computeroutput"><span class="identifier">X</span></code> denotes
  25. a socket option class, <code class="computeroutput"><span class="identifier">a</span></code>
  26. denotes a value of <code class="computeroutput"><span class="identifier">X</span></code>, <code class="computeroutput"><span class="identifier">p</span></code> denotes a value that meets the <a class="link" href="Protocol.html" title="Protocol requirements">protocol</a> requirements, and <code class="computeroutput"><span class="identifier">u</span></code> denotes an identifier.
  27. </p>
  28. <div class="table">
  29. <a name="asio.reference.GettableSocketOption.t0"></a><p class="title"><b>Table&#160;12.&#160;GettableSocketOption requirements</b></p>
  30. <div class="table-contents"><table class="table" summary="GettableSocketOption requirements">
  31. <colgroup>
  32. <col>
  33. <col>
  34. <col>
  35. </colgroup>
  36. <thead><tr>
  37. <th>
  38. <p>
  39. expression
  40. </p>
  41. </th>
  42. <th>
  43. <p>
  44. type
  45. </p>
  46. </th>
  47. <th>
  48. <p>
  49. assertion/note<br> pre/post-conditions
  50. </p>
  51. </th>
  52. </tr></thead>
  53. <tbody>
  54. <tr>
  55. <td>
  56. <p>
  57. <code class="computeroutput"><span class="identifier">a</span><span class="special">.</span><span class="identifier">level</span><span class="special">(</span><span class="identifier">p</span><span class="special">);</span></code>
  58. </p>
  59. </td>
  60. <td>
  61. <p>
  62. <code class="computeroutput"><span class="keyword">int</span></code>
  63. </p>
  64. </td>
  65. <td>
  66. <p>
  67. Returns a value suitable for passing as the <span class="emphasis"><em>level</em></span>
  68. argument to <span class="emphasis"><em>POSIX</em></span> <a href="http://www.opengroup.org/onlinepubs/000095399/functions/getsockopt.html" target="_top"><code class="computeroutput"><span class="identifier">getsockopt</span><span class="special">()</span></code></a>
  69. (or equivalent).
  70. </p>
  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">name</span><span class="special">(</span><span class="identifier">p</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>option_name</em></span>
  87. argument to <span class="emphasis"><em>POSIX</em></span> <a href="http://www.opengroup.org/onlinepubs/000095399/functions/getsockopt.html" target="_top"><code class="computeroutput"><span class="identifier">getsockopt</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">data</span><span class="special">(</span><span class="identifier">p</span><span class="special">);</span></code>
  96. </p>
  97. </td>
  98. <td>
  99. <p>
  100. a pointer, convertible to <code class="computeroutput"><span class="keyword">void</span><span class="special">*</span></code>
  101. </p>
  102. </td>
  103. <td>
  104. <p>
  105. Returns a pointer suitable for passing as the <span class="emphasis"><em>option_value</em></span>
  106. argument to <span class="emphasis"><em>POSIX</em></span> <a href="http://www.opengroup.org/onlinepubs/000095399/functions/getsockopt.html" target="_top"><code class="computeroutput"><span class="identifier">getsockopt</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">size</span><span class="special">(</span><span class="identifier">p</span><span class="special">);</span></code>
  115. </p>
  116. </td>
  117. <td>
  118. <p>
  119. <code class="computeroutput"><span class="identifier">size_t</span></code>
  120. </p>
  121. </td>
  122. <td>
  123. <p>
  124. Returns a value suitable for passing as the <span class="emphasis"><em>option_len</em></span>
  125. argument to <span class="emphasis"><em>POSIX</em></span> <a href="http://www.opengroup.org/onlinepubs/000095399/functions/getsockopt.html" target="_top"><code class="computeroutput"><span class="identifier">getsockopt</span><span class="special">()</span></code></a>
  126. (or equivalent), after appropriate integer conversion has been
  127. performed.
  128. </p>
  129. </td>
  130. </tr>
  131. <tr>
  132. <td>
  133. <p>
  134. <code class="computeroutput"><span class="identifier">a</span><span class="special">.</span><span class="identifier">resize</span><span class="special">(</span><span class="identifier">p</span><span class="special">,</span>
  135. <span class="identifier">s</span><span class="special">);</span></code>
  136. </p>
  137. </td>
  138. <td>
  139. </td>
  140. <td>
  141. <p>
  142. post: <code class="computeroutput"><span class="identifier">a</span><span class="special">.</span><span class="identifier">size</span><span class="special">(</span><span class="identifier">p</span><span class="special">)</span>
  143. <span class="special">==</span> <span class="identifier">s</span></code>.<br>
  144. Passed the value contained in the <span class="emphasis"><em>option_len</em></span>
  145. argument to <span class="emphasis"><em>POSIX</em></span> <a href="http://www.opengroup.org/onlinepubs/000095399/functions/getsockopt.html" target="_top"><code class="computeroutput"><span class="identifier">getsockopt</span><span class="special">()</span></code></a>
  146. (or equivalent) after successful completion of the function. Permitted
  147. to throw an exception if the socket option object <code class="computeroutput"><span class="identifier">a</span></code> does not support the specified
  148. size.
  149. </p>
  150. </td>
  151. </tr>
  152. </tbody>
  153. </table></div>
  154. </div>
  155. <br class="table-break">
  156. </div>
  157. <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
  158. <td align="left"></td>
  159. <td align="right"><div class="copyright-footer">Copyright &#169; 2003-2014 Christopher M. Kohlhoff<p>
  160. Distributed under the Boost Software License, Version 1.0. (See accompanying
  161. 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>)
  162. </p>
  163. </div></td>
  164. </tr></table>
  165. <hr>
  166. <div class="spirit-nav">
  167. <a accesskey="p" href="GettableSerialPortOption.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="Handler.html"><img src="../../next.png" alt="Next"></a>
  168. </div>
  169. </body>
  170. </html>