method TlsStream.write
Writes all of data. A failure (including a timeout) leaves the stream unusable: close it.
Example:
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
Параметры
| Имя | Тип |
|---|---|
buf | bytes |
timeout | Duration? = none |
Возвращает
()
Ошибки
NetError- `Timeout`, `Unavailable`, `Cancelled`, `ProtocolError`.
Эффекты
net
Определено в: std/net/tls.oxl:301