enum opcode_type: u8WebSocket Opcode numbers.
cont_frame = 0x0text_frame = 0x1binary_frame = 0x2conn_close = 0x8ping = 0x9pong = 0xaWebSocket frame.
using opcodes = ::sys::opcode_typeusing length64_type = u648-byte length type.
using length16_type = u162-byte length type.
using mask_type = u324-byte mask type.
u64 footeru8 __pad3__u32 extlen2u8 __pad2__u16 extlenu8 __pad1__u16 maskbitu16 lenu8 __pad0__u16 finu16 rsv1u16 rsv2u16 rsv3u16 opcodeconst size_t base_sizeMinimal number of bytes used by a frame.
const size_t mask_sizeThe number of bytes used by payload mask.
const u16 length64_tagTag indicating that frame length is encoded using 8 bytes.
const u16 length16_tagTag indicating that frame length is encoded using 2 bytes.
min_size() -> constexpr size_tMinimum frame header size.
max_size() -> constexpr size_tMaximum frame header size.
clear() -> voidReset frame header contents.
mask_payload(char * first, char * last) const -> void
Mask payload between first and last pointers. The payload is changed in-place.
mask(mask_type rhs) -> voidSet frame mask.
mask() const -> mask_typeGet frame mask.
size() const -> size_tFull size of frame header.
base() const -> const char *Pointer to the beginning of extended payload length field.
base() -> char *Pointer to the beginning of extended payload length field.
end() const -> const char *Pointer to the end of frame header.
end() -> char *Pointer to the beginning of frame header.
begin() const -> const char *Pointer to the beginning of frame header.
begin() -> char *Pointer to the beginning of frame header.
payload_size(length64_type rhs) -> voidSet payload size in bytes.
payload_size() const -> length64_typeReturns payload size in bytes.
maskbit(u16 rhs) -> void
Set MASK header field, that determines whether the payload is masked or not.
len(u16 rhs) -> void
Set payload len header field.
extlen_size() const -> size_tReturns extended payload size in bytes.
has_valid_opcode() const -> boolReturns true, if opcode number is within valid range (as defined by the standard).
is_binary() const -> boolReturns true, if the payload is binary.
is_masked() const -> boolReturns true, if the payload is masked.
opcode() const -> opcode_type
Get opcode header field.
opcode(opcode_type rhs) -> void
Set opcode header field, indicating the type of the payload.
fin(int rhs) -> void
Set FIN header field, indicating that this frame is the final fragment of the message.
operator<<(std::ostream & out, const websocket_frame & rhs) -> std::ostream &Output WebSocket frame header field for debugging.