Crate ws_frame

Source
Expand description

§ws-frame

A library for decoding WebSocket (RFC6455) frames.

§Example

use ws_frame::{Frame, Opcode};
 
let buf = [0b10100010, 0b00000001, 0b00000010];
let mut f = Frame::empty();
 
if f.decode(&buf).is_complete() {
    if Opcode::Ping == f.head.unwrap().op {
        println!("Pong!")
    }
}

Structs§

Frame
A decoded Frame.
Head

Enums§

Opcode
Status
The result of a successful decode pass.