Expand description

Implementation of the Minecraft server Query UDP protocol

The blocking and async versions have the same API, adding a few async and .await here and there :

use blocking::QueryClient;

let client = QueryClient::new(ip_to_query)?;
let client2 = QueryClient::new_with_port(ip_to_query, 25565)?;
let client3 = QueryClient::new_with_socket_address(
    ip_to_query,
    25565,
    (Ipv4Addr::UNSPECIFIED, 0),
    Some(Duration::from_secs(3)),
)?;

let token = client.handshake()?;
let basic_stat = client.basic_stat(token)?;
let full_stat = client.full_stat(token)?;

The convenience function query is also available in each module, and handles the handshake for you:

let full_stat = blocking::query(ip_to_query)?;

Re-exports

pub use self::tokio::*;
tokio

Modules

async_stdasync-std

async-std implementation of the Query protocol.

Blocking implementation of the Query protocol.

Raw bytes packets used by the Query protocol

tokiotokio

tokio implementation of the Query protocol.

Structs

Basic status information on a minecraft server

Full status information for a minecraft server

A Query token, returned by a UDP handshake

Constants

Default port for a Minecraft server.

Default timeout for the UDP sockets in QueryClient