mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-28 05:14:25 +00:00
New HTTP/2 currency types. (#44)
Motivation: As discussed in our HTTP/2 types manifesto, it is helpful to run more metadata through the HTTP/2 pipeline. This makes it easier to write ChannelHandlers that fully participate in the HTTP/2 state machine while avoiding needing to too tightly couple the handlers. Modifications: - Added new HTTP/2 pipeline data types. - Removed HTTP2Frame.FrameFlags, moved flags into relevant payloads. Result: Right now, not much. All tests pass with new payload types. The full data path rewrite will follow in a separate patch, as this one is large enough.
This commit is contained in:
1 parent
ffe5102b7e
commit
24f67d855e
17 files changed
+883
-597
No files matched your search
@@ -72,7 +72,7 @@ public class NIOHTTP2ConcurrentStreamsHandler: ChannelDuplexHandler {
|
||||
|
||||
public func channelRead(context: ChannelHandlerContext, data: NIOAny) {
|
||||
let frame = self.unwrapInboundIn(data)
|
||||
guard case .settings(let newSettings) = frame.payload, !frame.flags.contains(.ack) else {
|
||||
guard case .settings(.settings(let newSettings)) = frame.payload else {
|
||||
// Either this is not a settings frame, or it's a settings ACK. Either way we don't care.
|
||||
// TODO(cory): We should handle GOAWAY!
|
||||
context.fireChannelRead(data)
|
||||
|
||||
Reference in new issue
Block a user