OxL Reference

method TlsStream.close

Sends close_notify (one non-blocking attempt, it never waits or fails the cancelled task) and closes the socket.

Example:

oxl✓ checked in CI
use std.net { TlsStream }

fn done(s: TlsStream) -> () | NetError  net {
  s.close()
}
pub(api) move fn close() -> () | NetError  net

Since. 1.0.0-beta

Returns

()

Errors

  • NetError
  • `NetError` when the descriptor cannot be closed.

Effects

net

Defined in: std/net/tls.oxl:442

See also