azalea::ping

Function ping_server

Source
pub async fn ping_server(
    address: impl TryInto<ServerAddress>,
) -> Result<ClientboundStatusResponsePacket, PingError>
Expand description

Ping a Minecraft server.

ยงExamples

use azalea_client::ping;

#[tokio::main]
async fn main() {
    let response = ping::ping_server("play.hypixel.net").await.unwrap();
    println!("{}", response.description.to_ansi());
}