scoop:scoop.http:0.1.0
src/http2_limits_builder.scoop
Selected production source · src/http2_limits_builder.scoop
1
package scoop.http3
public fun Http2Limits.copy(configure: Http2LimitsBuilder.() -> Unit = {}): Http2Limits {4
val builder = Http2LimitsBuilder()5
builder.headers = this.headers6
builder.maxContinuations = this.maxContinuations7
builder.maxSendHeaderBlockBytes = this.maxSendHeaderBlockBytes8
builder.maxPendingBodyBytes = this.maxPendingBodyBytes9
builder.configure()10
return builder.snapshot()11
}13
public class Http2LimitsBuilder internal constructor() {14
public var headers: HttpHeaderLimits = HttpHeaderLimits()15
public var maxContinuations: Long = 8L16
public var maxSendHeaderBlockBytes: Long = 65536L17
public var maxPendingBodyBytes: Long = 65536L19
public fun headers(configure: HttpHeaderLimitsBuilder.() -> Unit): Unit {20
headers = headers.copy(configure)21
}22
internal fun snapshot(): Http2Limits =23
Http2Limits(headers, maxContinuations, maxSendHeaderBlockBytes, maxPendingBodyBytes)24
}