• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html>
2<head>
3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
4<title>ssl_stream::async_handshake (2 of 2 overloads)</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="../../../../index.html" title="Chapter 1. Boost.Beast">
8<link rel="up" href="../async_handshake.html" title="ssl_stream::async_handshake">
9<link rel="prev" href="overload1.html" title="ssl_stream::async_handshake (1 of 2 overloads)">
10<link rel="next" href="../shutdown.html" title="ssl_stream::shutdown">
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="overload1.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../async_handshake.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../shutdown.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
24</div>
25<div class="section">
26<div class="titlepage"><div><div><h6 class="title">
27<a name="beast.ref.boost__beast__ssl_stream.async_handshake.overload2"></a><a class="link" href="overload2.html" title="ssl_stream::async_handshake (2 of 2 overloads)">ssl_stream::async_handshake
28          (2 of 2 overloads)</a>
29</h6></div></div></div>
30<p>
31            Start an asynchronous SSL handshake.
32          </p>
33<h7><a name="beast.ref.boost__beast__ssl_stream.async_handshake.overload2.h0"></a>
34            <span class="phrase"><a name="beast.ref.boost__beast__ssl_stream.async_handshake.overload2.synopsis"></a></span><a class="link" href="overload2.html#beast.ref.boost__beast__ssl_stream.async_handshake.overload2.synopsis">Synopsis</a>
35          </h7><pre class="programlisting"><span class="keyword">template</span><span class="special">&lt;</span>
36    <span class="keyword">class</span> <a href="../../../../../../../../doc/html/boost_asio/reference/ConstBufferSequence.html" target="_top"><span class="emphasis"><em>ConstBufferSequence</em></span></a><span class="special">,</span>
37    <span class="keyword">class</span> <span class="identifier">BufferedHandshakeHandler</span><span class="special">&gt;</span>
38<a href="../../../../../../../../doc/html/boost_asio/reference/asynchronous_operations.html#boost_asio.reference.asynchronous_operations.automatic_deduction_of_initiating_function_return_type" target="_top"><span class="emphasis"><em>DEDUCED</em></span></a>
39<span class="identifier">async_handshake</span><span class="special">(</span>
40    <span class="identifier">handshake_type</span> <span class="identifier">type</span><span class="special">,</span>
41    <span class="identifier">ConstBufferSequence</span> <span class="keyword">const</span><span class="special">&amp;</span> <span class="identifier">buffers</span><span class="special">,</span>
42    <span class="identifier">BOOST_ASIO_MOVE_ARG</span><span class="special">(</span><span class="identifier">BufferedHandshakeHandler</span><span class="special">)</span> <span class="identifier">handler</span><span class="special">);</span>
43</pre>
44<h7><a name="beast.ref.boost__beast__ssl_stream.async_handshake.overload2.h1"></a>
45            <span class="phrase"><a name="beast.ref.boost__beast__ssl_stream.async_handshake.overload2.description"></a></span><a class="link" href="overload2.html#beast.ref.boost__beast__ssl_stream.async_handshake.overload2.description">Description</a>
46          </h7><p>
47            This function is used to asynchronously perform an SSL handshake on the
48            stream. This function call always returns immediately.
49          </p>
50<h7><a name="beast.ref.boost__beast__ssl_stream.async_handshake.overload2.h2"></a>
51            <span class="phrase"><a name="beast.ref.boost__beast__ssl_stream.async_handshake.overload2.parameters"></a></span><a class="link" href="overload2.html#beast.ref.boost__beast__ssl_stream.async_handshake.overload2.parameters">Parameters</a>
52          </h7><div class="informaltable"><table class="table">
53<colgroup>
54<col>
55<col>
56</colgroup>
57<thead><tr>
58<th>
59                    <p>
60                      Name
61                    </p>
62                  </th>
63<th>
64                    <p>
65                      Description
66                    </p>
67                  </th>
68</tr></thead>
69<tbody>
70<tr>
71<td>
72                    <p>
73                      <code class="computeroutput"><span class="identifier">type</span></code>
74                    </p>
75                  </td>
76<td>
77                    <p>
78                      The type of handshaking to be performed, i.e. as a client or
79                      as a server.
80                    </p>
81                  </td>
82</tr>
83<tr>
84<td>
85                    <p>
86                      <code class="computeroutput"><span class="identifier">buffers</span></code>
87                    </p>
88                  </td>
89<td>
90                    <p>
91                      The buffered data to be reused for the handshake. Although
92                      the buffers object may be copied as necessary, ownership of
93                      the underlying buffers is retained by the caller, which must
94                      guarantee that they remain valid until the handler is called.
95                    </p>
96                  </td>
97</tr>
98<tr>
99<td>
100                    <p>
101                      <code class="computeroutput"><span class="identifier">handler</span></code>
102                    </p>
103                  </td>
104<td>
105                    <p>
106                      The handler to be called when the handshake operation completes.
107                      Copies will be made of the handler as required. The equivalent
108                      function signature of the handler must be:
109                    </p>
110<pre xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="table-programlisting"> <span class="keyword">void</span> <span class="identifier">handler</span><span class="special">(</span>
111  <span class="keyword">const</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">system</span><span class="special">::</span><span class="identifier">error_code</span><span class="special">&amp;</span> <span class="identifier">error</span><span class="special">,</span> <span class="comment">// Result of operation.</span>
112  <span class="identifier">std</span><span class="special">::</span><span class="identifier">size_t</span> <span class="identifier">bytes_transferred</span> <span class="comment">// Amount of buffers used in handshake.</span>
113<span class="special">);</span>
114</pre>
115                  </td>
116</tr>
117</tbody>
118</table></div>
119</div>
120<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
121<td align="left"></td>
122<td align="right"><div class="copyright-footer">Copyright © 2016-2019 Vinnie
123      Falco<p>
124        Distributed under the Boost Software License, Version 1.0. (See accompanying
125        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>)
126      </p>
127</div></td>
128</tr></table>
129<hr>
130<div class="spirit-nav">
131<a accesskey="p" href="overload1.html"><img src="../../../../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../async_handshake.html"><img src="../../../../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../../index.html"><img src="../../../../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../shutdown.html"><img src="../../../../../../../../doc/src/images/next.png" alt="Next"></a>
132</div>
133</body>
134</html>
135