Skip to content

Commit

Permalink
Update z_pub_thr.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
yellowhatter committed Nov 20, 2024
1 parent 45039c9 commit 8a15f5f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/examples/z_pub_thr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ fn main() {
.congestion_control(CongestionControl::Block)
.priority(prio)
.express(args.express)
.allowed_destination({
match args.remote {
true => zenoh::sample::Locality::Remote,
false => zenoh::sample::Locality::Any,
}
})
.wait()
.unwrap();

Expand All @@ -70,6 +76,9 @@ fn main() {

#[derive(Parser, Clone, PartialEq, Eq, Hash, Debug)]
struct Args {
/// remote-only locality for sending data
#[arg(short, long, default_value = "false")]
remote: bool,
/// express for sending data
#[arg(long, default_value = "false")]
express: bool,
Expand Down

0 comments on commit 8a15f5f

Please sign in to comment.