mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-27 05:04:23 +00:00
Motivation: To lift the requirement that stream creation order must match the order of the first write on those channels we added a payload-based stream channel. We need a way for users to create these channels and initialze these channels when they are inbound. Modifications: - Adds a `createStreamChannel` using a stream initialzer without a stream ID - Adds a new multiplexer `init` where the inbound stream initialzer does not use stream IDs - Adds an additional 'configure' to MultiplexerAbstractChannel - Replaces the `init` in `MultiplexerAbstractChannel` with two `static func`s: we can't switch on an optional stream ID since inbound streams always have a stream ID; we need to be be able to explicitly support choosing the type of channel we want. - Minor refactoring in `HTTP2StreamChannel` to avoid duplication between the `configure` functions Result: - The multiplexer can create payload based streams manually and when a new stream is inbound. Co-authored-by: Cory Benfield <lukasa@apple.com>