mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-28 05:14:25 +00:00
Motivation:
We attempted to use the NIO channel pipeline to spread out the HTTP/2
implementation across a number of channel handlers. Unfortunately, due
to the concerns of reentrancy it's not really safely possible to do this:
it's too easy for the pipeline ordering to become so confused that the
implementation ends up incorrect.
For this reason, we are going to squash together the three handlers that
provide a complete HTTP/2 protocol implementation into just one.
Modifications:
- Move the ConcurrentStreamsHandler and FlowControlHandler into the
HTTP2Handler.
- Update setup and test code accordingly.
Result:
More correct implementation
40 lines
1.4 KiB
Swift
40 lines
1.4 KiB
Swift
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This source file is part of the SwiftNIO open source project
|
|
//
|
|
// Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
|
|
// Licensed under Apache License v2.0
|
|
//
|
|
// See LICENSE.txt for license information
|
|
// See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
//
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// CompoundOutboundBufferTest+XCTest.swift
|
|
//
|
|
import XCTest
|
|
|
|
///
|
|
/// NOTE: This file was generated by generate_linux_tests.rb
|
|
///
|
|
/// Do NOT edit this file directly as it will be regenerated automatically when needed.
|
|
///
|
|
|
|
extension CompoundOutboundBufferTest {
|
|
|
|
static var allTests : [(String, (CompoundOutboundBufferTest) -> () throws -> Void)] {
|
|
return [
|
|
("testSimpleControlFramePassthrough", testSimpleControlFramePassthrough),
|
|
("testSimpleOutboundStreamBuffering", testSimpleOutboundStreamBuffering),
|
|
("testSimpleFlowControlBuffering", testSimpleFlowControlBuffering),
|
|
("testConcurrentStreamErrorThrows", testConcurrentStreamErrorThrows),
|
|
("testFlowControlStreamThrows", testFlowControlStreamThrows),
|
|
("testDelayedFlowControlStreamErrors", testDelayedFlowControlStreamErrors),
|
|
("testBufferedFrameDrops", testBufferedFrameDrops),
|
|
]
|
|
}
|
|
}
|
|
|