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

Transport configuration for the intra:// in-process / zero-copy transport. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Detailed Description

Transport configuration for the intra:// in-process / zero-copy transport.

IntraConf binds the intra:// URL scheme to VLink's in-process message bus. Publishers and subscribers that share the same OS process exchange messages directly through an in-memory queue without crossing kernel or network boundaries. When the payload is an IntraDataType (a shared-pointer wrapper around the message), serialisation is bypassed entirely and the pointer is handed off zero-copy; all other types take the normal Serializer path.

Zero-Copy Hand-off Path
Publisher MessageBus Subscriber
--------- ---------- ----------
IntraDataType<T> ----enqueue-> ring buffer (shared_ptr only) -> IntraDataType<T>
pod / proto / etc --serialize-> Bytes -------------------------> deserialize -> T
Supported Node Types
Publisher Subscriber Server Client Getter Setter
yes yes yes yes yes yes
URL Format
intra://<address>[?event=<name>&pipeline=<id>][#<type>]
Component Description
address In-process topic name (URL host concatenated with path); not empty
event Optional secondary event filter (?event=)
pipeline Queue-mode pipeline ID (?pipeline=); 0 selects the default pipe
type URL fragment; "queue" (buffered) or "direct" (inline dispatch)
Delivery Modes
Mode Wakeup latency Threading Use case
queue Bounded Subscriber loop drains the bus Default; decoupled timing
direct Synchronous Caller thread invokes callback Hot loops, low latency
Example
auto pub = vlink::Publisher<MyMsg>::create_unique("intra://sensors/imu");
auto sub = vlink::Subscriber<MyMsg>::create_unique("intra://sensors/imu");
auto fast = vlink::Publisher<MyMsg>::create_unique("intra://control/cmd#direct");
auto pipe = vlink::Publisher<MyMsg>::create_unique("intra://svc?event=ev&pipeline=4");
Note
Compiled only when VLINK_SUPPORT_INTRA is defined.
address must not be empty; is_valid() additionally requires type to be either "queue" or "direct".