Handbook
Glossary
duplex-stream
Factor handbook
»
Input and output
»
Duplex streams
Next:
<duplex-stream> ( in out -- duplex-stream )
Vocabulary
io
.
streams
.
duplex
Class description
A bidirectional stream wrapping an input and output stream.
Definition
IN:
io.streams.duplex
TUPLE:
duplex-stream
in out
;
Methods
USING:
destructors
io.streams.duplex
kernel
;
M:
duplex-stream
dispose
[
>duplex-stream<
[
&dispose
drop
]
bi@
]
with-destructors
;
USING:
accessors
io.streams.duplex
io.styles
kernel
;
M:
duplex-stream
make-block-stream
[
out>>
]
call
\
make-block-stream
execute
;
USING:
accessors
io.streams.duplex
io.styles
kernel
;
M:
duplex-stream
make-cell-stream
[
out>>
]
call
\
make-cell-stream
execute
;
USING:
accessors
io.streams.duplex
io.styles
kernel
;
M:
duplex-stream
make-span-stream
[
out>>
]
call
\
make-span-stream
execute
;
USING:
io.streams.duplex
io.timeouts
kernel
;
M:
duplex-stream
set-timeout
>duplex-stream<
[
set-timeout
]
bi-curry@
bi
;
USING:
accessors
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-contents*
[
in>>
]
call
\
stream-contents*
execute
;
USING:
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-element-type
>duplex-stream<
[
stream-element-type
]
bi@
2dup
eq?
[
drop
]
[
"Cannot determine element type"
throw
]
if
;
USING:
accessors
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-flush
[
out>>
]
call
\
stream-flush
execute
;
USING:
accessors
io.streams.duplex
io.styles
kernel
;
M:
duplex-stream
stream-format
[
out>>
]
call
\
stream-format
execute
;
USING:
accessors
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-nl
[
out>>
]
call
\
stream-nl
execute
;
USING:
accessors
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-read-partial-unsafe
[
in>>
]
call
\
stream-read-partial-unsafe
execute
;
USING:
accessors
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-read-unsafe
[
in>>
]
call
\
stream-read-unsafe
execute
;
USING:
accessors
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-read-until
[
in>>
]
call
\
stream-read-until
execute
;
USING:
accessors
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-read1
[
in>>
]
call
\
stream-read1
execute
;
USING:
accessors
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-readln
[
in>>
]
call
\
stream-readln
execute
;
USING:
accessors
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-write
[
out>>
]
call
\
stream-write
execute
;
USING:
accessors
io.streams.duplex
io.styles
kernel
;
M:
duplex-stream
stream-write-table
[
out>>
]
call
\
stream-write-table
execute
;
USING:
accessors
io
io.streams.duplex
kernel
;
M:
duplex-stream
stream-write1
[
out>>
]
call
\
stream-write1
execute
;
USING:
io.ports
io.streams.duplex
kernel
;
M:
duplex-stream
underlying-handle
>duplex-stream<
[
underlying-handle
]
bi@
[
=
[
invalid-duplex-stream
]
when
]
keep
;