Repository navigation
Complete owned WebSocket shutdown and retain partial received bytes - #264
Merged
Merged
Conversation
Co-authored-by: GPT-6 Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Native players can release their socket without sending or receiving a WebSocket close frame. Complete-message capture also loses partial bytes when STOP interrupts a frame.
Adds
finishNativeWebSocket, which completes the close handshake within the caller's existing cleanup deadline and releases the socket on every path. EOF without a peer close frame fails; a silent peer reaches the original deadline. An optional receive observer records raw chunks before buffering, including incomplete frames and upgrade bytes. It runs synchronously on the receive owner and must not reenter IO.Validation: Nim 2.2.4; 33 actual TCP/TLS transport scenarios passed, including partial-frame TERM/INT, close acknowledgement, abrupt EOF, silent peer, concurrent sends, fragmented messages and certificate/hostname rejection. Existing TLS fixture assertions now check the client rejection outcome without requiring one server-side EOF/reset behavior. Builds/tests ran under 2 GiB, one CPU and no swap.
Commands:
nim c --parallelBuild:1 --path:src --out:/private/probe tests/support/native_websocket_probe.nim, thenpython tests/test_native_websocket.py /private/probe, with the locked libcurl source. This supports the remaining Notsus lifecycle fix in Crewrift #178; it does not claim that game's full qualification is complete.