camber 0.1.5

Opinionated async Rust for IO-bound services on top of Tokio
Documentation
1
2
3
4
5
6
7
8
9
10
11
use crate::ws_frame_io::{read_ws_frame_raw, write_masked_frame};
use std::net::TcpStream;

pub fn read_ws_binary_frame(stream: &mut TcpStream) -> Vec<u8> {
    let (_, payload) = read_ws_frame_raw(stream);
    payload
}

pub fn write_ws_binary_frame(stream: &mut TcpStream, data: &[u8]) {
    write_masked_frame(stream, 0x02, data);
}