veilid_duplex

Crates.ioveilid_duplex
lib.rsveilid_duplex
version
sourcesrc
created_at2023-10-25 13:07:30.369139
updated_at2024-11-30 13:13:48.490167
descriptionFull-duplex encrypted communication between 2 nodes
homepage
repositoryhttps://gitlab.com/cwiz/veilid_duplex
max_upload_size
id1013355
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
Sergei Surovtsev (stillonearth)

documentation

README

veilid_duplex

Full-duplex asyncronous communication between two peers with Veilid.

  • Alice publishes her route to DHT and sends DHT key to Bob. Alice will update here route on DHT when connection breaks;
  • Bob does the same, and sends his DHT key to Alice over Veilid channel.
  • When Alice or Bob fail to send a message they try getting a new route from DHT. They also update their DHT records when their routes die.
  • Sometimes a message will be delivered twice, so Alice and Bob keep a record of all hashed messages they got.

Veilid duplex manages veilid internals for you, such as allocating routes and recovering from route shutdowns.

Changlelog

  • 0.1.5 WASM support

Usage

See pingpong example.

Examples

Pingpong

2 peers increment the counter and pass it to each other.

Host:

cargo run --example pingpong -- --server --verbose

This will print host's DHT key

Client:

cargo run --example pingpong --  --verbose --client "VLD0:MDoZwLsoQgM6-XKE3giy-8r53e4yCod5Y546laT0El0"
Commit count: 44

cargo fmt