#zenoh #command-line #netcat #utility #netcat-inspired

app zcat

zcat: a netcat-inspired utility for zenoh

6 releases

new 0.4.2 Dec 6, 2024
0.4.1 Dec 5, 2024
0.3.2 Dec 5, 2024
0.2.0 Dec 5, 2024
0.1.0 Dec 5, 2024

#612 in Network programming

Download history 535/week @ 2024-12-02

535 downloads per month

EPL-2.0 license

31KB
227 lines

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.

Dependencies

~25–36MB
~546K SLoC