Crate kiss_tnc

source ·
Expand description

KISS TNC client for Rust

Usage

use kiss_tnc::Tnc;

tokio_test::block_on(async {
    let mut tnc = Tnc::connect_tcp("localhost:8001") // Direwolf default port number
                  .await.expect("Could not connect to KISS TNC");
    tnc.send_frame("Hello world!".as_bytes()); // Send "Hello world!" over the air
    tnc.flush();

    // Reads a frame from the TNC
    // In most cases you can ignore `port` - it only matters if
    // you have multiple channels
    let (_port, data) = tnc.read_frame().await.expect("Could not read frame");
    println!("{:?}", data);
});

Re-exports

pub use tnc::Tnc;

Modules