Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ read-only streams and the readable side of duplex streams.
Besides defining a few methods, this interface also implements the
`EventEmitterInterface` which allows you to react to certain events.

Every implementation of this interface MUST follow these event semantics in
order to be considered a well-behaving stream.

> Note that higher-level implementations of this interface may choose to
define additional events with dedicated semantics not defined as part of
this low-level stream specification. Conformance with these event semantics
is out of scope for this interface, so you may also have to refer to the
documentation of such a higher-level implementation.

#### data event

The `data` event will be emitted whenever some data was read/received
Expand Down Expand Up @@ -383,6 +392,15 @@ write-only streams and the writable side of duplex streams.
Besides defining a few methods, this interface also implements the
`EventEmitterInterface` which allows you to react to certain events.

Every implementation of this interface MUST follow these event semantics in
order to be considered a well-behaving stream.

> Note that higher-level implementations of this interface may choose to
define additional events with dedicated semantics not defined as part of
this low-level stream specification. Conformance with these event semantics
is out of scope for this interface, so you may also have to refer to the
documentation of such a higher-level implementation.

#### drain event

The `drain` event will be emitted whenever the write buffer became full
Expand Down Expand Up @@ -703,6 +721,15 @@ Besides defining a few methods, this interface also implements the
`EventEmitterInterface` which allows you to react to the same events defined
on the `ReadbleStreamInterface` and `WritableStreamInterface`.

Every implementation of this interface MUST follow these event semantics in
order to be considered a well-behaving stream.

> Note that higher-level implementations of this interface may choose to
define additional events with dedicated semantics not defined as part of
this low-level stream specification. Conformance with these event semantics
is out of scope for this interface, so you may also have to refer to the
documentation of such a higher-level implementation.

See also [`ReadableStreamInterface`](#readablestreaminterface) and
[`WritableStreamInterface`](#writablestreaminterface) for more details.

Expand Down
9 changes: 9 additions & 0 deletions src/DuplexStreamInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,15 @@
* `EventEmitterInterface` which allows you to react to the same events defined
* on the `ReadbleStreamInterface` and `WritableStreamInterface`.
*
* Every implementation of this interface MUST follow these event semantics in
* order to be considered a well-behaving stream.
*
* > Note that higher-level implementations of this interface may choose to
* define additional events with dedicated semantics not defined as part of
* this low-level stream specification. Conformance with these event semantics
* is out of scope for this interface, so you may also have to refer to the
* documentation of such a higher-level implementation.
*
* @see ReadableStreamInterface
* @see WritableStreamInterface
*/
Expand Down
9 changes: 9 additions & 0 deletions src/ReadableStreamInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,15 @@
* non-writable AND non-readable mode, see also `isWritable()`.
* Note that this event should not be confused with the `end` event.
*
* Every implementation of this interface MUST follow these event semantics in
* order to be considered a well-behaving stream.
*
* > Note that higher-level implementations of this interface may choose to
* define additional events with dedicated semantics not defined as part of
* this low-level stream specification. Conformance with these event semantics
* is out of scope for this interface, so you may also have to refer to the
* documentation of such a higher-level implementation.
*
* @see EventEmitterInterface
*/
interface ReadableStreamInterface extends EventEmitterInterface
Expand Down
9 changes: 9 additions & 0 deletions src/WritableStreamInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,15 @@
* non-writable AND non-readable mode, see also `isReadable()`.
* Note that this event should not be confused with the `end` event.
*
* Every implementation of this interface MUST follow these event semantics in
* order to be considered a well-behaving stream.
*
* > Note that higher-level implementations of this interface may choose to
* define additional events with dedicated semantics not defined as part of
* this low-level stream specification. Conformance with these event semantics
* is out of scope for this interface, so you may also have to refer to the
* documentation of such a higher-level implementation.
*
* @see EventEmitterInterface
* @see DuplexStreamInterface
*/
Expand Down