Handbook
Glossary
refill ( port handle -- event/f )
Vocabulary
io
.
files
Inputs
port
an
object
handle
an
object
Outputs
event/f
an
object
Definition
IN:
io.files
GENERIC:
refill
( port handle -- event/f )
Methods
USING:
accessors
classes
combinators
io.backend.unix
io.buffers
io.files
io.ports
kernel
kernel.private
libc
math
unix.ffi
;
M:
fd
refill
[
buffered-port
check-instance
buffer>>
]
[
fd>>
]
bi*
over
[
buffer-end
]
[
buffer-capacity
]
bi
read
{
fixnum
}
declare
dup
0
>=
[
swap
buffer+
f
]
[
errno
{
{
EINTR
[
2drop
+retry+
]
}
{
EAGAIN
[
2drop
+input+
]
}
[
(throw-errno)
]
}
case
]
if
;
USING:
accessors
io.files
io.sockets.secure.openssl
kernel
;
M:
ssl-handle
refill
throw-if-terminated
[
buffer>>
]
[
maybe-handshake
]
bi*
do-ssl-read
;
USING:
accessors
io.backend.unix
io.files
io.timeouts
kernel
;
M:
stdin
refill
[
[
buffer>>
]
]
dip
[
dup
wait-for-stdin
refill-stdin
f
]
curry
compose
with-timeout
;