File tree Expand file tree Collapse file tree 3 files changed +7
-9
lines changed
Expand file tree Collapse file tree 3 files changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -23,17 +23,13 @@ client/server and interaction with processes. Third-party libraries can use thes
2323components to create async network clients/servers and more.
2424
2525``` php
26- $server = new React\Http\Server(function (Psr\Http\Message\ServerRequestInterface $request) {
27- return new React\Http\Message\Response(
28- 200,
29- array(
30- 'Content-Type' => 'text/plain'
31- ),
26+ $server = new React\Http\HttpServer(function (Psr\Http\Message\ServerRequestInterface $request) {
27+ return React\Http\Message\Response::plaintext(
3228 "Hello World!\n"
3329 );
3430});
3531
36- $socket = new React\Socket\Server ('127.0.0.1:8080');
32+ $socket = new React\Socket\SocketServer ('127.0.0.1:8080');
3733$server->listen($socket);
3834
3935echo "Server running at http://127.0.0.1:8080" . PHP_EOL;
Original file line number Diff line number Diff line change 1212 "react/cache" : " ^1.0" ,
1313 "react/dns" : " ^1.8" ,
1414 "react/event-loop" : " ^1.2" ,
15- "react/http" : " ^1.4 " ,
15+ "react/http" : " ^1.6 " ,
1616 "react/promise" : " ^2.1 || ^1.2" ,
1717 "react/promise-stream" : " ^1.1.1" ,
1818 "react/promise-timer" : " ^1.7" ,
19- "react/socket" : " ^1.8 " ,
19+ "react/socket" : " ^1.9 " ,
2020 "react/stream" : " ^1.2"
2121 },
2222 "require-dev" : {
Original file line number Diff line number Diff line change 66 <directory >./vendor/react/*/tests/</directory >
77 <!-- temporarily skip broken und unneeded tests, see https://github.com/reactphp/event-loop/pull/232 -->
88 <exclude >./vendor/react/event-loop/tests/BinTest.php</exclude >
9+ <!-- temporarily skip broken und unneeded tests, see https://github.com/reactphp/http/pull/440 -->
10+ <exclude >./vendor/react/http/tests/HttpServerTest.php</exclude >
911 </testsuite >
1012 </testsuites >
1113
You can’t perform that action at this time.
0 commit comments