tld_msg

Crates.iotld_msg
lib.rstld_msg
version0.1.0
sourcesrc
created_at2021-11-27 16:59:41.368293
updated_at2021-11-27 16:59:41.368293
descriptionA library for a dead-simple messaging protocol.
homepagehttps://files.almaember.com/tld-messages.txt
repository
max_upload_size
id488477
size5,130
(AlmaemberTheGreat)

documentation

README

tld_msg

This is a simple crate for the TLDMP protocol. There isn't much else to say about it.

It's extremely simplistic. The source code is about 40 lines.

Here's an example, though:

mod lib;

fn main() {
    let mut output: Vec<u8> = Vec::new();

    lib::send(&mut output, 1, &mut "Hey!".as_bytes()).unwrap();
    let mut input = &output[..];
    let msg = lib::receive(&mut input).unwrap();

    println!("{:#?}", output);
    println!("{:#?}\n{}", msg, String::from_utf8(msg.content.clone()).unwrap());
}
Commit count: 0

cargo fmt