mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-26 04:57:50 +00:00
Motivation: As part of the work for #214 to enforce stream creation order we need to remove the requirement that the data sent over the stream be aware of its stream ID ahead of time. This requires that the channel transporting the data provide the stream ID. As such we need a way to convert between data with stream IDs and data without stream IDs. Modifications: - Add 'HTTP2FrameConvertible' protocol whose conforming types can make an 'HTTP2Frame'. - Add 'HTTP2FramePayloadConvertible' protocol whose conforming types can make an 'HTTP2Frame.FramePayload'. - Conform 'HTTP2Frame' and 'HTTP2Frame.FramePayload' to the above protocols. Result: We have a protocol which an HTTP2 stream channel may be generic over.