Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for getThrottlePeriod (0.62 sec)

  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 = unit
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat May 10 11:15:14 UTC 2025
    - 7.1K bytes
    - Viewed (0)
  2. mockwebserver-deprecated/src/test/java/okhttp3/mockwebserver/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)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 7.3K bytes
    - Viewed (0)
  3. 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()
    }
    
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Thu Jul 03 13:16:34 UTC 2025
    - 4.1K bytes
    - Viewed (0)
  4. mockwebserver-deprecated/api/mockwebserver.api

    	public final fun getSocketPolicy ()Lokhttp3/mockwebserver/SocketPolicy;
    	public final fun getStatus ()Ljava/lang/String;
    	public final fun getThrottleBytesPerPeriod ()J
    	public final fun getThrottlePeriod (Ljava/util/concurrent/TimeUnit;)J
    	public final fun getTrailers ()Lokhttp3/Headers;
    	public final fun getWebSocketListener ()Lokhttp3/WebSocketListener;
    	public final fun headers (Lokhttp3/Headers;)V
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jul 22 12:28:51 UTC 2023
    - 10.2K bytes
    - Viewed (0)
  5. 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)
    Registered: Fri Sep 05 11:42:10 UTC 2025
    - Last Modified: Sat Jun 21 20:36:35 UTC 2025
    - 46.5K bytes
    - Viewed (0)
Back to top