]> gitweb.factorcode.org Git - factor.git/blob - core/io/streams/duplex/duplex-docs.factor
Initial import
[factor.git] / core / io / streams / duplex / duplex-docs.factor
1 USING: help.markup help.syntax io ;
2 IN: io.streams.duplex
3
4 ARTICLE: "io.streams.duplex" "Duplex streams"
5 "Duplex streams combine an input stream and an output stream into a bidirectional stream."
6 { $subsection duplex-stream }
7 { $subsection <duplex-stream> }
8 { $subsection check-closed } ;
9
10 ABOUT: "io.streams.duplex"
11
12 HELP: duplex-stream
13 { $class-description "A bidirectional stream delegating to a pair of streams, sending input to one delegate and output to another." } ;
14
15 HELP: <duplex-stream>
16 { $values { "in" "an input stream" } { "out" "an output stream" } { "stream" " a duplex stream" } }
17 { $description "Creates a duplex stream. Writing to a duplex stream will write to " { $snippet "out" } ", and reading from a duplex stream will read from " { $snippet "in" } ". Closing a duplex stream closes both the input and output streams." } ;
18
19 HELP: check-closed
20 { $values { "stream" "a duplex stream" } }
21 { $description "Throws a " { $link check-closed } " error if the stream has already been closed." }
22 { $error-description "This error is thrown when performing an I/O operation on a " { $link duplex-stream } " which has been closed with " { $link stream-close } "." } ;