| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"> |
| <title>ssl::stream</title> |
| <link rel="stylesheet" href="../../../../doc/src/boostbook.css" type="text/css"> |
| <meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> |
| <link rel="home" href="../../boost_asio.html" title="Boost.Asio"> |
| <link rel="up" href="../reference.html" title="Reference"> |
| <link rel="prev" href="ssl__context_service/use_tmp_dh_file.html" title="ssl::context_service::use_tmp_dh_file"> |
| <link rel="next" href="ssl__stream/async_handshake.html" title="ssl::stream::async_handshake"> |
| </head> |
| <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> |
| <table cellpadding="2" width="100%"><tr> |
| <td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../boost.png"></td> |
| <td align="center"><a href="../../../../index.html">Home</a></td> |
| <td align="center"><a href="../../../../libs/libraries.htm">Libraries</a></td> |
| <td align="center"><a href="http://www.boost.org/users/people.html">People</a></td> |
| <td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td> |
| <td align="center"><a href="../../../../more/index.htm">More</a></td> |
| </tr></table> |
| <hr> |
| <div class="spirit-nav"> |
| <a accesskey="p" href="ssl__context_service/use_tmp_dh_file.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="ssl__stream/async_handshake.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| <div class="section"> |
| <div class="titlepage"><div><div><h3 class="title"> |
| <a name="boost_asio.reference.ssl__stream"></a><a class="link" href="ssl__stream.html" title="ssl::stream">ssl::stream</a> |
| </h3></div></div></div> |
| <p> |
| Provides stream-oriented functionality using SSL. |
| </p> |
| <pre class="programlisting"><span class="keyword">template</span><span class="special"><</span> |
| <span class="keyword">typename</span> <span class="identifier">Stream</span><span class="special">,</span> |
| <span class="keyword">typename</span> <a class="link" href="Service.html" title="Service requirements">Service</a> <span class="special">=</span> <span class="identifier">stream_service</span><span class="special">></span> |
| <span class="keyword">class</span> <span class="identifier">stream</span> <span class="special">:</span> |
| <span class="keyword">public</span> <span class="identifier">ssl</span><span class="special">::</span><span class="identifier">stream_base</span> |
| </pre> |
| <a name="boost_asio.reference.ssl__stream.types"></a><h5> |
| <a name="id1340392"></a> |
| <a class="link" href="ssl__stream.html#boost_asio.reference.ssl__stream.types">Types</a> |
| </h5> |
| <div class="informaltable"><table class="table"> |
| <colgroup> |
| <col> |
| <col> |
| </colgroup> |
| <thead><tr> |
| <th> |
| <p> |
| Name |
| </p> |
| </th> |
| <th> |
| <p> |
| Description |
| </p> |
| </th> |
| </tr></thead> |
| <tbody> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/handshake_type.html" title="ssl::stream::handshake_type"><span class="bold"><strong>handshake_type</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Different handshake types. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/impl_type.html" title="ssl::stream::impl_type"><span class="bold"><strong>impl_type</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| The native implementation type of the stream. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/lowest_layer_type.html" title="ssl::stream::lowest_layer_type"><span class="bold"><strong>lowest_layer_type</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| The type of the lowest layer. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/next_layer_type.html" title="ssl::stream::next_layer_type"><span class="bold"><strong>next_layer_type</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| The type of the next layer. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/service_type.html" title="ssl::stream::service_type"><span class="bold"><strong>service_type</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| The type of the service that will be used to provide stream operations. |
| </p> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <a name="boost_asio.reference.ssl__stream.member_functions"></a><h5> |
| <a name="id1340598"></a> |
| <a class="link" href="ssl__stream.html#boost_asio.reference.ssl__stream.member_functions">Member |
| Functions</a> |
| </h5> |
| <div class="informaltable"><table class="table"> |
| <colgroup> |
| <col> |
| <col> |
| </colgroup> |
| <thead><tr> |
| <th> |
| <p> |
| Name |
| </p> |
| </th> |
| <th> |
| <p> |
| Description |
| </p> |
| </th> |
| </tr></thead> |
| <tbody> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/async_handshake.html" title="ssl::stream::async_handshake"><span class="bold"><strong>async_handshake</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Start an asynchronous SSL handshake. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/async_read_some.html" title="ssl::stream::async_read_some"><span class="bold"><strong>async_read_some</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Start an asynchronous read. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/async_shutdown.html" title="ssl::stream::async_shutdown"><span class="bold"><strong>async_shutdown</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Asynchronously shut down SSL on the stream. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/async_write_some.html" title="ssl::stream::async_write_some"><span class="bold"><strong>async_write_some</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Start an asynchronous write. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/get_io_service.html" title="ssl::stream::get_io_service"><span class="bold"><strong>get_io_service</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Get the io_service associated with the object. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/handshake.html" title="ssl::stream::handshake"><span class="bold"><strong>handshake</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Perform SSL handshaking. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/impl.html" title="ssl::stream::impl"><span class="bold"><strong>impl</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Get the underlying implementation in the native type. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/in_avail.html" title="ssl::stream::in_avail"><span class="bold"><strong>in_avail</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Determine the amount of data that may be read without blocking. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/io_service.html" title="ssl::stream::io_service"><span class="bold"><strong>io_service</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| (Deprecated: use get_io_service().) Get the io_service associated |
| with the object. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/lowest_layer.html" title="ssl::stream::lowest_layer"><span class="bold"><strong>lowest_layer</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Get a reference to the lowest layer. |
| </p> |
| <p> |
| Get a const reference to the lowest layer. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/next_layer.html" title="ssl::stream::next_layer"><span class="bold"><strong>next_layer</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Get a reference to the next layer. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/peek.html" title="ssl::stream::peek"><span class="bold"><strong>peek</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Peek at the incoming data on the stream. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/read_some.html" title="ssl::stream::read_some"><span class="bold"><strong>read_some</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Read some data from the stream. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/shutdown.html" title="ssl::stream::shutdown"><span class="bold"><strong>shutdown</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Shut down SSL on the stream. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/stream.html" title="ssl::stream::stream"><span class="bold"><strong>stream</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Construct a stream. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/write_some.html" title="ssl::stream::write_some"><span class="bold"><strong>write_some</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Write some data to the stream. |
| </p> |
| </td> |
| </tr> |
| <tr> |
| <td> |
| <p> |
| <a class="link" href="ssl__stream/_stream.html" title="ssl::stream::~stream"><span class="bold"><strong>~stream</strong></span></a> |
| </p> |
| </td> |
| <td> |
| <p> |
| Destructor. |
| </p> |
| </td> |
| </tr> |
| </tbody> |
| </table></div> |
| <p> |
| The stream class template provides asynchronous and blocking stream-oriented |
| functionality using SSL. |
| </p> |
| <a name="boost_asio.reference.ssl__stream.thread_safety"></a><h5> |
| <a name="id1341167"></a> |
| <a class="link" href="ssl__stream.html#boost_asio.reference.ssl__stream.thread_safety">Thread Safety</a> |
| </h5> |
| <p> |
| <span class="bold"><strong>Distinct</strong></span> <span class="bold"><strong>objects:</strong></span> |
| Safe. |
| </p> |
| <p> |
| <span class="bold"><strong>Shared</strong></span> <span class="bold"><strong>objects:</strong></span> |
| Unsafe. |
| </p> |
| <a name="boost_asio.reference.ssl__stream.example"></a><h5> |
| <a name="id1341218"></a> |
| <a class="link" href="ssl__stream.html#boost_asio.reference.ssl__stream.example">Example</a> |
| </h5> |
| <p> |
| To use the SSL stream template with an <code class="computeroutput"><span class="identifier">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span></code>, you would write: |
| </p> |
| <pre class="programlisting"><span class="identifier">boost</span><span class="special">::</span><span class="identifier">asio</span><span class="special">::</span><span class="identifier">io_service</span> <span class="identifier">io_service</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">ssl</span><span class="special">::</span><span class="identifier">context</span> <span class="identifier">context</span><span class="special">(</span><span class="identifier">io_service</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">ssl</span><span class="special">::</span><span class="identifier">context</span><span class="special">::</span><span class="identifier">sslv23</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">ssl</span><span class="special">::</span><span class="identifier">stream</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">ip</span><span class="special">::</span><span class="identifier">tcp</span><span class="special">::</span><span class="identifier">socket</span><span class="special">></span> <span class="identifier">sock</span><span class="special">(</span><span class="identifier">io_service</span><span class="special">,</span> <span class="identifier">context</span><span class="special">);</span> |
| </pre> |
| <a name="boost_asio.reference.ssl__stream.requirements"></a><h5> |
| <a name="id1341514"></a> |
| <a class="link" href="ssl__stream.html#boost_asio.reference.ssl__stream.requirements">Requirements</a> |
| </h5> |
| <p> |
| <span class="bold"><strong>Header: </strong></span><code class="literal">boost/asio/ssl/stream.hpp</code> |
| </p> |
| <p> |
| <span class="bold"><strong>Convenience header: </strong></span><code class="literal">boost/asio/ssl.hpp</code> |
| </p> |
| </div> |
| <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> |
| <td align="left"></td> |
| <td align="right"><div class="copyright-footer">Copyright © 2003 - 2010 Christopher M. Kohlhoff<p> |
| Distributed under the Boost Software License, Version 1.0. (See accompanying |
| 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>) |
| </p> |
| </div></td> |
| </tr></table> |
| <hr> |
| <div class="spirit-nav"> |
| <a accesskey="p" href="ssl__context_service/use_tmp_dh_file.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="ssl__stream/async_handshake.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> |
| </div> |
| </body> |
| </html> |