184 std::unique_ptr<struct PublisherImplHelper> helper_;
Versatile 128-byte byte buffer with SBO, five ownership modes and compression helpers.
Definition bytes.h:113
std::function< void(bool)> ConnectCallback
Callback invoked when the peer connection state changes.
Definition node_impl.h:148
virtual bool has_subscribers() const =0
Returns true when at least one subscriber is currently connected.
void update_subscribers()
Notifies the subscriber-detection subsystem that subscriber presence may have changed.
PublisherImpl()
Protected constructor; initialises the publisher with kPublisher role.
~PublisherImpl() override
Destructor.
void interrupt() override
Interrupts the publisher, waking any blocked wait_for_subscribers() call.
virtual bool wait_for_subscribers(std::chrono::milliseconds timeout)
Blocks until at least one subscriber is present or the timeout elapses.
virtual void detect_subscribers(ConnectCallback &&callback)
Registers a callback to be fired when the subscriber presence changes.
virtual bool write(const Bytes &msg_data)=0
Publishes a serialised message to all connected subscribers.
virtual bool write(const IntraData &intra_data)
Publishes an in-process zero-copy message.
#define VLINK_EXPORT
Definition macros.h:85
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition macros.h:184
std::shared_ptr< IntraDataType > IntraData
Shared-ownership handle for an IntraDataType payload.
Definition intra_data.h:96
Abstract transport node base classes used by all VLink node implementations.