Asio Extensions
Additional functionality built on top of (Boost.)Asio
asioext::async_result< CompletionToken, Signature > Class Template Reference

An interface for customising the behaviour of an initiating function. More...

#include <asioext/async_result.hpp>

Public Types

typedef asio::handler_type< CompletionToken, Signature >::type completion_handler_type
 
typedef asio::async_result< completion_handler_type >::type return_type
 

Public Member Functions

 async_result (completion_handler_type &h)
 Construct an async result from a given handler. More...
 
return_type get ()
 Obtain the value to be returned from the initiating function. More...
 

Detailed Description

template<typename CompletionToken, typename Signature = void>
class asioext::async_result< CompletionToken, Signature >

An interface for customising the behaviour of an initiating function.

Note
This type is the same as asio::async_result if Asio 1.11.0+ is used. For prior versions this is a compatibility type that obtains the completion handler type from asio::handler_type and the return type from asio::async_result.

Member Typedef Documentation

◆ completion_handler_type

template<typename CompletionToken, typename Signature = void>
typedef asio::handler_type<CompletionToken, Signature>::type asioext::async_result< CompletionToken, Signature >::completion_handler_type

◆ return_type

template<typename CompletionToken, typename Signature = void>
typedef asio::async_result<completion_handler_type>::type asioext::async_result< CompletionToken, Signature >::return_type

Constructor & Destructor Documentation

◆ async_result()

template<typename CompletionToken, typename Signature = void>
asioext::async_result< CompletionToken, Signature >::async_result ( completion_handler_type h)
inlineexplicit

Construct an async result from a given handler.

Member Function Documentation

◆ get()

template<typename CompletionToken, typename Signature = void>
return_type asioext::async_result< CompletionToken, Signature >::get ( )
inline

Obtain the value to be returned from the initiating function.