Skip to content

Stop teaching sendable() as a liveness check - #174

Merged
EdmondDantes merged 1 commit into
mainfrom
docs-body-modes-corrections
Aug 19, 2026
Merged

EdmondDantes merged 1 commit into
mainfrom
docs-body-modes-corrections

Conversation

@EdmondDantes

Copy link
Copy Markdown
Contributor

Documentation only.

README.md showed if (!$response->sendable()) break; // peer gone — stop early inside the SSE loop. sendable() reports whether send() would park, so that line ends a stream at the first sign of backpressure and drops what it was about to write. It travelled: laravel-spawn wrapped it as Sse::connected() with the same wording, and YanGusik/laravel-spawn#60 truncated a proxied body at ~100 KB with the same loop. The guard is removed rather than replaced — sseEvent() waits for room by itself, and a departed peer arrives as HttpException 499.

The sendable() docblock now says what false does not mean. The write() docblock said "Write data to response body buffer" without the part that matters: nothing leaves before end(), which is the other half of #60.

The docs/USAGE.md section on the three body modes is deliberately not in this PR. It would describe names that the contract in dev/PLAN.md renames in the next step, and the reporter is writing his proxy recipe against the new ones.

@EdmondDantes
EdmondDantes force-pushed the docs-body-modes-corrections branch from 70468e1 to df671ae Compare August 19, 2026 17:56
@EdmondDantes
EdmondDantes merged commit ce68617 into main Aug 19, 2026
5 checks passed
@EdmondDantes
EdmondDantes deleted the docs-body-modes-corrections branch August 19, 2026 17:56
@github-actions

github-actions Bot commented Aug 19, 2026 •

Copy link
Copy Markdown
Contributor

Coverage

Total lines: 82.26% → 82.24% (-0.03 pp)

File Baseline Current Δ Touched
src/core/http_connection.c 75.45% 75.26% -0.19 pp
src/http1/http_parser.c 84.06% 83.68% -0.38 pp
src/http3/http3_callbacks.c 84.09% 83.65% -0.44 pp
src/http3/http3_static_response.c 75.11% 76.37% +1.27 pp
src/websocket/php_websocket.c 78.44% 78.61% +0.17 pp
src/websocket/ws_session.c 90.41% 90.04% -0.37 pp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant