mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-23 04:34:24 +00:00
The codec now caches the most recent outbound frame and only writes it on flush or when receiving `.end`. This lets us set `endStream=true` on the final data or headers frame instead of sending a separate empty data frame. Changes: - Introduced `PendingFrameWrite` to cache frame payload and promise - Modified `processOutboundData` to return optional frames instead of writing immediately - Added `flush()` method to both client codecs to handle cached writes - Promise merging ensures correct completion notification when combining frames