Struct soketto::base::Header [−][src]
pub struct Header { /* fields omitted */ }A websocket base frame header, i.e. everything but the payload.
Implementations
impl Header[src]
impl Header[src]pub fn new(oc: OpCode) -> Self[src]
Create a new frame header with a given OpCode.
pub fn is_fin(&self) -> bool[src]
Is the fin flag set?
pub fn set_fin(&mut self, fin: bool) -> &mut Self[src]
Set the fin flag.
pub fn is_rsv1(&self) -> bool[src]
Is the rsv1 flag set?
pub fn set_rsv1(&mut self, rsv1: bool) -> &mut Self[src]
Set the rsv1 flag.
pub fn is_rsv2(&self) -> bool[src]
Is the rsv2 flag set?
pub fn set_rsv2(&mut self, rsv2: bool) -> &mut Self[src]
Set the rsv2 flag.
pub fn is_rsv3(&self) -> bool[src]
Is the rsv3 flag set?
pub fn set_rsv3(&mut self, rsv3: bool) -> &mut Self[src]
Set the rsv3 flag.
pub fn is_masked(&self) -> bool[src]
Is the masked flag set?
pub fn set_masked(&mut self, masked: bool) -> &mut Self[src]
Set the masked flag.
pub fn opcode(&self) -> OpCode[src]
Get the opcode.
pub fn set_opcode(&mut self, opcode: OpCode) -> &mut Self[src]
Set the opcode
pub fn mask(&self) -> u32[src]
Get the mask.
pub fn set_mask(&mut self, mask: u32) -> &mut Self[src]
Set the mask
pub fn payload_len(&self) -> usize[src]
Get the payload length.
pub fn set_payload_len(&mut self, len: usize) -> &mut Self[src]
Set the payload length.