mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-29 05:24:22 +00:00
Motivation: As part of the work in #214, HTTP2StreamID will need to be able to tolerate not knowing its stream ID. For now this is not a problem, but we should think about everywhere we use the stream ID and make sure we have a solid principle in mind. This lays the groundwork for future enhancements. Modifications: - Update HTTP2StreamChannel to hold an optional stream ID. - Update interface to HTTP2StreamMultiplexer to tolerate closing channels without stream IDs (we'll need it later). - Move the "get a new stream ID" functionality to a method on HTTP2StreamMultiplexer. - Validate we behave correctly with optional stream IDs in the channel. Result: We can tolerate stream IDs being not present.