| Crates.io | ws-ping |
| lib.rs | ws-ping |
| version | 0.1.0 |
| created_at | 2025-07-09 05:14:11.464056+00 |
| updated_at | 2025-07-09 05:14:11.464056+00 |
| description | A simple WebSocket ping utility |
| homepage | |
| repository | https://github.com/maggnus/websocket-ping |
| max_upload_size | |
| id | 1744242 |
| size | 44,855 |
ws-ping is a command-line utility written in Rust for pinging WebSocket servers and measuring their latency. It functions similarly to the traditional ping command but is tailored for WebSocket connections, sending WebSocket Ping frames and awaiting Pong responses.
ws:// or wss://).To install ws-ping, you need to have Rust and Cargo installed on your system.
cargo install ws-ping
ws-ping <URL> [OPTIONS]
<URL>: The WebSocket URL to ping (e.g., ws://echo.websocket.events or wss://stream.binance.com:9443/ws/btcusdt@depth).-c, --count <COUNT>: Number of pings to send. Defaults to 4.-i, --interval <INTERVAL>: Interval between pings in seconds. Defaults to 1.Basic ping to a WebSocket echo server:
ws-ping ws://echo.websocket.events
Ping a secure WebSocket with 10 pings and a 0.5-second interval:
ws-ping wss://stream.binance.com:9443/ws/btcusdt@depth -c 10 -i 0.5
Ping with default options:
ws-ping wss://your-websocket-server.com/ws
The source code for ws-ping is available on GitHub: https://github.com/maggnus/websocket-ping
This project is licensed under the MIT License. See the LICENSE file for details.