- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 21 for minOf (0.02 sec)
-
mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt
while (bytesLeft > 0) { if (bytesWrittenSinceLastDelay == bytesPerPeriod) { flush() sleepNanos(periodDelayNanos) bytesWrittenSinceLastDelay = 0 } val toWrite = minOf(bytesLeft, bytesPerPeriod - bytesWrittenSinceLastDelay) bytesWrittenSinceLastDelay += toWrite bytesLeft -= toWrite delegate.write(source, toWrite) } }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.5K bytes - Viewed (0) -
mockwebserver/src/main/kotlin/mockwebserver3/internal/TriggerSink.kt
byteCount: Long, ) { if (byteCount == 0L) return // Avoid double-triggering. if (bytesWritten == triggerByteCount) { source.skip(byteCount) return } val toWrite = minOf(byteCount, triggerByteCount - bytesWritten) bytesWritten += toWrite delegate.write(source, toWrite) if (bytesWritten == triggerByteCount) { trigger() }
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache2/Relay.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 11.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/MultipartReader.kt
source.require(crlfDashDashBoundary.size.toLong()) return when (val delimiterIndex = source.buffer.indexOf(crlfDashDashBoundary)) { -1L -> minOf(maxResult, source.buffer.size - crlfDashDashBoundary.size + 1) else -> minOf(maxResult, delimiterIndex) } } @Throws(IOException::class) override fun close() { if (closed) return closed = true
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 7.1K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt
byteCount: Long, ): Long { require(byteCount >= 0L) { "byteCount < 0: $byteCount" } check(!closed) { "closed" } if (bytesRemaining == 0L) return -1 val read = super.read(sink, minOf(bytesRemaining, byteCount)) if (read == -1L) { carrier.noNewExchanges() // The server didn't supply the promised content length. val e = ProtocolException("unexpected end of stream")
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 16.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Writer.kt
requestHeaders: List<Header>, ) { this.withLock { if (closed) throw IOException("closed") hpackWriter.writeHeaders(requestHeaders) val byteCount = hpackBuffer.size val length = minOf(maxFrameSize - 4L, byteCount).toInt() frameHeader( streamId = streamId, length = length + 4, type = TYPE_PUSH_PROMISE,
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Sat Apr 20 17:03:43 UTC 2024 - 11.3K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/-ResponseCommon.kt
@Throws(IOException::class) fun Response.commonPeekBody(byteCount: Long): ResponseBody { val peeked = body.source().peek() val buffer = Buffer() peeked.request(byteCount) buffer.write(peeked, minOf(byteCount, peeked.buffer.size)) return buffer.asResponseBody(body.contentType(), buffer.size) } fun Response.commonNewBuilder(): Response.Builder = Response.Builder(this) val Response.commonIsRedirect: Boolean
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 5.2K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/Certificates.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 2.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidLog.kt
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 3.9K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheStrategy.kt
val ageMillis = cacheResponseAge() var freshMillis = computeFreshnessLifetime() if (requestCaching.maxAgeSeconds != -1) { freshMillis = minOf(freshMillis, SECONDS.toMillis(requestCaching.maxAgeSeconds.toLong())) } var minFreshMillis: Long = 0 if (requestCaching.minFreshSeconds != -1) {
Registered: Fri Nov 01 11:42:11 UTC 2024 - Last Modified: Mon Apr 15 13:24:48 UTC 2024 - 12K bytes - Viewed (0)