064fdf2b1ae0195081dfb8ff2240b0e7befc8adf
[platform/upstream/boost.git] / doc / html / boost_asio / reference / buffered_read_stream.html
1 <html>
2 <head>
3 <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
4 <title>buffered_read_stream</title>
5 <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css">
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.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="buffer_size/overload5.html" title="buffer_size (5 of 5 overloads)">
10 <link rel="next" href="buffered_read_stream/async_fill.html" title="buffered_read_stream::async_fill">
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="buffer_size/overload5.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="buffered_read_stream/async_fill.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.buffered_read_stream"></a><a class="link" href="buffered_read_stream.html" title="buffered_read_stream">buffered_read_stream</a>
28 </h3></div></div></div>
29 <p>
30         Adds buffering to the read-related operations of a stream.
31       </p>
32 <pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
33     <span class="keyword">typename</span> <span class="identifier">Stream</span><span class="special">&gt;</span>
34 <span class="keyword">class</span> <span class="identifier">buffered_read_stream</span> <span class="special">:</span>
35   <span class="identifier">noncopyable</span>
36 </pre>
37 <h5>
38 <a name="boost_asio.reference.buffered_read_stream.h0"></a>
39         <span class="phrase"><a name="boost_asio.reference.buffered_read_stream.types"></a></span><a class="link" href="buffered_read_stream.html#boost_asio.reference.buffered_read_stream.types">Types</a>
40       </h5>
41 <div class="informaltable"><table class="table">
42 <colgroup>
43 <col>
44 <col>
45 </colgroup>
46 <thead><tr>
47 <th>
48                 <p>
49                   Name
50                 </p>
51               </th>
52 <th>
53                 <p>
54                   Description
55                 </p>
56               </th>
57 </tr></thead>
58 <tbody>
59 <tr>
60 <td>
61                 <p>
62                   <a class="link" href="buffered_read_stream/lowest_layer_type.html" title="buffered_read_stream::lowest_layer_type"><span class="bold"><strong>lowest_layer_type</strong></span></a>
63                 </p>
64               </td>
65 <td>
66                 <p>
67                   The type of the lowest layer.
68                 </p>
69               </td>
70 </tr>
71 <tr>
72 <td>
73                 <p>
74                   <a class="link" href="buffered_read_stream/next_layer_type.html" title="buffered_read_stream::next_layer_type"><span class="bold"><strong>next_layer_type</strong></span></a>
75                 </p>
76               </td>
77 <td>
78                 <p>
79                   The type of the next layer.
80                 </p>
81               </td>
82 </tr>
83 </tbody>
84 </table></div>
85 <h5>
86 <a name="boost_asio.reference.buffered_read_stream.h1"></a>
87         <span class="phrase"><a name="boost_asio.reference.buffered_read_stream.member_functions"></a></span><a class="link" href="buffered_read_stream.html#boost_asio.reference.buffered_read_stream.member_functions">Member
88         Functions</a>
89       </h5>
90 <div class="informaltable"><table class="table">
91 <colgroup>
92 <col>
93 <col>
94 </colgroup>
95 <thead><tr>
96 <th>
97                 <p>
98                   Name
99                 </p>
100               </th>
101 <th>
102                 <p>
103                   Description
104                 </p>
105               </th>
106 </tr></thead>
107 <tbody>
108 <tr>
109 <td>
110                 <p>
111                   <a class="link" href="buffered_read_stream/async_fill.html" title="buffered_read_stream::async_fill"><span class="bold"><strong>async_fill</strong></span></a>
112                 </p>
113               </td>
114 <td>
115                 <p>
116                   Start an asynchronous fill.
117                 </p>
118               </td>
119 </tr>
120 <tr>
121 <td>
122                 <p>
123                   <a class="link" href="buffered_read_stream/async_read_some.html" title="buffered_read_stream::async_read_some"><span class="bold"><strong>async_read_some</strong></span></a>
124                 </p>
125               </td>
126 <td>
127                 <p>
128                   Start an asynchronous read. The buffer into which the data will
129                   be read must be valid for the lifetime of the asynchronous operation.
130                 </p>
131               </td>
132 </tr>
133 <tr>
134 <td>
135                 <p>
136                   <a class="link" href="buffered_read_stream/async_write_some.html" title="buffered_read_stream::async_write_some"><span class="bold"><strong>async_write_some</strong></span></a>
137                 </p>
138               </td>
139 <td>
140                 <p>
141                   Start an asynchronous write. The data being written must be valid
142                   for the lifetime of the asynchronous operation.
143                 </p>
144               </td>
145 </tr>
146 <tr>
147 <td>
148                 <p>
149                   <a class="link" href="buffered_read_stream/buffered_read_stream.html" title="buffered_read_stream::buffered_read_stream"><span class="bold"><strong>buffered_read_stream</strong></span></a>
150                 </p>
151               </td>
152 <td>
153                 <p>
154                   Construct, passing the specified argument to initialise the next
155                   layer.
156                 </p>
157               </td>
158 </tr>
159 <tr>
160 <td>
161                 <p>
162                   <a class="link" href="buffered_read_stream/close.html" title="buffered_read_stream::close"><span class="bold"><strong>close</strong></span></a>
163                 </p>
164               </td>
165 <td>
166                 <p>
167                   Close the stream.
168                 </p>
169               </td>
170 </tr>
171 <tr>
172 <td>
173                 <p>
174                   <a class="link" href="buffered_read_stream/fill.html" title="buffered_read_stream::fill"><span class="bold"><strong>fill</strong></span></a>
175                 </p>
176               </td>
177 <td>
178                 <p>
179                   Fill the buffer with some data. Returns the number of bytes placed
180                   in the buffer as a result of the operation. Throws an exception
181                   on failure.
182                 </p>
183                 <p>
184                   Fill the buffer with some data. Returns the number of bytes placed
185                   in the buffer as a result of the operation, or 0 if an error occurred.
186                 </p>
187               </td>
188 </tr>
189 <tr>
190 <td>
191                 <p>
192                   <a class="link" href="buffered_read_stream/get_io_service.html" title="buffered_read_stream::get_io_service"><span class="bold"><strong>get_io_service</strong></span></a>
193                 </p>
194               </td>
195 <td>
196                 <p>
197                   Get the io_service associated with the object.
198                 </p>
199               </td>
200 </tr>
201 <tr>
202 <td>
203                 <p>
204                   <a class="link" href="buffered_read_stream/in_avail.html" title="buffered_read_stream::in_avail"><span class="bold"><strong>in_avail</strong></span></a>
205                 </p>
206               </td>
207 <td>
208                 <p>
209                   Determine the amount of data that may be read without blocking.
210                 </p>
211               </td>
212 </tr>
213 <tr>
214 <td>
215                 <p>
216                   <a class="link" href="buffered_read_stream/lowest_layer.html" title="buffered_read_stream::lowest_layer"><span class="bold"><strong>lowest_layer</strong></span></a>
217                 </p>
218               </td>
219 <td>
220                 <p>
221                   Get a reference to the lowest layer.
222                 </p>
223                 <p>
224                   Get a const reference to the lowest layer.
225                 </p>
226               </td>
227 </tr>
228 <tr>
229 <td>
230                 <p>
231                   <a class="link" href="buffered_read_stream/next_layer.html" title="buffered_read_stream::next_layer"><span class="bold"><strong>next_layer</strong></span></a>
232                 </p>
233               </td>
234 <td>
235                 <p>
236                   Get a reference to the next layer.
237                 </p>
238               </td>
239 </tr>
240 <tr>
241 <td>
242                 <p>
243                   <a class="link" href="buffered_read_stream/peek.html" title="buffered_read_stream::peek"><span class="bold"><strong>peek</strong></span></a>
244                 </p>
245               </td>
246 <td>
247                 <p>
248                   Peek at the incoming data on the stream. Returns the number of
249                   bytes read. Throws an exception on failure.
250                 </p>
251                 <p>
252                   Peek at the incoming data on the stream. Returns the number of
253                   bytes read, or 0 if an error occurred.
254                 </p>
255               </td>
256 </tr>
257 <tr>
258 <td>
259                 <p>
260                   <a class="link" href="buffered_read_stream/read_some.html" title="buffered_read_stream::read_some"><span class="bold"><strong>read_some</strong></span></a>
261                 </p>
262               </td>
263 <td>
264                 <p>
265                   Read some data from the stream. Returns the number of bytes read.
266                   Throws an exception on failure.
267                 </p>
268                 <p>
269                   Read some data from the stream. Returns the number of bytes read
270                   or 0 if an error occurred.
271                 </p>
272               </td>
273 </tr>
274 <tr>
275 <td>
276                 <p>
277                   <a class="link" href="buffered_read_stream/write_some.html" title="buffered_read_stream::write_some"><span class="bold"><strong>write_some</strong></span></a>
278                 </p>
279               </td>
280 <td>
281                 <p>
282                   Write the given data to the stream. Returns the number of bytes
283                   written. Throws an exception on failure.
284                 </p>
285                 <p>
286                   Write the given data to the stream. Returns the number of bytes
287                   written, or 0 if an error occurred.
288                 </p>
289               </td>
290 </tr>
291 </tbody>
292 </table></div>
293 <h5>
294 <a name="boost_asio.reference.buffered_read_stream.h2"></a>
295         <span class="phrase"><a name="boost_asio.reference.buffered_read_stream.data_members"></a></span><a class="link" href="buffered_read_stream.html#boost_asio.reference.buffered_read_stream.data_members">Data Members</a>
296       </h5>
297 <div class="informaltable"><table class="table">
298 <colgroup>
299 <col>
300 <col>
301 </colgroup>
302 <thead><tr>
303 <th>
304                 <p>
305                   Name
306                 </p>
307               </th>
308 <th>
309                 <p>
310                   Description
311                 </p>
312               </th>
313 </tr></thead>
314 <tbody><tr>
315 <td>
316                 <p>
317                   <a class="link" href="buffered_read_stream/default_buffer_size.html" title="buffered_read_stream::default_buffer_size"><span class="bold"><strong>default_buffer_size</strong></span></a>
318                 </p>
319               </td>
320 <td>
321                 <p>
322                   The default buffer size.
323                 </p>
324               </td>
325 </tr></tbody>
326 </table></div>
327 <p>
328         The <a class="link" href="buffered_read_stream.html" title="buffered_read_stream"><code class="computeroutput"><span class="identifier">buffered_read_stream</span></code></a> class template
329         can be used to add buffering to the synchronous and asynchronous read operations
330         of a stream.
331       </p>
332 <h5>
333 <a name="boost_asio.reference.buffered_read_stream.h3"></a>
334         <span class="phrase"><a name="boost_asio.reference.buffered_read_stream.thread_safety"></a></span><a class="link" href="buffered_read_stream.html#boost_asio.reference.buffered_read_stream.thread_safety">Thread
335         Safety</a>
336       </h5>
337 <p>
338         <span class="emphasis"><em>Distinct</em></span> <span class="emphasis"><em>objects:</em></span> Safe.
339       </p>
340 <p>
341         <span class="emphasis"><em>Shared</em></span> <span class="emphasis"><em>objects:</em></span> Unsafe.
342       </p>
343 <h5>
344 <a name="boost_asio.reference.buffered_read_stream.h4"></a>
345         <span class="phrase"><a name="boost_asio.reference.buffered_read_stream.requirements"></a></span><a class="link" href="buffered_read_stream.html#boost_asio.reference.buffered_read_stream.requirements">Requirements</a>
346       </h5>
347 <p>
348         <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/buffered_read_stream.hpp</code>
349       </p>
350 <p>
351         <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code>
352       </p>
353 </div>
354 <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
355 <td align="left"></td>
356 <td align="right"><div class="copyright-footer">Copyright &#169; 2003-2014 Christopher M. Kohlhoff<p>
357         Distributed under the Boost Software License, Version 1.0. (See accompanying
358         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>)
359       </p>
360 </div></td>
361 </tr></table>
362 <hr>
363 <div class="spirit-nav">
364 <a accesskey="p" href="buffer_size/overload5.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="buffered_read_stream/async_fill.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a>
365 </div>
366 </body>
367 </html>