mirror of
https://github.com/apple/swift-nio-http2
synced 2026-11-25 04:47:50 +00:00
Motivation: It's important to ensure that child channel users can observe the writability state of a child channel in order to avoid ballooning data in memory. Up until now we haven't supported writability notifications, but we really should. Modifications: - Added a flow controller to manage writability. - Managed data flow through promises. - Lots of tests. Result: Child channels will provide a much better signal as to whether they are writable.
36 lines
1.2 KiB
Swift
36 lines
1.2 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
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// StreamChannelFlowControllerTests+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 StreamChannelFlowControllerTests {
|
|
|
|
static var allTests : [(String, (StreamChannelFlowControllerTests) -> () throws -> Void)] {
|
|
return [
|
|
("testChannelWritabilityChangesFromFlowControl", testChannelWritabilityChangesFromFlowControl),
|
|
("testChannelWritabilityChangesFromParent", testChannelWritabilityChangesFromParent),
|
|
("testChannelWritabilityConsidersBothFlowControlAndParent", testChannelWritabilityConsidersBothFlowControlAndParent),
|
|
]
|
|
}
|
|
}
|
|
|