diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:11:01 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2019-12-05 15:11:01 +0900 |
commit | 3fdc3e5ee96dca5b11d1694975a65200787eab86 (patch) | |
tree | 5c1733853892b8397d67706fa453a9bd978d2102 /doc/html/boost_asio/reference/basic_seq_packet_socket/receive/overload2.html | |
parent | 88e602c57797660ebe0f9e15dbd64c1ff16dead3 (diff) | |
download | boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.gz boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.tar.bz2 boost-3fdc3e5ee96dca5b11d1694975a65200787eab86.zip |
Imported Upstream version 1.66.0upstream/1.66.0
Diffstat (limited to 'doc/html/boost_asio/reference/basic_seq_packet_socket/receive/overload2.html')
-rw-r--r-- | doc/html/boost_asio/reference/basic_seq_packet_socket/receive/overload2.html | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/doc/html/boost_asio/reference/basic_seq_packet_socket/receive/overload2.html b/doc/html/boost_asio/reference/basic_seq_packet_socket/receive/overload2.html index c852c30bb9..8c806ecc9e 100644 --- a/doc/html/boost_asio/reference/basic_seq_packet_socket/receive/overload2.html +++ b/doc/html/boost_asio/reference/basic_seq_packet_socket/receive/overload2.html @@ -30,12 +30,12 @@ <p> Receive some data on the socket. </p> -<pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> - <span class="keyword">typename</span> <a class="link" href="../../MutableBufferSequence.html" title="Mutable buffer sequence requirements">MutableBufferSequence</a><span class="special">></span> -<span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">receive</span><span class="special">(</span> - <span class="keyword">const</span> <span class="identifier">MutableBufferSequence</span> <span class="special">&</span> <span class="identifier">buffers</span><span class="special">,</span> - <span class="identifier">socket_base</span><span class="special">::</span><span class="identifier">message_flags</span> <span class="identifier">in_flags</span><span class="special">,</span> - <span class="identifier">socket_base</span><span class="special">::</span><span class="identifier">message_flags</span> <span class="special">&</span> <span class="identifier">out_flags</span><span class="special">);</span> +<pre class="programlisting">template< + typename <a class="link" href="../../MutableBufferSequence.html" title="Mutable buffer sequence requirements">MutableBufferSequence</a>> +std::size_t receive( + const MutableBufferSequence & buffers, + socket_base::message_flags in_flags, + socket_base::message_flags & out_flags); </pre> <p> This function is used to receive data on the sequenced packet socket. @@ -60,7 +60,7 @@ <dt><span class="term">out_flags</span></dt> <dd><p> After the receive call completes, contains flags associated with - the received data. For example, if the <code class="computeroutput"><span class="identifier">socket_base</span><span class="special">::</span><span class="identifier">message_end_of_record</span></code> + the received data. For example, if the <code class="computeroutput">socket_base::message_end_of_record</code> bit is set then the received data marks the end of a record. </p></dd> </dl> @@ -82,7 +82,7 @@ <dl class="variablelist"> <dt><span class="term">boost::system::system_error</span></dt> <dd><p> - Thrown on failure. An error code of <code class="computeroutput"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">error</span><span class="special">::</span><span class="identifier">eof</span></code> + Thrown on failure. An error code of <code class="computeroutput">boost::asio::error::eof</code> indicates that the connection was closed by the peer. </p></dd> </dl> @@ -93,21 +93,22 @@ </h6> <p> The receive operation may not receive all of the requested number of - bytes. Consider using the <a class="link" href="../../read.html" title="read"><code class="computeroutput"><span class="identifier">read</span></code></a> function if you need to - ensure that the requested amount of data is read before the blocking - operation completes. + bytes. Consider using the <a class="link" href="../../read.html" title="read"><code class="computeroutput">read</code></a> + function if you need to ensure that the requested amount of data is read + before the blocking operation completes. </p> <h6> <a name="boost_asio.reference.basic_seq_packet_socket.receive.overload2.h4"></a> <span class="phrase"><a name="boost_asio.reference.basic_seq_packet_socket.receive.overload2.example"></a></span><a class="link" href="overload2.html#boost_asio.reference.basic_seq_packet_socket.receive.overload2.example">Example</a> </h6> <p> - To receive into a single data buffer use the <a class="link" href="../../buffer.html" title="buffer"><code class="computeroutput"><span class="identifier">buffer</span></code></a> function as follows: + To receive into a single data buffer use the <a class="link" href="../../buffer.html" title="buffer"><code class="computeroutput">buffer</code></a> + function as follows: </p> -<pre class="programlisting"><span class="identifier">socket</span><span class="special">.</span><span class="identifier">receive</span><span class="special">(</span><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">buffer</span><span class="special">(</span><span class="identifier">data</span><span class="special">,</span> <span class="identifier">size</span><span class="special">),</span> <span class="number">0</span><span class="special">,</span> <span class="identifier">out_flags</span><span class="special">);</span> +<pre class="programlisting">socket.receive(boost::asio::buffer(data, size), 0, out_flags); </pre> <p> - See the <a class="link" href="../../buffer.html" title="buffer"><code class="computeroutput"><span class="identifier">buffer</span></code></a> + See the <a class="link" href="../../buffer.html" title="buffer"><code class="computeroutput">buffer</code></a> documentation for information on receiving into multiple buffers in one go, and how to use it with arrays, boost::array or std::vector. </p> |