Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/nwtgck/hb
- Owner: nwtgck
- License: mit
- Created: 2021-04-07T00:07:09.000Z (over 3 years ago)
- Default Branch: develop
- Last Pushed: 2023-09-01T09:02:54.000Z (about 1 year ago)
- Last Synced: 2024-10-04T06:40:37.995Z (about 1 month ago)
- Topics: cli, heartbeat, keepalive, network
- Language: Rust
- Homepage:
- Size: 27.3 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
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: 0x1DATA 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 CLIUsage: hb [OPTIONS]
Options:
-d, --decode Decode
-n, --interval Seconds to send a heartbeat [default: 30]
-h, --help Print help
-V, --version Print version
```