Handbook
Glossary
stream-read-partial ( n stream -- seq/f )
Factor handbook
»
Input and output
»
Streams
»
Stream protocol
Prev:
stream-read-into ( buf stream -- buf-slice more? )
Next:
stream-read-partial-into ( buf stream -- buf-slice more? )
Vocabulary
io
Inputs
n
a non-negative integer
stream
an input stream
Outputs
seq/f
a
byte-array
, a
string
, or
f
Word description
Reads at most
n
elements from a stream and returns up to that many characters without blocking. If no characters are available, blocks until some are and returns them.
Definition
USING:
io.private
;
IN:
io
:
stream-read-partial
( n stream -- seq/f )
[
stream-read-partial-unsafe
]
read-into-new
;
inline