@@ -377,25 +377,29 @@ $second = new Server(8080, $loop);
377377```
378378
379379> Note that these error conditions may vary depending on your system and/or
380- configuration.
381- See the exception message and code for more details about the actual error
382- condition.
380+ configuration.
381+ See the exception message and code for more details about the actual error
382+ condition.
383383
384- Optionally, you can specify [ socket context options] ( http://php.net/manual/en/context.socket.php )
384+ Optionally, you can specify [ TCP socket context options] ( http://php.net/manual/en/context.socket.php )
385385for the underlying stream socket resource like this:
386386
387387``` php
388388$server = new Server('[::1]:8080', $loop, array(
389- 'backlog' => 200,
390- 'so_reuseport' => true,
391- 'ipv6_v6only' => true
389+ 'tcp' => array(
390+ 'backlog' => 200,
391+ 'so_reuseport' => true,
392+ 'ipv6_v6only' => true
393+ )
392394));
393395```
394396
395397> Note that available [ socket context options] ( http://php.net/manual/en/context.socket.php ) ,
396- their defaults and effects of changing these may vary depending on your system
397- and/or PHP version.
398- Passing unknown context options has no effect.
398+ their defaults and effects of changing these may vary depending on your system
399+ and/or PHP version.
400+ Passing unknown context options has no effect.
401+ For BC reasons, you can also pass the TCP socket context options as a simple
402+ array without wrapping this in another array under the ` tcp ` key.
399403
400404Whenever a client connects, it will emit a ` connection ` event with a connection
401405instance implementing [ ` ConnectionInterface ` ] ( #connectioninterface ) :
0 commit comments