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

https://github.com/timothyye/tcping


https://github.com/timothyye/tcping

Last synced: 5 months ago
JSON representation

Awesome Lists containing this project

README

          

# TCPing

TCPing is a command-line tool for pinging a TCP port on a specified host, implemented in Rust. It provides statistics such as average, maximum, and minimum latency for the pinged host.

[δΈ­ζ–‡η‰ˆ README](README_CN.md)

[![asciicast](https://asciinema.org/a/CgpXmFi9g8guvfOyDpm9ehtml.svg)](https://asciinema.org/a/CgpXmFi9g8guvfOyDpm9ehtml)

## Features

- Ping a TCP port on a specified host.
- Support for both positional and named parameters.
- Calculate and display statistics including average, maximum, and minimum latency.

## Usage

```sh
tcping [-n ] [-t ] [-i ]
```

### Parameters

* `` : The host to ping.
* `` : The port to ping.
* `-n, --num` : The number of ping attempts (default is 10).
* `-t, --timeout` : Timeout in seconds for each connection attempt (default is 3).
* `-i, --interval` : Time interval between pings in milliseconds (default is 500).

### Example

```sh
tcping google.com 443 -n 5
tcping google.com 443 -n 20 -t 5 -i 1000
```

## Installation

### From Source

1. Clone the repository:

```sh
git clone https://github.com/TimothyYe/tcping.git
```

2. Build the project:

```sh
cargo build --release
```

3. Run the binary:

```sh
./target/release/tcping google.com 443 -n 10 -t 3 -i 500
```

### From Binary

Download the binary from the [Releases](https://github.com/TimothyYe/tcping/releases) page.

## License

This project is licensed under the Apache License 2.0 - see the [LICENSE](https://github.com/TimothyYe/tcping/blob/master/LICENSE) file for details.