|
C++ Actor Framework 0.18
|
Enables event-based actors to generate messages from a user-defined data exchange format such as JSON and to send the generated messages to another (typed) actor. More...
#include <mtl.hpp>
Public Member Functions | |
| event_based_mtl (Self *self, Adapter adapter, Reader *reader) noexcept | |
| event_based_mtl (const event_based_mtl &) noexcept=default | |
| event_based_mtl & | operator= (const event_based_mtl &) noexcept=default |
| auto | self () |
| auto & | adapter () |
| auto & | reader () |
| template<class... Fs> | |
| bool | try_send (const typed_actor< Fs... > &dst) |
Tries to get a message from the reader that matches any of the accepted inputs of dst and sends the converted messages on success. | |
| template<class... Fs, class Timeout , class OnResult , class OnError > | |
| bool | try_request (const typed_actor< Fs... > &dst, Timeout timeout, OnResult on_result, OnError on_error) |
Tries to get a message from the reader that matches any of the accepted inputs of dst and sends a request message to dst on success. | |
Enables event-based actors to generate messages from a user-defined data exchange format such as JSON and to send the generated messages to another (typed) actor.
| bool caf::event_based_mtl< Self, Adapter, Reader >::try_request | ( | const typed_actor< Fs... > & | dst, |
| Timeout | timeout, | ||
| OnResult | on_result, | ||
| OnError | on_error | ||
| ) |
Tries to get a message from the reader that matches any of the accepted inputs of dst and sends a request message to dst on success.
| dst | The destination for the next message. |
| timeout | The relative timeout for the request message. |
| on_result | The one-shot handler for the response message. This function object must accept all possible response types from dst. |
| on_error | The one-shot handler for timeout and other errors. |
true if the adapter was able to generate and send a message, false otherwise. | bool caf::event_based_mtl< Self, Adapter, Reader >::try_send | ( | const typed_actor< Fs... > & | dst | ) |
Tries to get a message from the reader that matches any of the accepted inputs of dst and sends the converted messages on success.
| dst | The destination for the next message. |
true if the adapter was able to generate and send a message, false otherwise.