zcat

Crates.iozcat
lib.rszcat
version0.4.2
sourcesrc
created_at2024-12-05 15:38:19.279207
updated_at2024-12-06 11:01:25.018209
descriptionzcat: a netcat-inspired utility for zenoh
homepage
repositoryhttps://github.com/Mallets/zcat
max_upload_size
id1473309
size113,097
Luca Cominardi (Mallets)

documentation

README

zcat - the zenoh cat

zcat mimics netcat with the difference that communication occurs via zenoh instead of plain TCP or UDP.

zcat allows to read and write data across networks from the command line.

Prerequisites

zcat is written in Rust and requires the Rust toolchain to be installed on your system to build it.

Installation

Install the zcat command using cargo.

cargo install zcat

Usage

Because zcat as command name is already taken by the zcat Linux command, this crate uses zat as command name.

See zat --help for all available options.

Getting started

zcat runs in publicatoin or subscription mode when proper flags are specified.

To read data from stdin and publish it over zenoh:

echo "Hello World" | zat -w foo/bar

To subscribe to data from zenoh and write it to stdout:

zat -r foo/bar

QoS parameters

The QoS parameters of zenoh publications can be configured via command line.

To change the reliability:

echo "Hello World" | zat -w foo/bar -t besteffort

To change the reliability and the congestion control:

echo "Hello World" | zat -w foo/bar -t besteffort -d drop

To change the reliability, the congestion control and the priority:

echo "Hello World" | zat -w foo/bar -t besteffort -d drop -p 6

To change the reliability, the congestion control, the priority, and the express flag:

echo "Hello World" | zat -w foo/bar -t besteffort -d drop -p 6 -e

Custom Zenoh Configuration

A zenoh configuration file can be provided in the command line.

zat --config config.json5 -w foo/bar

To listen for incoming connections:

zat -l tcp/127.0.0.1:6777 -w foo/bar

To establish a connection:

zat -e tcp/127.0.0.1:7447 -w foo/bar

More Zenoh options can be discovered by zat --help.

License

The software is distributed with a Eclipse Public License v2.0 license. You can read the license file.

Commit count: 17

cargo fmt