1 unstable release
0.1.1 | Jul 30, 2019 |
---|
#15 in #ws
8KB
161 lines
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!")
}
}
Dependencies
~120KB