|
1 | 1 | <?php |
2 | 2 |
|
3 | | -namespace React\Http; |
| 3 | +namespace React\Http\Io; |
4 | 4 |
|
5 | 5 | use Evenement\EventEmitter; |
6 | 6 | use Psr\Http\Message\ResponseInterface; |
7 | 7 | use Psr\Http\Message\ServerRequestInterface; |
8 | | -use React\Http\Io\ChunkedDecoder; |
9 | | -use React\Http\Io\ChunkedEncoder; |
10 | | -use React\Http\Io\CloseProtectionStream; |
11 | | -use React\Http\Io\HttpBodyStream; |
12 | | -use React\Http\Io\LengthLimitedStream; |
13 | | -use React\Http\Io\MiddlewareRunner; |
14 | | -use React\Http\Io\RequestHeaderParser; |
15 | | -use React\Http\Io\ServerRequest; |
| 8 | +use React\Http\Response; |
16 | 9 | use React\Promise; |
17 | 10 | use React\Promise\CancellablePromiseInterface; |
18 | 11 | use React\Promise\PromiseInterface; |
|
22 | 15 | use React\Stream\WritableStreamInterface; |
23 | 16 |
|
24 | 17 | /** |
25 | | - * The advanced `StreamingServer` class is responsible for handling incoming connections and then |
| 18 | + * The internal `StreamingServer` class is responsible for handling incoming connections and then |
26 | 19 | * processing each incoming HTTP request. |
27 | 20 | * |
28 | 21 | * Unlike the [`Server`](#server) class, it does not buffer and parse the incoming |
|
80 | 73 | * handler function may not be fully compatible with PSR-7. See also |
81 | 74 | * [streaming request](#streaming-request) below for more details. |
82 | 75 | * |
| 76 | + * @see \React\Http\Server |
83 | 77 | * @see Request |
84 | 78 | * @see Response |
85 | 79 | * @see self::listen() |
| 80 | + * @internal |
86 | 81 | */ |
87 | 82 | final class StreamingServer extends EventEmitter |
88 | 83 | { |
@@ -131,44 +126,8 @@ public function __construct($requestHandler) |
131 | 126 | /** |
132 | 127 | * Starts listening for HTTP requests on the given socket server instance |
133 | 128 | * |
134 | | - * The server needs to be attached to an instance of |
135 | | - * `React\Socket\ServerInterface` which emits underlying streaming |
136 | | - * connections in order to then parse incoming data as HTTP. |
137 | | - * For each request, it executes the callback function passed to the |
138 | | - * constructor with the respective [request](#request) object and expects |
139 | | - * a respective [response](#response) object in return. |
140 | | - * |
141 | | - * You can attach this to a |
142 | | - * [`React\Socket\Server`](https://github.com/reactphp/socket#server) |
143 | | - * in order to start a plaintext HTTP server like this: |
144 | | - * |
145 | | - * ```php |
146 | | - * $server = new StreamingServer($handler); |
147 | | - * |
148 | | - * $socket = new React\Socket\Server(8080, $loop); |
149 | | - * $server->listen($socket); |
150 | | - * ``` |
151 | | - * |
152 | | - * See also [example #1](examples) for more details. |
153 | | - * |
154 | | - * Similarly, you can also attach this to a |
155 | | - * [`React\Socket\SecureServer`](https://github.com/reactphp/socket#secureserver) |
156 | | - * in order to start a secure HTTPS server like this: |
157 | | - * |
158 | | - * ```php |
159 | | - * $server = new StreamingServer($handler); |
160 | | - * |
161 | | - * $socket = new React\Socket\Server(8080, $loop); |
162 | | - * $socket = new React\Socket\SecureServer($socket, $loop, array( |
163 | | - * 'local_cert' => __DIR__ . '/localhost.pem' |
164 | | - * )); |
165 | | - * |
166 | | - * $server->listen($socket); |
167 | | - * ``` |
168 | | - * |
169 | | - * See also [example #11](examples) for more details. |
170 | | - * |
171 | 129 | * @param ServerInterface $socket |
| 130 | + * @see \React\Http\Server::listen() |
172 | 131 | */ |
173 | 132 | public function listen(ServerInterface $socket) |
174 | 133 | { |
|
0 commit comments