Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Sources/GRPC/ClientConnection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@ extension ClientConnection {
/// Defaults to `waitsForConnectivity`.
public var callStartBehavior: CallStartBehavior = .waitsForConnectivity

/// The HTTP/2 flow control target window size. Defaults to 65535. Values are clamped between
/// The HTTP/2 flow control target window size. Defaults to 8MB. Values are clamped between
/// 1 and 2^31-1 inclusive.
public var httpTargetWindowSize = 65535 {
public var httpTargetWindowSize = 8 * 1024 * 1024 {
didSet {
self.httpTargetWindowSize = self.httpTargetWindowSize.clamped(to: 1 ... Int(Int32.max))
}
Expand Down Expand Up @@ -418,7 +418,7 @@ extension ClientConnection {
connectionKeepalive: ClientConnectionKeepalive = ClientConnectionKeepalive(),
connectionIdleTimeout: TimeAmount = .minutes(30),
callStartBehavior: CallStartBehavior = .waitsForConnectivity,
httpTargetWindowSize: Int = 65535,
httpTargetWindowSize: Int = 8 * 1024 * 1024,
backgroundActivityLogger: Logger = Logger(
label: "io.grpc",
factory: { _ in SwiftLogNoOpLogHandler() }
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPC/GRPCChannel/GRPCChannelBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ extension ClientConnection.Builder.Secure {
#endif

extension ClientConnection.Builder {
/// Sets the HTTP/2 flow control target window size. Defaults to 65,535 if not explicitly set.
/// Sets the HTTP/2 flow control target window size. Defaults to 8MB if not explicitly set.
/// Values are clamped between 1 and 2^31-1 inclusive.
@discardableResult
public func withHTTPTargetWindowSize(_ httpTargetWindowSize: Int) -> Self {
Expand Down
6 changes: 3 additions & 3 deletions Sources/GRPC/Server.swift
Original file line number Diff line number Diff line change
Expand Up @@ -322,9 +322,9 @@ extension Server {
}
}

/// The HTTP/2 flow control target window size. Defaults to 65535. Values are clamped between
/// The HTTP/2 flow control target window size. Defaults to 8MB. Values are clamped between
/// 1 and 2^31-1 inclusive.
public var httpTargetWindowSize = 65535 {
public var httpTargetWindowSize = 8 * 1024 * 1024 {
didSet {
self.httpTargetWindowSize = self.httpTargetWindowSize.clamped(to: 1 ... Int(Int32.max))
}
Expand Down Expand Up @@ -391,7 +391,7 @@ extension Server {
connectionKeepalive: ServerConnectionKeepalive = ServerConnectionKeepalive(),
connectionIdleTimeout: TimeAmount = .nanoseconds(.max),
messageEncoding: ServerMessageEncoding = .disabled,
httpTargetWindowSize: Int = 65535,
httpTargetWindowSize: Int = 8 * 1024 * 1024,
logger: Logger = Logger(label: "io.grpc", factory: { _ in SwiftLogNoOpLogHandler() }),
debugChannelInitializer: ((Channel) -> EventLoopFuture<Void>)? = nil
) {
Expand Down
2 changes: 1 addition & 1 deletion Sources/GRPC/ServerBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ extension Server.Builder.Secure {
}

extension Server.Builder {
/// Sets the HTTP/2 flow control target window size. Defaults to 65,535 if not explicitly set.
/// Sets the HTTP/2 flow control target window size. Defaults to 8MB if not explicitly set.
/// Values are clamped between 1 and 2^31-1 inclusive.
@discardableResult
public func withHTTPTargetWindowSize(_ httpTargetWindowSize: Int) -> Self {
Expand Down