- Sort Score
- Num 10 results
- Language All
Results 1 - 3 of 3 for getThrottlePeriod (0.21 seconds)
-
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/DeprecationBridge.kt
SocketPolicy.NO_RESPONSE -> result.onResponseStart(SocketEffect.Stall) SocketPolicy.RESET_STREAM_AT_START -> result.onRequestStart(CloseStream(http2ErrorCode)) } result.throttleBody(throttleBytesPerPeriod, getThrottlePeriod(MILLISECONDS), MILLISECONDS) result.bodyDelay(getBodyDelay(MILLISECONDS), MILLISECONDS) result.headersDelay(getHeadersDelay(MILLISECONDS), MILLISECONDS) return result.build() }
Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Thu Jul 03 13:16:34 GMT 2025 - 4.1K bytes - Click Count (1) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
period: Long, unit: TimeUnit, ) = apply { throttleBytesPerPeriod = bytesPerPeriod throttlePeriodAmount = period throttlePeriodUnit = unit } fun getThrottlePeriod(unit: TimeUnit): Long = unit.convert(throttlePeriodAmount, throttlePeriodUnit) fun setBodyDelay( delay: Long, unit: TimeUnit, ) = apply { bodyDelayAmount = delay bodyDelayUnit = unitCreated: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Sat May 10 11:15:14 GMT 2025 - 7.1K bytes - Click Count (1) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
var throttleBytesPerPeriod: Long = mockResponse.throttleBytesPerPeriod throttleBytesPerPeriod = mockResponse.throttleBytesPerPeriod var throttlePeriod: Long = mockResponse.getThrottlePeriod(TimeUnit.SECONDS) mockResponse = mockResponse.setBodyDelay(0L, TimeUnit.SECONDS) val bodyDelay: Long = mockResponse.getBodyDelay(TimeUnit.SECONDS) mockResponse = mockResponse.setHeadersDelay(0L, TimeUnit.SECONDS)Created: Fri Dec 26 11:42:13 GMT 2025 - Last Modified: Wed Nov 05 18:28:35 GMT 2025 - 47K bytes - Click Count (0)