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">
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>
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>
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>
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.
37 <a name="boost_asio.reference.GettableSocketOption.t0"></a><p class="title"><b>Table 12. GettableSocketOption requirements</b></p>
38 <div class="table-contents"><table class="table" summary="GettableSocketOption requirements">
57 assertion/note<br> pre/post-conditions
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>
70 <code class="computeroutput"><span class="keyword">int</span></code>
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>
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>
89 <code class="computeroutput"><span class="keyword">int</span></code>
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>
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>
108 a pointer, convertible to <code class="computeroutput"><span class="keyword">void</span><span class="special">*</span></code>
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>
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>
127 <code class="computeroutput"><span class="identifier">size_t</span></code>
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
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>
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
163 <br class="table-break">
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 © 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>)
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>