Scoop API

scoop:scoop.http:0.1.0

src/http2_limits_builder.scoop

Selected production source · src/http2_limits_builder.scoop

1package scoop.http
3public fun Http2Limits.copy(configure: Http2LimitsBuilder.() -> Unit = {}): Http2Limits {
4 val builder = Http2LimitsBuilder()
5 builder.headers = this.headers
6 builder.maxContinuations = this.maxContinuations
7 builder.maxSendHeaderBlockBytes = this.maxSendHeaderBlockBytes
8 builder.maxPendingBodyBytes = this.maxPendingBodyBytes
9 builder.configure()
10 return builder.snapshot()
13public class Http2LimitsBuilder internal constructor() {
14 public var headers: HttpHeaderLimits = HttpHeaderLimits()
15 public var maxContinuations: Long = 8L
16 public var maxSendHeaderBlockBytes: Long = 65536L
17 public var maxPendingBodyBytes: Long = 65536L
19 public fun headers(configure: HttpHeaderLimitsBuilder.() -> Unit): Unit {
20 headers = headers.copy(configure)
21 }
22 internal fun snapshot(): Http2Limits =
23 Http2Limits(headers, maxContinuations, maxSendHeaderBlockBytes, maxPendingBodyBytes)