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 NIOAsyncChannel standard types pipeline config #404

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.

This PR exposes conveniences for configuring HTTP/2 pipelines in the simplest case where the user knows that any inserted channel handlers will not change the InboundOut/OutboundIn types of the pipeline handlers.

Modifications:

Provide functions which specialize configuration functions which exposed generic NIOAsyncChannels with standard HTTP2Frame types.

Result:

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