readFrame

virtual uint64_t readFrame(BitReader & frame, char *& payload)

Decodes a single WebSocket frame from frame.

The payload is unmasked in-place in the source buffer; no copy is made. payload is set to point at the start of the payload within frame's buffer.

Returns

Payload length in bytes.

Parameters

ParameterTypeDescription
frameBitReader &BitReader positioned at the start of a frame.
payloadchar *&Set to point at the start of the decoded payload. Not null-terminated.