- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for throttleBody (0.04 sec)
-
okhttp/src/jvmTest/kotlin/okhttp3/InterceptorTest.kt
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Tue Nov 04 16:11:23 UTC 2025 - 28.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/TrailersTest.kt
server.enqueue( MockResponse .Builder() .addHeader("h1", "v1") .trailers(headersOf("t1", "v2")) .body(protocol, halfResponseBody + halfResponseBody) .throttleBody( OKHTTP_CLIENT_WINDOW_SIZE.toLong(), DISCARD_STREAM_TIMEOUT_MILLIS.toLong() + 1L, TimeUnit.MILLISECONDS, ).build(), ) val call = client.newCall(Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sat Nov 08 21:45:04 UTC 2025 - 18.8K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/MockResponse.kt
/** * Throttles the request reader and response writer to sleep for the given period after each * series of [bytesPerPeriod] bytes are transferred. Use this to simulate network behavior. */ public fun throttleBody( bytesPerPeriod: Long, period: Long, unit: TimeUnit, ): Builder = apply { throttleBytesPerPeriod = bytesPerPeriod throttlePeriodNanos = unit.toNanos(period)Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 17.8K bytes - Viewed (0) -
mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/MockWebServerTest.kt
* should yield one sleep for a total delay of 500ms. */ @Test fun throttleRequest() { assumeNotWindows() server.enqueue( MockResponse() .throttleBody(3, 500, TimeUnit.MILLISECONDS), ) val startNanos = System.nanoTime() val connection = server.url("/").toUrl().openConnection() connection.setDoOutput(true)
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Thu Jul 03 13:16:34 UTC 2025 - 22.3K bytes - Viewed (0) -
mockwebserver/src/test/java/mockwebserver3/MockWebServerTest.kt
* should yield one sleep for a total delay of 500ms. */ @Test fun throttleRequest() { assumeNotWindows() server.enqueue( MockResponse .Builder() .throttleBody(3, 500, TimeUnit.MILLISECONDS) .build(), ) val startNanos = System.nanoTime() val connection = server.url("/").toUrl().openConnection() connection.doOutput = true
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sun Aug 03 22:38:00 UTC 2025 - 28K bytes - Viewed (0) -
mockwebserver/api/mockwebserver3.api
public final fun socketHandler (Lmockwebserver3/SocketHandler;)Lmockwebserver3/MockResponse$Builder; public final fun status (Ljava/lang/String;)Lmockwebserver3/MockResponse$Builder; public final fun throttleBody (JJLjava/util/concurrent/TimeUnit;)Lmockwebserver3/MockResponse$Builder; public final fun trailers (Lokhttp3/Headers;)Lmockwebserver3/MockResponse$Builder;
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Fri Jun 20 11:46:46 UTC 2025 - 11.8K bytes - Viewed (0) -
mockwebserver-deprecated/api/mockwebserver.api
public final fun setTrailers (Lokhttp3/Headers;)Lokhttp3/mockwebserver/MockResponse; public final fun socketPolicy (Lokhttp3/mockwebserver/SocketPolicy;)V public final fun status (Ljava/lang/String;)V public final fun throttleBody (JJLjava/util/concurrent/TimeUnit;)Lokhttp3/mockwebserver/MockResponse; public fun toString ()Ljava/lang/String; public final fun trailers (Lokhttp3/Headers;)V
Registered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Sat Jul 22 12:28:51 UTC 2023 - 10.2K bytes - Viewed (0) -
okhttp/src/jvmTest/kotlin/okhttp3/KotlinSourceModernTest.kt
mockResponse.socketPolicy = SocketPolicy.KEEP_OPEN var http2ErrorCode: Int = mockResponse.http2ErrorCode mockResponse.http2ErrorCode = 0 mockResponse = mockResponse.throttleBody(0L, 0L, TimeUnit.SECONDS) var throttleBytesPerPeriod: Long = mockResponse.throttleBytesPerPeriod throttleBytesPerPeriod = mockResponse.throttleBytesPerPeriodRegistered: Fri Dec 26 11:42:13 UTC 2025 - Last Modified: Wed Nov 05 18:28:35 UTC 2025 - 47K bytes - Viewed (0)