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

method TlsStream.write

Writes all of data. A failure (including a timeout) leaves the stream unusable: close it.

Example:

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

fn send(s: &TlsStream) -> () | NetError  net {
  s.write(b"\x00\x01", timeout: 2s)
}
pub(api) fn write(buf: bytes, timeout: Duration? = none) -> () | NetError  net

С версии. 1.0.0-beta

Параметры

ИмяТип
bufbytes
timeoutDuration? = none

Возвращает

()

Ошибки

  • NetError
  • `Timeout`, `Unavailable`, `Cancelled`, `ProtocolError`.

Эффекты

net

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

См. также