sourcon

Crates.iosourcon
lib.rssourcon
version0.1.0
sourcesrc
created_at2024-09-06 09:36:49.476332
updated_at2024-09-06 09:36:49.476332
descriptionA rcon client for game servers based on the the Source engine.
homepagehttps://github.com/crescentrose/sourcon
repositoryhttps://github.com/crescentrose/sourcon
max_upload_size
id1365719
size20,090
Ivan (crescentrose)

documentation

README

sourcon

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(())
}

What is working

  • Authentication
  • Sending commands to a server
  • Receiving responses

What could be added

  • Strongly typed commands instead of arbitrary strings
  • Stream UDP logs with password support
  • Implement RCON server for testing purposes and Fun
  • Tests

Development

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.

License

This project is licensed under the terms of the MIT license. See LICENSE for the full text.

Commit count: 0

cargo fmt