mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-24 04:38:00 +00:00
Motivation: This continues the work to expose functionality which allows users to interact with HTTP/2 connections via async abstractions and using structured concurrency. This work enables protocol negotiation between HTTP/1.1 and HTTP/2 in its most generic form. Modifications: Enable protocol negotiation between HTTP/1.1 and HTTP/2 using typed negotiation results (`NIOProtocolNegotiationResult`) from the `NIOTypedApplicationProtocolNegotiationHandler`. In the HTTP/2 case the negotiation result will return the HTTP/2 connection channel and the `NIOHTTP2Handler.AsyncStreamMultiplexer` which exposes inbound streams as an iterable async stream. Result: Users will be able to set up negotiated HTTP/1.1 / HTTP/2 connections and iterate over inbound streams.