Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a variant of configureAsyncHTTP2Pipeline which takes a stream delegate #439

Merged
merged 3 commits into from
May 16, 2024

Conversation

glbrntt
Copy link
Contributor

@glbrntt glbrntt commented May 1, 2024

Motivation:

configureAsyncHTTP2Pipeline doesn't allow a stream delegate to be specified. As the async pipeline uses the "inline" stream multiplexer there's no way to account for streams within the connection channel.

Modifications:

  • Add a sync and async variants of configureAsyncHTTP2Pipeline which accepts an optional stream delegate
  • Rewrite the existing helpers in terms of the new one

Result:

Users can configure an async http pipeline with a stream delegate.

…egate

Motivation:

`configureAsyncHTTP2Pipeline` doesn't allow a stream delegate to be
specified. As the async pipeline uses the "inline" stream multiplexer
there's no way to account for streams within the connection channel.

Modifications:

- Add a sync and async variants of `configureAsyncHTTP2Pipeline` which
  accepts an optional stream delegate
- Rewrite the existing helpers in terms of the new one

Result:

Users can configure an async http pipeline with a stream delegate.
@glbrntt glbrntt added the 🆕 semver/minor Adds new public API. label May 1, 2024
@glbrntt glbrntt requested a review from gjcairo May 1, 2024 17:35
Copy link
Contributor

@Lukasa Lukasa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, but can we add a test for this?

@glbrntt glbrntt requested a review from Lukasa May 15, 2024 09:40
@glbrntt glbrntt enabled auto-merge (squash) May 15, 2024 09:40
@glbrntt glbrntt merged commit 8d8eb60 into apple:main May 16, 2024
6 of 7 checks passed
@glbrntt glbrntt deleted the stream-delegate branch May 16, 2024 13:36
glbrntt pushed a commit that referenced this pull request Nov 14, 2024
…eam delegate (#471)

In the async HTTP2 pipeline there is no way to account for the opening
and closing of streams. This PR adds a variant of
`configureAsyncHTTPServerPipeline` (HTTP2 upgrade channel) that allows
the user to pass in a `NIOHTTP2StreamDelegate` to be applied to the
HTTP2 channel if the upgrade occurs.

This is similar to #439 which did the same HTTP2 only channels.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 semver/minor Adds new public API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants