pub struct Header { /* private fields */ }
Expand description
A websocket base frame header, i.e. everything but the payload.
Implementations§
source§impl Header
impl Header
sourcepub fn set_masked(&mut self, masked: bool) -> &mut Self
pub fn set_masked(&mut self, masked: bool) -> &mut Self
Set the masked
flag.
sourcepub fn set_opcode(&mut self, opcode: OpCode) -> &mut Self
pub fn set_opcode(&mut self, opcode: OpCode) -> &mut Self
Set the opcode
sourcepub fn payload_len(&self) -> usize
pub fn payload_len(&self) -> usize
Get the payload length.
sourcepub fn set_payload_len(&mut self, len: usize) -> &mut Self
pub fn set_payload_len(&mut self, len: usize) -> &mut Self
Set the payload length.