join_psync_group

Function join_psync_group 

Source
pub fn join_psync_group(
    group: Name,
    send: Sender<Bytes>,
    recv: Receiver<Bytes>,
    config: PSyncConfig,
) -> SyncHandle
Expand description

Join a PSync group.

Spawns a background task that:

  1. Periodically sends Sync Interests carrying the local IBF
  2. Processes incoming Sync Interests (subtracts IBFs, replies with diff)
  3. Processes incoming Sync Data (emits SyncUpdate for missing hashes)

§Arguments

  • group — sync group prefix (e.g. /ndn/psync/chat)
  • send — channel to send outgoing packets (Interests and Data)
  • recv — channel to receive incoming packets from the network
  • config — PSync configuration