Crates.io | zncat |
lib.rs | zncat |
version | 0.2.1 |
source | src |
created_at | 2024-10-23 22:19:32.088166 |
updated_at | 2024-10-24 03:04:29.772826 |
description | Command line relay for Zenoh |
homepage | https://github.com/NEWSLabNTU/zncat |
repository | https://github.com/NEWSLabNTU/zncat.git |
max_upload_size | |
id | 1420663 |
size | 112,803 |
Zncat is a command line utility that transfers bidirectional byte streams to Zenoh.
Install the zncat
command directly from GitHub. If you don't have
cargo command already, go to rustup.rs to fix it.
cargo install zncat
zncat
runs in publicatoin or subscription mode when proper flags are
specified.
To publish the data from an input file,
zncat --pub my_topic < infile
To subscribe from a key and save the bytes to an output file,
zncat --sub my_topic > outfile
By default, zncat
reads the standard input in line buffering mode
and publish them line-by-line. You can change the behavior to read and
publish in fixed sized blocks. For exmaple, to publish data in
8192-byte blocks,
zncat -b 8192 --pub my_topic
To establish a connection to a remote Zenoh peer.
zncat -e tcp/123.123.123.123:6777 --pub my_topic
To listen for incoming connections from Zenoh peers,
zncat -l tcp/127.0.0.1:6777 --pub my_topic
A configuration for Zenoh can be provided in the command line.
zncat --config config.json5 --pub my_topic
More Zenoh options can be discovered by zncat --help
.
The software is distributed with a Apache 2.0 license. You can read the license file.