libcaf  0.15.3
Public Types | Public Member Functions | List of all members
caf::mixin::requester< Base, Subtype > Class Template Reference

A requester is an actor that supports `self->request(...). More...

#include <requester.hpp>

Inherits Base.

Public Types

using extended_base = requester
 

Public Member Functions

template<class... Ts>
 requester (Ts &&...xs)
 
template<message_priority P = message_priority::normal, class Handle = actor, class... Ts>
response_handle< Subtype, response_type_t< typename Handle::signatures, typename detail::implicit_conversions< typename std::decay< Ts >::type >::type... >, is_blocking_requester< Subtype >::value > request (const Handle &dest, const duration &timeout, Ts &&...xs)
 Sends {xs...} as a synchronous message to dest with priority mp. More...
 
template<message_priority P = message_priority::normal, class Rep = int, class Period = std::ratio<1>, class Handle = actor, class... Ts>
response_handle< Subtype, response_type_t< typename Handle::signatures, typename detail::implicit_conversions< typename std::decay< Ts >::type >::type... >, is_blocking_requester< Subtype >::value > request (const Handle &dest, std::chrono::duration< Rep, Period > timeout, Ts &&...xs)
 Sends {xs...} as a synchronous message to dest with priority mp. More...
 

Detailed Description

template<class Base, class Subtype>
class caf::mixin::requester< Base, Subtype >

A requester is an actor that supports `self->request(...).

{then|await|receive}`.

Member Function Documentation

template<class Base , class Subtype >
template<message_priority P = message_priority::normal, class Handle = actor, class... Ts>
response_handle<Subtype, response_type_t< typename Handle::signatures, typename detail::implicit_conversions< typename std::decay<Ts>::type >::type...>, is_blocking_requester<Subtype>::value> caf::mixin::requester< Base, Subtype >::request ( const Handle &  dest,
const duration timeout,
Ts &&...  xs 
)

Sends {xs...} as a synchronous message to dest with priority mp.

Returns
A handle identifying a future-like handle to the response.
Warning
The returned handle is actor specific and the response to the sent message cannot be received by another actor.
template<class Base , class Subtype >
template<message_priority P = message_priority::normal, class Rep = int, class Period = std::ratio<1>, class Handle = actor, class... Ts>
response_handle<Subtype, response_type_t< typename Handle::signatures, typename detail::implicit_conversions< typename std::decay<Ts>::type >::type...>, is_blocking_requester<Subtype>::value> caf::mixin::requester< Base, Subtype >::request ( const Handle &  dest,
std::chrono::duration< Rep, Period >  timeout,
Ts &&...  xs 
)

Sends {xs...} as a synchronous message to dest with priority mp.

Returns
A handle identifying a future-like handle to the response.
Warning
The returned handle is actor specific and the response to the sent message cannot be received by another actor.

The documentation for this class was generated from the following file: