mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-29 05:24:22 +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
43 lines
1.8 KiB
Swift
43 lines
1.8 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// ConcurrentStreamBufferTest+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 ConcurrentStreamBufferTests {
|
|
|
|
static var allTests : [(String, (ConcurrentStreamBufferTests) -> () throws -> Void)] {
|
|
return [
|
|
("testBasicFunctionality", testBasicFunctionality),
|
|
("testToleratesNegativeNumbersOfStreams", testToleratesNegativeNumbersOfStreams),
|
|
("testCascadingFrames", testCascadingFrames),
|
|
("testBufferedFramesPassedThroughOnStreamClosed", testBufferedFramesPassedThroughOnStreamClosed),
|
|
("testResetStreamOnUnbufferingStream", testResetStreamOnUnbufferingStream),
|
|
("testResetStreamOnBufferingStream", testResetStreamOnBufferingStream),
|
|
("testGoingBackwardsInStreamIDIsNotAllowed", testGoingBackwardsInStreamIDIsNotAllowed),
|
|
("testFramesForNonLocalStreamIDsAreIgnoredClient", testFramesForNonLocalStreamIDsAreIgnoredClient),
|
|
("testFramesForNonLocalStreamIDsAreIgnoredServer", testFramesForNonLocalStreamIDsAreIgnoredServer),
|
|
("testDropsFramesOnStreamClosure", testDropsFramesOnStreamClosure),
|
|
]
|
|
}
|
|
}
|
|
|