Imported Upstream version 1.64.0
[platform/upstream/boost.git] / doc / html / boost_asio / reference / GettableSocketOption.html
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="../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
7 <link rel="home" href="../../boost_asio.html" title="Boost.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>
14 <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td>
15 <td align="center"><a href="../../../../index.html">Home</a></td>
16 <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td>
17 <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
18 <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
19 <td align="center"><a href="../../../../more/index.htm">More</a></td>
20 </tr></table>
21 <hr>
22 <div class="spirit-nav">
23 <a accesskey="p" href="GettableSerialPortOption.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="Handler.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
24 </div>
25 <div class="section">
26 <div class="titlepage"><div><div><h3 class="title">
27 <a name="boost_asio.reference.GettableSocketOption"></a><a class="link" href="GettableSocketOption.html" title="Gettable socket option requirements">Gettable socket
28       option requirements</a>
29 </h3></div></div></div>
30 <p>
31         In the table below, <code class="computeroutput"><span class="identifier">X</span></code> denotes
32         a socket option class, <code class="computeroutput"><span class="identifier">a</span></code>
33         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
34         <code class="computeroutput"><span class="identifier">u</span></code> denotes an identifier.
35       </p>
36 <div class="table">
37 <a name="boost_asio.reference.GettableSocketOption.t0"></a><p class="title"><b>Table&#160;12.&#160;GettableSocketOption requirements</b></p>
38 <div class="table-contents"><table class="table" summary="GettableSocketOption requirements">
39 <colgroup>
40 <col>
41 <col>
42 <col>
43 </colgroup>
44 <thead><tr>
45 <th>
46                 <p>
47                   expression
48                 </p>
49               </th>
50 <th>
51                 <p>
52                   type
53                 </p>
54               </th>
55 <th>
56                 <p>
57                   assertion/note<br> pre/post-conditions
58                 </p>
59               </th>
60 </tr></thead>
61 <tbody>
62 <tr>
63 <td>
64                 <p>
65                   <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>
66                 </p>
67               </td>
68 <td>
69                 <p>
70                   <code class="computeroutput"><span class="keyword">int</span></code>
71                 </p>
72               </td>
73 <td>
74                 <p>
75                   Returns a value suitable for passing as the <span class="emphasis"><em>level</em></span>
76                   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>
77                   (or equivalent).
78                 </p>
79               </td>
80 </tr>
81 <tr>
82 <td>
83                 <p>
84                   <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>
85                 </p>
86               </td>
87 <td>
88                 <p>
89                   <code class="computeroutput"><span class="keyword">int</span></code>
90                 </p>
91               </td>
92 <td>
93                 <p>
94                   Returns a value suitable for passing as the <span class="emphasis"><em>option_name</em></span>
95                   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>
96                   (or equivalent).
97                 </p>
98               </td>
99 </tr>
100 <tr>
101 <td>
102                 <p>
103                   <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>
104                 </p>
105               </td>
106 <td>
107                 <p>
108                   a pointer, convertible to <code class="computeroutput"><span class="keyword">void</span><span class="special">*</span></code>
109                 </p>
110               </td>
111 <td>
112                 <p>
113                   Returns a pointer suitable for passing as the <span class="emphasis"><em>option_value</em></span>
114                   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>
115                   (or equivalent).
116                 </p>
117               </td>
118 </tr>
119 <tr>
120 <td>
121                 <p>
122                   <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>
123                 </p>
124               </td>
125 <td>
126                 <p>
127                   <code class="computeroutput"><span class="identifier">size_t</span></code>
128                 </p>
129               </td>
130 <td>
131                 <p>
132                   Returns a value suitable for passing as the <span class="emphasis"><em>option_len</em></span>
133                   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>
134                   (or equivalent), after appropriate integer conversion has been
135                   performed.
136                 </p>
137               </td>
138 </tr>
139 <tr>
140 <td>
141                 <p>
142                   <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>
143                   <span class="identifier">s</span><span class="special">);</span></code>
144                 </p>
145               </td>
146 <td>
147               </td>
148 <td>
149                 <p>
150                   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>
151                   <span class="special">==</span> <span class="identifier">s</span></code>.<br>
152                   Passed the value contained in the <span class="emphasis"><em>option_len</em></span>
153                   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>
154                   (or equivalent) after successful completion of the function. Permitted
155                   to throw an exception if the socket option object <code class="computeroutput"><span class="identifier">a</span></code> does not support the specified
156                   size.
157                 </p>
158               </td>
159 </tr>
160 </tbody>
161 </table></div>
162 </div>
163 <br class="table-break">
164 </div>
165 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
166 <td align="left"></td>
167 <td align="right"><div class="copyright-footer">Copyright &#169; 2003-2017 Christopher M. Kohlhoff<p>
168         Distributed under the Boost Software License, Version 1.0. (See accompanying
169         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>)
170       </p>
171 </div></td>
172 </tr></table>
173 <hr>
174 <div class="spirit-nav">
175 <a accesskey="p" href="GettableSerialPortOption.html"><img src="../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../reference.html"><img src="../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../boost_asio.html"><img src="../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="Handler.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
176 </div>
177 </body>
178 </html>