Skip to content

Commit

Permalink
Updated comments to answer some PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Nov 6, 2024
1 parent 5a861a7 commit 8130172
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions Sources/HummingbirdHTTP2/HTTP2Channel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public struct HTTP2UpgradeChannel: ServerChildChannel {
public struct Configuration: Sendable {
/// Idle timeout, how long connection is kept idle before closing
public var idleTimeout: Duration?
/// Maximum amount of time to wait before all streams are closed after second GOAWAY
/// Maximum amount of time to wait for client response before all streams are closed after second GOAWAY has been sent
public var gracefulCloseTimeout: Duration?
/// Maximum amount of time a connection can be open
public var maxAgeTimeout: Duration?
Expand All @@ -48,7 +48,7 @@ public struct HTTP2UpgradeChannel: ServerChildChannel {
/// Initialize HTTP2UpgradeChannel.Configuration
/// - Parameters:
/// - idleTimeout: How long connection is kept idle before closing
/// - maxGraceCloseTimeout: Maximum amount of time to wait before all streams are closed after second GOAWAY
/// - maxGraceCloseTimeout: Maximum amount of time to wait for client response before all streams are closed after second GOAWAY
/// - streamConfiguration: Configuration applieds to HTTP2 stream channels
public init(
idleTimeout: Duration? = nil,
Expand All @@ -65,7 +65,7 @@ public struct HTTP2UpgradeChannel: ServerChildChannel {
private let sslContext: NIOSSLContext
private let http1: HTTP1Channel
private let http2Stream: HTTP2StreamChannel
let configuration: Configuration
public let configuration: Configuration

/// Initialize HTTP2Channel
/// - Parameters:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ extension HTTP2ServerConnectionManager {

enum ReceivedPingResult {
case sendPingAck(pingData: HTTP2PingData)
case enhanceYouCalmAndClose(lastStreamId: HTTP2StreamID)
case enhanceYouCalmAndClose(lastStreamId: HTTP2StreamID) // Sent when client sends too many pings
case none
}

Expand Down
8 changes: 4 additions & 4 deletions Sources/HummingbirdHTTP2/HTTP2StreamChannel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ import NIOCore
import NIOHTTPTypes
import NIOHTTPTypesHTTP2

/// Child channel for processing HTTP1
/// HTTP2 Child channel for processing an HTTP2 stream
struct HTTP2StreamChannel: ServerChildChannel, HTTPChannelHandler {
typealias Value = NIOAsyncChannel<HTTPRequestPart, HTTPResponsePart>
typealias Configuration = HTTP1Channel.Configuration

/// Initialize HTTP1Channel
/// Initialize HTTP2StreamChannel
/// - Parameters:
/// - responder: Function returning a HTTP response for a HTTP request
/// - configuration: HTTP1 channel configuration
/// - configuration: HTTP2 stream channel configuration
init(
responder: @escaping HTTPChannelHandler.Responder,
configuration: Configuration = .init()
Expand All @@ -36,7 +36,7 @@ struct HTTP2StreamChannel: ServerChildChannel, HTTPChannelHandler {
self.responder = responder
}

/// Setup child channel for HTTP1
/// Setup child channel for HTTP2 stream
/// - Parameters:
/// - channel: Child channel
/// - logger: Logger used during setup
Expand Down

0 comments on commit 8130172

Please sign in to comment.