Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ThrottledSink (0.14 sec)

  1. mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt

    import okio.Buffer
    import okio.Sink
    
    /**
     * A sink that sleeps [periodDelayNanos] every [bytesPerPeriod] bytes. Unlike [okio.Throttler],
     * this permits any interval to be used.
     */
    internal class ThrottledSink(
      private val delegate: Sink,
      private val bytesPerPeriod: Long,
      private val periodDelayNanos: Long,
    ) : Sink by delegate {
      private var bytesWrittenSinceLastDelay = 0L
    
      override fun write(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  2. mockwebserver/src/main/kotlin/mockwebserver3/MockWebServer.kt

    import mockwebserver3.SocketPolicy.ShutdownOutputAtEnd
    import mockwebserver3.SocketPolicy.ShutdownServerAfterResponse
    import mockwebserver3.SocketPolicy.StallSocketAtStart
    import mockwebserver3.internal.ThrottledSink
    import mockwebserver3.internal.TriggerSink
    import mockwebserver3.internal.duplex.RealStream
    import mockwebserver3.internal.sleepNanos
    import okhttp3.ExperimentalOkHttpApi
    import okhttp3.Headers
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Mar 31 17:16:15 UTC 2024
    - 37.4K bytes
    - Viewed (0)
Back to top