Skip to main content

encode

Function encode 

Source
pub fn encode(frame: &Frame) -> Result<Vec<u8>, CodecError>
Expand description

Encodes a Frame into the WebSocket wire byte slice.

If frame.masking_key is set, the payload is XOR-masked during encoding (Spec §5.3).

§Errors