Handbook
Glossary
fd
Vocabulary
io
.
backend
.
unix
Definition
USING:
destructors
;
IN:
io.backend.unix
TUPLE:
fd
<
disposable
fd
;
Methods
USING:
accessors
destructors
io.backend.unix
io.backend.unix.multiplexers
io.timeouts
kernel
namespaces
sequences
threads
;
M:
fd
cancel-operation
[
fd>>
mx
get-global
[
remove-input-callbacks
[
t
swap
resume-with
]
each
]
[
remove-output-callbacks
[
t
swap
resume-with
]
each
]
2bi
]
unless-disposed
;
USING:
accessors
combinators
destructors
destructors.private
io.backend.unix
io.timeouts
kernel
unix
;
M:
fd
dispose
[
{
[
cancel-operation
]
[
t
>>disposed
drop
]
[
unregister-disposable
]
[
fd>>
close-file
]
}
cleave
]
unless-disposed
;
USING:
accessors
classes
combinators
io.backend.unix
io.buffers
io.files
io.ports
kernel
kernel.private
libc
math
unix.ffi
;
M:
fd
drain
[
buffered-port
check-instance
buffer>>
]
[
fd>>
]
bi*
over
[
buffer@
]
[
buffer-length
]
bi
write
{
fixnum
}
declare
dup
0
>=
[
over
buffer-consume
buffer-empty?
f
+output+
?
]
[
errno
{
{
EINTR
[
2drop
+retry+
]
}
{
EAGAIN
[
2drop
+output+
]
}
{
ENOBUFS
[
2drop
+output+
]
}
[
(throw-errno)
]
}
case
]
if
;
USING:
accessors
destructors
io.backend.unix
;
M:
fd
handle-fd
check-disposed
fd>>
;
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
;