A library for decoding WebSocket (RFC6455) frames.
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!") } }