Pub/sub roundtrip in one process
Two participants in one process on the same domain, doing a real SPDP discovery handshake and a wire roundtrip over UDP loopback.
- Example:
pubsub-roundtrip - Repository: zero-dds-snippets
What it shows
- Tunes the runtime via
RuntimeConfig— 20 ms tick, 100 ms SPDP. - Creates a writer on one participant and a reader on the other for topic
Chatter, waits for the event-driven discovery handshake, writesb"Hello, DDS!"and prints the received sample. - No features to enable; depends only on
zerodds-dcpsfrom crates.io.
Build and run
cargo run
See also
Pub/Sub-Roundtrip in einem Prozess
Zwei Participants in einem Prozess auf derselben Domain, mit echtem SPDP-Discovery-Handshake und einem Wire-Roundtrip über UDP-Loopback.
- Beispiel:
pubsub-roundtrip - Repository: zero-dds-snippets
Was es zeigt
- Stellt die Runtime über
RuntimeConfigein — 20 ms Tick, 100 ms SPDP. - Legt auf einem Participant einen Writer und auf dem anderen einen Reader für das Topic
Chatteran, wartet den ereignisgetriebenen Discovery-Handshake ab, schreibtb"Hello, DDS!"und gibt das empfangene Sample aus. - Keine Features nötig; hängt nur von
zerodds-dcpsaus crates.io ab.
Bauen und ausführen
cargo run