Esc

ws_close

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

Sends close and waits for the peer under close_timeout, then releases the connection. Example: error := ws_close(*connection, 1000, "done"). Do not call beside another reader.

Signature

ws_close :: (
    connection: *Ws_Connection,
    code: u16 = 1000,
    reason: string = ""
) -> Ws_Error

See also