ws-frame 0.1.1

A small, zero-copy WebSocket decoder.
Documentation
  • Coverage
  • 52%
    13 out of 25 items documented2 out of 10 items with examples
  • Size
  • Source code size: 8.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.04 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • matthunz

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!")
    }
}