ゴミ箱
|
#include <async_result.hpp>
Public Types | |
using | completion_handler_type = typename async_result< typename std::decay< CompletionToken >::type, Signature >::completion_handler_type |
Public Member Functions | |
async_completion (CompletionToken &token) | |
Public Attributes | |
std::conditional< std::is_same< CompletionToken, completion_handler_type >::value, completion_handler_type &, completion_handler_type >::type | completion_handler |
The final completion handler, callable with the specified signature. More... | |
async_result< typename std::decay< CompletionToken >::type, Signature > | result |
The return value of the asynchronous initiation function. More... | |
Helper for customizing the return type of asynchronous initiation functions.
This class template is used to transform caller-provided completion handlers in calls to asynchronous initiation functions. The transformation allows customization of the return type of the initiating function, and the function signature of the final handler.
Example:
CompletionToken | Specifies the model used to obtain the result of the asynchronous operation. |
Signature | The call signature for the completion handler type invoked on completion of the asynchronous operation. |
using boost::beast::async_completion< CompletionToken, Signature >::completion_handler_type = typename async_result< typename std::decay<CompletionToken>::type, Signature>::completion_handler_type |
The type of the final handler called by the asynchronous initiation function.
Objects of this type will be callable with the specified signature.
|
inlineexplicit |
Constructor
The constructor creates the concrete completion handler and makes the link between the handler and the asynchronous result.
token | The completion token. If this is a regular completion handler, copies may be made as needed. If the handler is movable, it may also be moved. |
std::conditional<std::is_same< CompletionToken, completion_handler_type>::value, completion_handler_type&, completion_handler_type >::type boost::beast::async_completion< CompletionToken, Signature >::completion_handler |
The final completion handler, callable with the specified signature.
async_result<typename std::decay< CompletionToken>::type, Signature> boost::beast::async_completion< CompletionToken, Signature >::result |
The return value of the asynchronous initiation function.