async-minecraft-ping (0.4.0)
Installation
[registry]
default = "forgejo"
[registries.forgejo]
index = "sparse+ " # Sparse index
# index = " " # Git
[net]
git-fetch-with-cli = true
cargo add async-minecraft-ping@0.4.0
About this package
An async Rust client for the Minecraft ServerListPing protocol
async-minecraft-ping
An async ServerListPing client implementation in Rust.
Usage
See the example.
let mut config = ConnectionConfig::build(args.address);
if let Some(port) = args.port {
config = config.with_port(port);
}
let mut connection = config.connect().await?;
let status = connection.status().await?;
println!(
"{} of {} player(s) online",
status.players.online, status.players.max
);
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
Dependencies
ID | Version |
---|---|
async-trait | ^0.1.81 |
serde | ^1.0.204 |
serde_json | ^1.0.122 |
thiserror | ^1.0.63 |
tokio | ^1.39.2 |
anyhow | ^1.0.86 |
structopt | ^0.3.26 |
tokio | ^1.39.2 |
Keywords
minecraft
mc
serverlistping