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