method TlsListener.handshake
Runs the server handshake on a connection from acceptTcp (which it consumes).
Example:
use std.net { TlsListener, TlsStream }
fn upgrade(l: &TlsListener) -> TlsStream | NetError net {
let tcp = l.acceptTcp()?
l.handshake(tcp, 2s)
}pub(api) fn handshake(tcp: TcpStream, timeout: Duration? = none) -> TlsStream | NetError netС версии. 1.0.0-beta
Параметры
Возвращает
Ошибки
NetError- `ProtocolError` (`tls handshake:` ...), `Timeout`.
Эффекты
net
Определено в: std/net/tls.oxl:572