Tls module

close

procedure · 1 overloadSource

Ends the stream: sends close_notify (unless now, which does not wait and sends nothing) and closes the connection under it, which wakes fibers still waiting on it with .CLOSED. The stream is freed once those fibers have left, so it must not be used after close; close it once.

close :: (stream: *Tls_Stream, now := false) -> Io.Io_Error

Ends the stream: sends close_notify (unless now, which does not wait and sends nothing) and closes the connection under it, which wakes fibers still waiting on it with .CLOSED. The stream is freed once those fibers have left, so it must not be used after close; close it once.

Parameters

stream: *Tls_Stream
the stream to end.
now := false
skip close_notify and the wait; just close the connection.

Returns

See also