boost::asio::dispatch

Submits a completion token or function object for execution.

Synopses

Declared in <boost/asio/dispatch.hpp>

Submits a completion token or function object for execution.

template<boost::asio::completion_token_for<void()> NullaryToken>
decltype(async_initiate<NullaryToken, void()>(
      declval<detail::initiate_dispatch>(), token))
dispatch(NullaryToken&& token);

Submits a completion token or function object for execution.

template<
    typename ExecutionContext,
    boost::asio::completion_token_for<void()> NullaryToken = default_completion_token_t<ExecutionContext::executor_type>>
decltype(async_initiate<NullaryToken, void()>(
      declval<detail::initiate_dispatch_with_executor<
        typename ExecutionContext::executor_type>>(), token))
dispatch(
    ExecutionContext& ctx,
    NullaryToken&& token = default_completion_token_t<
      typename ExecutionContext::executor_type>(),
    int = 0);

Submits a completion token or function object for execution.

template<
    typename Executor,
    boost::asio::completion_token_for<void()> NullaryToken = default_completion_token_t<Executor>>
decltype(async_initiate<NullaryToken, void()>(
      declval<detail::initiate_dispatch_with_executor<Executor>>(), token))
dispatch(
    Executor const& ex,
    NullaryToken&& token = default_completion_token_t<Executor>(),
    int = 0);

Return Value

  • This function returns , where Init is a function object type defined as:

  • .

Parameters

Name

Description

token

The completion_token that will be used to produce a completion handler. The function signature of the completion handler must be:

ctx

An execution context, from which the target executor is obtained.

ex

The target executor.

Created with MrDocs