...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
The real handler type to be used for the asynchronous operation.
typedef boost::asio::async_result< decay_t< CompletionToken >, Signatures... >::completion_handler_type completion_handler_type;
Name |
Description |
---|---|
(Legacy.) The concrete completion handler type for the specific signature. |
|
(Legacy.) The return type of the initiating function. |
Name |
Description |
---|---|
async_result [constructor] |
(Legacy.) Construct an async result from a given handler. |
(Legacy.) Obtain the value to be returned from the initiating function. |
|
initiate [static] |
Initiate the asynchronous operation that will produce the result, and obtain the value to be returned from the initiating function. |
The async_result
trait is a customisation point that is used within the initiating function
for an asynchronous
operation. The trait combines:
Specialisations of the trait must satisfy the async_result_requirements, and are reponsible for determining:
This template may be specialised for user-defined completion token types. The primary template assumes that the CompletionToken is the already a concrete completion handler.
For backwards compatibility, the primary template implements member types
and functions that are associated with legacy forms of the async_result
trait. These are
annotated as "Legacy" in the documentation below. User specialisations
of this trait do not need to implement these in order to satisfy the async_result_requirements.
In general, implementers of asynchronous operations should use the async_initiate
function rather than using the async_result
trait directly.
Header: boost/asio/async_result.hpp
Convenience header: boost/asio.hpp