|
C++ Actor Framework 1.0.0
|
Translates between a message-oriented transport and data flows. More...
#include <flow_bridge_base.hpp>
Inherits UpperLayer.
Public Types | |
| using | input_type = ItemType |
| using | output_type = ItemType |
| using | consumer_type = async::consumer_adapter<output_type> |
| Type for the consumer adapter. We consume the output of the application. | |
| using | producer_type = async::producer_adapter<input_type> |
| Type for the producer adapter. We produce the input of the application. | |
Public Member Functions | |
| virtual bool | write (const output_type &item)=0 |
| bool | running () const noexcept |
| error | init (net::multiplexer *mpx, async::consumer_resource< output_type > pull, async::producer_resource< input_type > push) |
| Initializes consumer and producer of the bridge. | |
| void | self_ref (disposable ref) |
| void | prepare_send () override |
| bool | done_sending () override |
| void | abort (const error &reason) override |
Protected Attributes | |
| LowerLayer * | down_ = nullptr |
| consumer_type | in_ |
| The output of the application. Serialized to the socket. | |
| producer_type | out_ |
| The input to the application. Deserialized from the socket. | |
| disposable | self_ref_ |
| Type-erased handle to the socket_manager. | |
Translates between a message-oriented transport and data flows.
|
protected |
Type-erased handle to the socket_manager.
This reference is important to keep the bridge alive while the manager is not registered for writing or reading.