VLink  2.0.0
A high-performance communication middleware
node_impl.h File Reference

Foundational base classes shared by every transport-backed VLink node. More...

#include <any>
#include <atomic>
#include <memory>
#include <string>
#include "../base/bytes.h"
#include "../base/cpu_profiler.h"
#include "../base/functional.h"
#include "../extension/security.h"
#include "../extension/status.h"
#include "../impl/conf.h"
#include "../impl/types.h"
#include "./intra_data.h"
#include "./ssl_options.h"
Include dependency graph for node_impl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  vlink::AbstractNode
 Tiny mix-in that exposes the backend-native handle behind a node. More...
 
class  vlink::NodeImpl
 Backbone of every transport-specific VLink node implementation. More...
 

Namespaces

 

Detailed Description

Foundational base classes shared by every transport-backed VLink node.

This is an internal implementation header used by the public node templates (Publisher, Subscriber, Client, Server, Setter, Getter) and by every transport backend; it is not part of the public API surface. The header introduces two cooperating base classes:

  • AbstractNode – exposes a single get_native_handle() escape hatch so advanced users can reach the transport-native object behind a node.
  • NodeImpl – the heavyweight base that every PublisherImpl, SubscriberImpl, ServerImpl, ClientImpl, SetterImpl and GetterImpl ultimately derive from. It centralises lifecycle hooks, property storage, message-loop attachment, interruption signalling and the ancillary observability paths used by discovery, recording and proxying.
NodeImpl interface contract
Concern API surface
Transport lifecycle init() / deinit()
Zero-copy loans loan() / return_loan() / set_manual_unloan
Suspend / resume suspend() / resume() / is_suspend()
Interrupt interrupt() / reset_interrupted() / is_interrupted
Property store set_property() / get_property() / get_all_properties
Message loop binding attach() / detach() / get_message_loop()
Status callbacks register_status_handler() / call_status()
Recording set_record_path() / try_record()
Extension / security init_ext() / deinit_ext() / enable_security()
Version probe check_version()
Process bootstrap static global_init()
Lifecycle
construct -> set_property -> enable_security -> init -> init_ext
^ ^
| |
attach(loop) ---+ | active
|
interrupt -> reset_interrupted (optional)
|
v
deinit_ext -> deinit -> destroy
ImplType / SecurityType / InitType
  • ImplType (defined in types.h) is captured at construction time and exposes the node role to discovery / proxy.
  • SecurityType is the template parameter on the public node templates that selects whether enable_security() runs.
  • InitType (also from types.h) controls whether the public template calls init() immediately or defers it until the user invokes init() manually.
Callback signatures
Alias Signature Used by
ConnectCallback void(bool) Publisher/Client/Server peers
StatusCallback void(const Status::BasePtr&) DDS-family status reporting
SyncCallback void() SetterImpl late-getter sync
ReqRespCallback void(uint64_t, const Bytes&, Bytes*) ServerImpl request handling
MsgCallback void(const Bytes&) SubscriberImpl / GetterImpl
IntraMsgCallback void(const IntraData&) intra:// subscriber