@@ -92,20 +92,20 @@ $connectorRepeater->connect('www.google.com:80')->then(function ($stream) {
92
92
93
93
### Timeout
94
94
95
- The ` ConnectionManagerTimeout($connector, $timeout, $loop) ` sets a maximum ` $timeout ` in seconds on when to give up
95
+ The ` ConnectionManagerTimeout($connector, $timeout, $loop = null ) ` sets a maximum ` $timeout ` in seconds on when to give up
96
96
waiting for the connection to complete.
97
97
98
98
``` php
99
- $connector = new ConnectionManagerTimeout($connector, 3.0, $loop );
99
+ $connector = new ConnectionManagerTimeout($connector, 3.0);
100
100
```
101
101
102
102
### Delay
103
103
104
- The ` ConnectionManagerDelay($connector, $delay, $loop) ` sets a fixed initial ` $delay ` in seconds before actually
104
+ The ` ConnectionManagerDelay($connector, $delay, $loop = null ) ` sets a fixed initial ` $delay ` in seconds before actually
105
105
trying to connect. (Not to be confused with [ ` ConnectionManagerTimeout ` ] ( #timeout ) which sets a _ maximum timeout_ .)
106
106
107
107
``` php
108
- $delayed = new ConnectionManagerDelayed($connector, 0.5, $loop );
108
+ $delayed = new ConnectionManagerDelayed($connector, 0.5);
109
109
```
110
110
111
111
### Reject
@@ -221,11 +221,11 @@ retrying unreliable hosts:
221
221
222
222
``` php
223
223
// delay connection by 2 seconds
224
- $delayed = new ConnectionManagerDelay($connector, 2.0, $loop );
224
+ $delayed = new ConnectionManagerDelay($connector, 2.0);
225
225
226
226
// maximum of 3 tries, each taking no longer than 2.0 seconds
227
227
$retry = new ConnectionManagerRepeat(
228
- new ConnectionManagerTimeout($connector, 2.0, $loop ),
228
+ new ConnectionManagerTimeout($connector, 2.0),
229
229
3
230
230
);
231
231
0 commit comments