Crates.io | sourcon |
lib.rs | sourcon |
version | 0.1.0 |
source | src |
created_at | 2024-09-06 09:36:49.476332 |
updated_at | 2024-09-06 09:36:49.476332 |
description | A rcon client for game servers based on the the Source engine. |
homepage | https://github.com/crescentrose/sourcon |
repository | https://github.com/crescentrose/sourcon |
max_upload_size | |
id | 1365719 |
size | 20,090 |
Pure Rust async implementation of the Source RCON protocol.
use sourcon::client::Client;
use std::error::Error;
#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
let host = "dev.viora.sh:27015";
// client must be mutable
let mut client = Client::connect(host, "poop").await?;
let response = client.command("echo hi").await?;
assert_eq!(response.body(), "hi");
Ok(())
}
I am not currently actively working on any projects using this library (though it might happen in the future). If you would like to contribute, please feel free to open issues, submit PRs or even fork the entire thing.
This project is licensed under the terms of the MIT license. See LICENSE for the full text.