@@ -17,7 +17,8 @@ interface LoopInterface
17
17
* A single stream resource MUST NOT be added more than once.
18
18
* Instead, either call [`removeReadStream()`](#removereadstream) first or
19
19
* react to this event with a single listener and then dispatch from this
20
- * listener.
20
+ * listener. This method MAY throw an `Exception` if the given resource type
21
+ * is not supported by this loop implementation.
21
22
*
22
23
* The listener callback function MUST be able to accept a single parameter,
23
24
* the stream resource added by this method or you MAY use a function which
@@ -47,6 +48,7 @@ interface LoopInterface
47
48
*
48
49
* @param resource $stream The PHP stream resource to check.
49
50
* @param callable $listener Invoked when the stream is ready.
51
+ * @throws \Exception if the given resource type is not supported by this loop implementation
50
52
* @see self::removeReadStream()
51
53
*/
52
54
public function addReadStream ($ stream , $ listener );
@@ -64,7 +66,8 @@ public function addReadStream($stream, $listener);
64
66
* A single stream resource MUST NOT be added more than once.
65
67
* Instead, either call [`removeWriteStream()`](#removewritestream) first or
66
68
* react to this event with a single listener and then dispatch from this
67
- * listener.
69
+ * listener. This method MAY throw an `Exception` if the given resource type
70
+ * is not supported by this loop implementation.
68
71
*
69
72
* The listener callback function MUST be able to accept a single parameter,
70
73
* the stream resource added by this method or you MAY use a function which
@@ -102,6 +105,7 @@ public function addReadStream($stream, $listener);
102
105
*
103
106
* @param resource $stream The PHP stream resource to check.
104
107
* @param callable $listener Invoked when the stream is ready.
108
+ * @throws \Exception if the given resource type is not supported by this loop implementation
105
109
* @see self::removeWriteStream()
106
110
*/
107
111
public function addWriteStream ($ stream , $ listener );
0 commit comments