Repository navigation
Conversation
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.
The asyncio examples currently show servers, while the client examples use blocking sockets or Twisted. This adds a runnable single-request asyncio client and a documentation page linked from the client examples, addressing #1239.
The example uses verified TLS and checks ALPN before sending HTTP/2 bytes. One coroutine owns the h2 connection, flushes generated frames with drain(), and acknowledges received flow-controlled data. It handles headers, body and trailers, distinguishes completion from premature EOF/reset/GOAWAY, and closes the transport on errors or cancellation. Server push is disabled and only the requested stream is collected. The documentation explains the in-memory body and single-request scope.
Nine integration cases exercise a local TLS server, including padded 256 KiB responses spanning the flow-control window, trailers, empty responses, GOAWAY with/without completion, reset, EOF, timeout cleanup, and failed ALPN. Test certificates are generated in temporary directories with OpenSSL; those cases explicitly skip if OpenSSL is unavailable.
Validation on Linux ARM64:
No core protocol code changes. Other platforms, the remaining Python matrix and h2spec were not run locally.
AI assistance was used for implementation and validation.