Skip to content

Commit dfc4aab

Browse files
committed
Add $endOfStream argument to HttpWorkerInterface::respond()
1 parent 837bd3e commit dfc4aab

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/HttpWorkerInterface.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ public function waitRequest(): ?Request;
2828
* @param HeadersList|array<array-key, array<array-key, string>> $headers $headers An associative array of the
2929
* message's headers. Each key MUST be a header name, and each value MUST be an array of strings for
3030
* that header.
31+
* @param bool $endOfStream End of stream.
32+
* The {@see true} value means the Payload block is last in the stream.
3133
*/
32-
public function respond(int $status, string|\Generator $body, array $headers = []): void;
34+
public function respond(int $status, string|\Generator $body, array $headers = [], bool $endOfStream = true): void;
3335
}

0 commit comments

Comments
 (0)