OxL Справочник OxL
РусскийEnglish

method TlsStream.close

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

Example:

oxl✓ проверяется в CI
use std.net { TlsStream }

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

С версии. 1.0.0-beta

Возвращает

()

Ошибки

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

Эффекты

net

Определено в: std/net/tls.oxl:442

См. также