An open API service indexing awesome lists of open source software.

https://github.com/ismaileke/binary-utils

A binary system to be used for RakNet protocol
https://github.com/ismaileke/binary-utils

binary minecraft-plugin minecraft-server raknet raknet-network-engine rust-crate rust-library

Last synced: 10 months ago
JSON representation

A binary system to be used for RakNet protocol

Awesome Lists containing this project

README

          

# binary-utils
A binary system to be used for RakNet protocol.

## Usage

๐Ÿ“„Cargo.toml
```css
[dependencies]
binary-utils = { git = "https://github.com/ismaileke/binary-utils.git", branch = "master"}
```

๐Ÿ“„main.rs
```rust
use binary_utils::binary::Stream;

fn main() {
let mut stream = Stream::new(vec![1, 2], 0);
stream.put_byte(128);
stream.put_l_triad(12345);

let _ = stream.get_byte(); // first byte -> 1
let _ = stream.get_byte(); // second byte -> 2
let _ = stream.get_byte(); // third byte -> 128
let triad_num = stream.get_l_triad(); // triad number -> 12345

println!("{}", triad_num); // 12345
println!("{:?}", stream.get_buffer()); // [1, 2, 128, 57, 48, 0]
}
```

## ๐Ÿ“ NOTE
It is still in development.