websocket-std 0.0.6

Websocket implementation using std support, focus on microcontrollers and interoperability with other languages like C through the ffi.
Documentation
1
2
3
4
5
6
7
8
9
use getrandom as rand;

pub type Mask = [u8; 4];

pub fn gen_mask() -> Mask {
    let mut buf: Mask = [0u8; 4];
    let _ = rand::getrandom(&mut buf); // Ignore error
    return buf
}