apple / swift-nio-http2

HTTP/2 support for SwiftNIO
https://swiftpackageindex.com/apple/swift-nio-http2/main/documentation/niohttp2
Apache License 2.0
465 stars 82 forks source link

HTTP/2 pipeline NIOAsyncChannel pipeline config #403

Closed rnro closed 1 year ago

rnro commented 1 year ago

Motivation:

This continues the work to expose functionality which allows users to interact with HTTP/2 connections via async abstractions and using structured concurrency.

We build atop of previous work to configure pipelines to deal with HTTP/2 (with no protocol negotiation) and to wrap connection/stream channels with NIOAsyncChannels. This will allow users to iterate over streams and HTTP2Frames.

Modifications:

Provide functions which configure channels and pipelines with the HTTP2 handler, expose a multiplexer for dealing with streams and wrap connection and stream channels with NIOAsyncChannels.

Result:

Users will be able to create and interact with HTTP/2 connections via NIOAsyncChannels. Because HTTP/2 is a negotiated protocol and we do not yet handle it, this is of limited utility.