|
VLink
2.0.0
A high-performance communication middleware
|
Transport-neutral base class for every event-model publisher implementation. More...
Go to the source code of this file.
Classes | |
| class | vlink::PublisherImpl |
| Publish-side base shared by every transport-specific publisher. More... | |
Namespaces | |
| vlink | |
Transport-neutral base class for every event-model publisher implementation.
This is an internal implementation header used by the public Publisher template; applications should depend on publisher.h. PublisherImpl extends NodeImpl with the publish-side bookkeeping that lets a transport detect subscriber presence and dispatch payloads either as serialised bytes (the common case) or as zero-copy in-process IntraData (only the intra backend overrides that path).
impl_type with kPublisher, allowing discovery and recording layers to label the produced frames correctly.Publisher template calls init() once the conf is wired.detect_subscribers() may be installed at any time; if a subscriber is already known it fires once immediately.write() (overload chosen by the user) produces frames until interrupt() is called, after which reset_interrupted() can be used to resume.| Capability | Owner |
|---|---|
| Serialised write path | Subclass override of write(const Bytes&) |
| Zero-copy intra write | IntraPublisherImpl override of write(IntraData) |
| Subscriber presence query | Subclass override of has_subscribers() |
| Presence change publishing | update_subscribers() in this class |
| Wait-for-subscriber gate | wait_for_subscribers() / helper CV |
| Method | Default | Subclass duty |
|---|---|---|
has_subscribers() const | Pure virtual | Query transport |
write(const Bytes&) | Pure virtual | Publish wire frame |
write(const IntraData&) | Warns, returns false | Only intra:// overrides |
detect_subscribers(cb) | Stores callback | Usually inherited |
wait_for_subscribers(timeout) | Helper CV wait | Usually inherited |
update_subscribers() | Implemented here | Call from transport thread |