Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nwtgck/hb

Heartbeat CLI
https://github.com/nwtgck/hb

cli heartbeat keepalive network

Last synced: 22 days ago
JSON representation

Heartbeat CLI

Awesome Lists containing this project

README

        

# hb
Heartbeat CLI

## Usage

Here is an example. The result is the same as `seq 1000000`.

```bash
seq 1000000 | hb | hb -d
```

## Install

### Mac

```bash
brew install nwtgck/homebrew-hb/hb
```

### Other

Download from

## Spec

Input data chunk is encoded as two types, DATA and HEARTBEAT.

* DATA: 0x0
* HEARTBEAT: 0x1

DATA type has `Length`, which is the length in octets of the `Data`.

```txt
+--------------------+--------------+-------------------- - - - ---+
| DATA type (8) | Length (32) | Data (Length * 8) ... |
+--------------------+--------------+-------------------- - - - ---+
```

HEARTBEAT type has a random octet, which is discarded.

```txt
+--------------------+------------+
| HEARTBEAT type (8) | Random (8) |
+--------------------+------------+
```

* `(N)`: N bits

## Help

```txt
Heartbeat CLI

Usage: hb [OPTIONS]

Options:
-d, --decode Decode
-n, --interval Seconds to send a heartbeat [default: 30]
-h, --help Print help
-V, --version Print version
```