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

DO NOT MERGE: Example of an H1/H2 bootstrap #412

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

FranzBusch
Copy link
Contributor

This PR just aims to show how bootstrapping an H1/H2 server looks like right now.

# Motivation
In my latest PR in NIO, I removed a bunch of API from the bootstrap methods to make the API easier to digest and reduce a number of duplicated code issues.

# Modification
This PR adopts the latest NIO changes and adapts the APIs in H2. More specifically, it removes the `NIOAsyncChannel` convenience methods and makes sure that everything aligns nicely with the proposes bootstrap APIs.

# Result
We now have the APIs in place to bootstrap a protocol negotiated H1/H2 server.
synchronouslyWrapping: http1ConnectionChannel,
configuration: .init(
inboundType: HTTPServerRequestPart.self,
outboundType: HTTPServerResponsePart.self
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This produces a bunch of Sendable warnings due to IOData.

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.

None yet

1 participant