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 netSince. 1.0.0-beta
Parameters
Returns
Errors
NetError- `ProtocolError` (`tls handshake:` ...), `Timeout`.
Effects
net
Defined in: std/net/tls.oxl:572