tri
] with-destructors ;
-TUPLE: ssl-handle < disposable file handle connected ;
+TUPLE: ssl-handle < disposable file handle connected terminated ;
SYMBOL: default-secure-context
handle ;
: ssl-error-syscall ( ssl-handle -- event/f )
- f >>connected drop
+ f >>connected
+ t >>terminated drop
ERR_get_error {
{ -1 [
errno { [ ECONNRESET = ] [ EPIPE = ] } 1||
: maybe-handshake ( ssl-handle -- )
dup connected>> [ drop ] [
- [ [ do-ssl-accept ] with-timeout ]
- [ t swap connected<< ] bi
+ dup terminated>> [
+ drop
+ ] [
+ [ [ do-ssl-accept ] with-timeout ]
+ [ t swap connected<< ] bi
+ ] if
] if ;
! Input ports