File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ descriptor based implementation with an in-memory write buffer.
3232 * [ write()] ( #write )
3333 * [ end()] ( #end )
3434 * [ close()] ( #close-1 )
35+ * [ DuplexStreamInterface] ( #duplexstreaminterface )
3536* [ Usage] ( #usage )
3637* [ Install] ( #install )
3738
@@ -672,6 +673,23 @@ how the readable side of the stream also implements a `close()` method.
672673In other words, after calling this method, the stream MUST switch into
673674non-writable AND non-readable mode, see also ` isReadable() ` .
674675
676+ ### DuplexStreamInterface
677+
678+ The ` DuplexStreamInterface ` is responsible for providing an interface for
679+ duplex streams (both readable and writable).
680+
681+ It builds on top of the existing interfaces for readable and writable streams
682+ and follows the exact same method and event semantics.
683+ If you're new to this concept, you should look into the
684+ ` ReadableStreamInterface ` and ` WritableStreamInterface ` first.
685+
686+ Besides defining a few methods, this interface also implements the
687+ ` EventEmitterInterface ` which allows you to react to the same events defined
688+ on the ` ReadbleStreamInterface ` and ` WritableStreamInterface ` .
689+
690+ See also [ ` ReadableStreamInterface ` ] ( #readablestreaminterface ) and
691+ [ ` WritableStreamInterface ` ] ( #writablestreaminterface ) for more details.
692+
675693## Usage
676694``` php
677695 $loop = React\EventLoop\Factory::create();
Original file line number Diff line number Diff line change 22
33namespace React \Stream ;
44
5+ /**
6+ * The `DuplexStreamInterface` is responsible for providing an interface for
7+ * duplex streams (both readable and writable).
8+ *
9+ * It builds on top of the existing interfaces for readable and writable streams
10+ * and follows the exact same method and event semantics.
11+ * If you're new to this concept, you should look into the
12+ * `ReadableStreamInterface` and `WritableStreamInterface` first.
13+ *
14+ * Besides defining a few methods, this interface also implements the
15+ * `EventEmitterInterface` which allows you to react to the same events defined
16+ * on the `ReadbleStreamInterface` and `WritableStreamInterface`.
17+ *
18+ * @see ReadableStreamInterface
19+ * @see WritableStreamInterface
20+ */
521interface DuplexStreamInterface extends ReadableStreamInterface, WritableStreamInterface
622{
723}
You can’t perform that action at this time.
0 commit comments