Registry / networking / surge-ping

surge-ping

JSON →
library0.8.4rscratesunverified

Asynchronous ICMP ping library for Rust, providing high-performance network probing.

# Cargo.toml [dependencies] surge-ping = "0.8.4"
INSTALL
IMPORT
SIG · SURGE-PING
S
surge-ping
networkingrustv0.8.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Pinger
use surge_ping::Pinger;

Ping Google's DNS server (8.8.8.8) and print the reply.

use surge_ping::{Pinger, Config}; #[tokio::main] async fn main() -> Result<(), Box<dyn std::error::Error>> { let config = Config::new(); let pinger = Pinger::new("8.8.8.8".parse()?, config).await?; let reply = pinger.ping(0).await?; println!("Ping reply: {:?}", reply); Ok(()) }
Debug
Known issues
gotchaRequires an async runtime (tokio) and root/administrator privileges on some systems.
fix
Run with sudo/administrator and add tokio as a dependency.
affects: >=0.8.0
Upgrade
Version history
0.8.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
14
OpenAI (training)
1
Resources
surge-ping — cargo add surge-ping · libregistry