https://github.com/timothyye/tcping
https://github.com/timothyye/tcping
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/timothyye/tcping
- Owner: TimothyYe
- License: apache-2.0
- Created: 2024-08-20T14:07:23.000Z (almost 2 years ago)
- Default Branch: master
- Last Pushed: 2024-09-12T16:12:39.000Z (over 1 year ago)
- Last Synced: 2024-09-13T05:14:47.934Z (over 1 year ago)
- Language: Rust
- Size: 35.2 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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)
[](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.