craftping is a Rust library to ping Minecraft Servers.
- Ping for servers after version 1.6
[dependencies]
craftping = "0.1.0"
Note that craftping is synchronous, which means it will block until server responds.
use craftping::ping;
fn main() {
let pong = ping("localhost", 25565).expect("Cannot ping server");
println!("Ping result: {}", pong);
}
Check here for more information about ping result.
Pull requests are welcome. For major issues, please open the issue on this repository first.