1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>async_result</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="async_read_until/overload12.html" title="async_read_until (12 of 12 overloads)"> 10<link rel="next" href="async_result/async_result.html" title="async_result::async_result"> 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="async_read_until/overload12.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="async_result/async_result.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.async_result"></a><a class="link" href="async_result.html" title="async_result">async_result</a> 28</h3></div></div></div> 29<p> 30 An interface for customising the behaviour of an initiating function. 31 </p> 32<pre class="programlisting">template< 33 typename CompletionToken, 34 typename Signature> 35class async_result 36</pre> 37<h5> 38<a name="boost_asio.reference.async_result.h0"></a> 39 <span class="phrase"><a name="boost_asio.reference.async_result.types"></a></span><a class="link" href="async_result.html#boost_asio.reference.async_result.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="async_result/completion_handler_type.html" title="async_result::completion_handler_type"><span class="bold"><strong>completion_handler_type</strong></span></a> 63 </p> 64 </td> 65<td> 66 <p> 67 The concrete completion handler type for the specific signature. 68 </p> 69 </td> 70</tr> 71<tr> 72<td> 73 <p> 74 <a class="link" href="async_result/return_type.html" title="async_result::return_type"><span class="bold"><strong>return_type</strong></span></a> 75 </p> 76 </td> 77<td> 78 <p> 79 The return type of the initiating function. 80 </p> 81 </td> 82</tr> 83</tbody> 84</table></div> 85<h5> 86<a name="boost_asio.reference.async_result.h1"></a> 87 <span class="phrase"><a name="boost_asio.reference.async_result.member_functions"></a></span><a class="link" href="async_result.html#boost_asio.reference.async_result.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="async_result/async_result.html" title="async_result::async_result"><span class="bold"><strong>async_result</strong></span></a> <span class="silver">[constructor]</span> 112 </p> 113 </td> 114<td> 115 <p> 116 Construct an async result from a given handler. 117 </p> 118 </td> 119</tr> 120<tr> 121<td> 122 <p> 123 <a class="link" href="async_result/get.html" title="async_result::get"><span class="bold"><strong>get</strong></span></a> 124 </p> 125 </td> 126<td> 127 <p> 128 Obtain the value to be returned from the initiating function. 129 </p> 130 </td> 131</tr> 132<tr> 133<td> 134 <p> 135 <a class="link" href="async_result/initiate.html" title="async_result::initiate"><span class="bold"><strong>initiate</strong></span></a> <span class="silver">[static]</span> 136 </p> 137 </td> 138<td> 139 <p> 140 Initiate the asynchronous operation that will produce the result, 141 and obtain the value to be returned from the initiating function. 142 </p> 143 </td> 144</tr> 145</tbody> 146</table></div> 147<p> 148 The <a class="link" href="async_result.html" title="async_result"><code class="computeroutput">async_result</code></a> 149 traits class is used for determining: 150 </p> 151<div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "> 152<li class="listitem"> 153 the concrete completion handler type to be called at the end of the asynchronous 154 operation; 155 </li> 156<li class="listitem"> 157 the initiating function return type; and 158 </li> 159<li class="listitem"> 160 how the return value of the initiating function is obtained. 161 </li> 162</ul></div> 163<p> 164 The trait allows the handler and return types to be determined at the point 165 where the specific completion handler signature is known. 166 </p> 167<p> 168 This template may be specialised for user-defined completion token types. 169 The primary template assumes that the CompletionToken is the completion handler. 170 </p> 171<h5> 172<a name="boost_asio.reference.async_result.h2"></a> 173 <span class="phrase"><a name="boost_asio.reference.async_result.requirements"></a></span><a class="link" href="async_result.html#boost_asio.reference.async_result.requirements">Requirements</a> 174 </h5> 175<p> 176 <span class="emphasis"><em>Header: </em></span><code class="literal">boost/asio/async_result.hpp</code> 177 </p> 178<p> 179 <span class="emphasis"><em>Convenience header: </em></span><code class="literal">boost/asio.hpp</code> 180 </p> 181</div> 182<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> 183<td align="left"></td> 184<td align="right"><div class="copyright-footer">Copyright © 2003-2020 Christopher M. 185 Kohlhoff<p> 186 Distributed under the Boost Software License, Version 1.0. (See accompanying 187 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>) 188 </p> 189</div></td> 190</tr></table> 191<hr> 192<div class="spirit-nav"> 193<a accesskey="p" href="async_read_until/overload12.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="async_result/async_result.html"><img src="../../../../doc/src/images/next.png" alt="Next"></a> 194</div> 195</body> 196</html> 197