zncat

Crates.iozncat
lib.rszncat
version0.2.1
sourcesrc
created_at2024-10-23 22:19:32.088166
updated_at2024-10-24 03:04:29.772826
descriptionCommand line relay for Zenoh
homepagehttps://github.com/NEWSLabNTU/zncat
repositoryhttps://github.com/NEWSLabNTU/zncat.git
max_upload_size
id1420663
size112,803
(jerry73204)

documentation

README

zncat - Command Line Replay for Zenoh

Zncat is a command line utility that transfers bidirectional byte streams to Zenoh.

Installation

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

Usage

Get Started

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

Buffering

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

Custom Zenoh Configuration

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.

License

The software is distributed with a Apache 2.0 license. You can read the license file.

Commit count: 14

cargo fmt