![]() |
dfx 0.1.0
Linux-based dynamic dataflow executor
|
Port-level message observation hook. More...
#include <dfx-hooks/Port.hpp>
Public Member Functions | |
| virtual void | onMessageSent (Core::OutputPort const &port, Core::Message const &message)=0 |
| Called when a message is sent through an output port. | |
| virtual void | onMessageReceived (Core::InputPort const &port, Core::Message const &message)=0 |
| Called when a message is received through an input port. | |
Port-level message observation hook.
Port hooks are invoked on every message observed at the port boundary:
This is intentionally separate from dfx::Hooks::Delivery:
|
pure virtual |
Called when a message is received through an input port.
This callback is invoked whenever a message crosses the input port boundary. This correspond to the moment the message is handed to the port.
| port | The input port receiving the message. |
| message | The message being received. |
message is provided as a const reference: hooks must not mutate it. Any exception thrown by the hook is caught, logged, and discarded. Implemented in dfx::Pcapng::Capture.
|
pure virtual |
Called when a message is sent through an output port.
This callback is invoked whenever a message passes through the output port boundary. It does not imply anything about when or whether the destination will consume the message (that depends on the channel/runtime mechanics).
| port | The output port sending the message. |
| message | The message being sent. |
message is provided as a const reference: hooks must not mutate it. Any exception thrown by the hook is caught, logged, and discarded. Implemented in dfx::Pcapng::Capture.