Handbook
Glossary
factorcode.org
do-ssl-read ( buffer ssl -- event/f )
Vocabulary
io.sockets.secure.openssl
Inputs
buffer
a
buffer
ssl
a
SSL
Outputs
event/f
f or a symbol indicating the desired operation
Word description
Reads from the ssl connection to the buffer.
Definition
USING:
io.buffers
kernel
openssl.libssl
;
IN:
io.sockets.secure.openssl
:
do-ssl-read
( buffer ssl -- event/f )
2dup
swap
[
buffer-end
]
[
buffer-capacity
]
bi
SSL_read
[
{
{
SSL_ERROR_ZERO_RETURN
[
drop
f
]
}
}
check-ssl-error
]
keep
swap
[
2nip
]
[
swap
buffer+
f
]
if*
;