northstar-rcon-client

Crates.ionorthstar-rcon-client
lib.rsnorthstar-rcon-client
version0.1.2
sourcesrc
created_at2022-08-01 11:14:17.962502
updated_at2022-08-09 06:21:58.814511
descriptionAsynchronous RCON client for the Northstar mod
homepage
repository
max_upload_size
id636704
size24,202
Tom Barham (cpdt)

documentation

README

Northstar RCON Client

Crates.io Docs.rs MIT licensed Build status

This crate provides a high-level cross-platform implementation of an RCON client for Northstar mod, as it's implemented in the RCON PR.

The client is entirely asynchronous and requires a Tokio runtime.

Example

use northstar_rcon_client::connect;
#[tokio::main]
async fn main() {
    let client = connect("localhost:37015")
        .await
        .unwrap();
    let (mut read, mut write) = client.authenticate("password123")
        .await
        .unwrap();
    write.enable_console_logs().await.unwrap();
    write.exec_command("status").await.unwrap();
    loop {
        let line = read.receive_console_log().await.unwrap();
        println!("> {}", line);
    }
}
Commit count: 0

cargo fmt