Module subscriber

Module subscriber 

Source
Expand description

High-level subscription API — Zenoh-inspired pub/sub over NDN sync.

Subscriber joins a sync group, receives notifications of new data from peers, and optionally auto-fetches the data.

§Example

use ndn_app::Subscriber;

let mut sub = Subscriber::connect("/run/nfd/nfd.sock", "/chat/room1").await?;

while let Some(sample) = sub.recv().await {
    println!("{}: {:?}", sample.name, sample.payload);
}

Structs§

Sample
A received publication from a sync group.
Subscriber
A subscription to a sync group.
SubscriberConfig
Configuration for a subscriber.