asio C++ library

PrevUpHomeNext

experimental::deferred_t::executor_with_default::default_completion_token_type

Specify deferred_t as the default completion token type.

typedef deferred_t default_completion_token_type;
Types

Name

Description

executor_with_default

Adapts an executor to add the deferred_t completion token as the default.

Member Functions

Name

Description

as_default_on [static]

Function helper to adapt an I/O object to use deferred_t as its default completion token type.

deferred_t [constructor]

Default constructor.

operator()

Creates a new deferred from a function.

Passes through anything that is already deferred.

values [static]

Returns a deferred operation that returns the provided values.

when [static]

Creates a conditional object for branching deferred operations.

The experimental::deferred_t class is used to indicate that an asynchronous operation should return a function object which is itself an initiation function. A experimental::deferred_t object may be passed as a completion token to an asynchronous operation, typically using the special value asio::deferred. For example:

auto my_sender
  = my_socket.async_read_some(my_buffer,
      asio::experimental::deferred);

The initiating function (async_read_some in the above example) returns a function object that will lazily initiate the operation.

Requirements

Header: asio/experimental/deferred.hpp

Convenience header: None


PrevUpHomeNext