|
VLink
2.0.0
A high-performance communication middleware
|
Transport-neutral base class for every event-model subscriber implementation. More...
#include "./node_impl.h"Go to the source code of this file.
Classes | |
| class | vlink::SubscriberImpl |
| Event-model receive base shared by every transport-specific subscriber. More... | |
Namespaces | |
| vlink | |
Transport-neutral base class for every event-model subscriber implementation.
This is an internal implementation header used by the public Subscriber template; applications should depend on subscriber.h. SubscriberImpl extends NodeImpl with the receive-side semantics: two listen overloads cover the serialised wire path (the default) and the zero-copy in-process path used only by the intra backend, plus optional latency / loss tracking that mirrors GetterImpl.
impl_type with kSubscriber so subscriptions are tagged correctly in discovery, recording and proxy paths.Conf::create_subscriber().Subscriber template calls listen() once the user installs a callback; is_listened becomes true on success.set_latency_and_lost_enabled() may be toggled before or after listen.init() / deinit() inherited from NodeImpl drive the transport.| Capability | Provider |
|---|---|
| Wire receive callback | Subclass override of listen(MsgCallback&&) |
| Zero-copy in-process callback | IntraSubscriberImpl override of listen(IntraMsgCallback&&) |
| Latency / loss reporting | Subclass overrides of the optional getters |
| Listen state flag | is_listened (set by Subscriber) |
| Method | Default | Subclass duty |
|---|---|---|
listen(MsgCallback&&) | Pure virtual | Wire transport receiver |
listen(IntraMsgCallback&&) | Warns, returns false | Only intra:// overrides |
set_latency_and_lost_enabled(bool) | No-op | Toggle instrumentation |
is_latency_and_lost_enabled() const | Returns false | Report tracking state |
get_latency() const | Returns 0 | Latest measured latency |
get_lost() const | Returns zero SampleLostInfo | Cumulative loss stats |