method TlsListener.acceptTcp
Accepts the next TCP connection without TLS; finish it with handshake.
Example:
use std.net { TlsListener, TcpStream }
fn first(l: &TlsListener) -> bool net {
match l.acceptTcp(1s) {
TcpStream t => {
_ = t.close()
true
}
NetError _ => false
}
}pub(api) fn acceptTcp(timeout: Duration? = none) -> TcpStream | NetError netSince. 1.0.0-beta
Parameters
| Name | Type |
|---|---|
timeout | Duration? = none |
Returns
Errors
NetError- `Timeout`, `Cancelled`, `Unavailable`.
Effects
net
Defined in: std/net/tls.oxl:553