Esc

ws_frame

procedureextensionsince 0.36.1Source
  • macOS: ws_frame works on macOS
  • Linux: ws_frame works on Linux
  • Windows: ws_frame works on Windows
  • Wasm: ws_frame works on Wasm

Appends one frame with an explicit masking key. Example: ws_frame(*out, .TEXT, cast([] u8) "hi"). Client transports must obtain a fresh unpredictable key for every call.

Signature

ws_frame :: (
    out: *[..] u8,
    opcode: Ws_Opcode,
    data: [] u8,
    final := true,
    masked := false,
    key: [4] u8 = .{},
    compressed := false,
    options := Ws_Options.{}
) -> Ws_Error

See also