|
conduit 0.6.0
Modern C++23 header-only event-dispatching / event-transport library
|
#include <transport.hpp>


Public Types | |
| using | Callback = std::function< void(const EventEnvelopeView &)> |
Public Member Functions | |
| Transport (Callback cb) | |
| Transport (const std::string_view pattern, Callback cb) | |
| TransportScope | scope () const noexcept override |
| void | dispatch (const EventEnvelopeView &v) override |
| std::size_t | add_route (const std::string_view pattern, Callback cb) |
| Add a new route at runtime. | |
| void | remove_route (const std::size_t id) noexcept |
| std::size_t | route_count () const noexcept |
Public Member Functions inherited from conduit::Transport | |
| Transport ()=default | |
| Transport (const Transport &)=delete | |
| Transport (Transport &&) noexcept=default | |
| Transport & | operator= (const Transport &)=delete |
| Transport & | operator= (Transport &&) noexcept=default |
| ~Transport () override=default | |
| virtual void | attach (Bus &bus) |
| Attach to a bus. | |
| virtual void | attach_with_sink (Bus &bus, InboundSink sink) |
| Attach to a bus using a caller-supplied inbound sink. | |
| virtual void | detach () noexcept |
| virtual void | flush () |
Additional Inherited Members | |
Protected Member Functions inherited from conduit::Transport | |
| void | deliver_inbound (const EventEnvelopeView &v) const |
| Subclasses call this for inbound delivery instead of touching the bus directly. | |
| Bus * | bus () const noexcept |
| using conduit::relay::Transport::Callback = std::function<void(const EventEnvelopeView&)> |
|
inlineexplicit |
|
inline |
|
inline |
Add a new route at runtime.
The returned routine id can be passed to remove_route (the helper that lives here, not the bus's Subscription type — relay routes are owned by the transport itself).
|
inlineoverridevirtual |
Implements conduit::Transport.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlineoverridevirtualnoexcept |
Implements conduit::Transport.