- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 15 for minOf (0.02 sec)
-
mockwebserver/src/main/kotlin/mockwebserver3/internal/ThrottledSink.kt
while (bytesLeft > 0) { if (bytesWrittenSinceLastDelay == bytesPerPeriod) { flush() socket.sleepWhileOpen(periodDelayNanos) bytesWrittenSinceLastDelay = 0 } val toWrite = minOf(bytesLeft, bytesPerPeriod - bytesWrittenSinceLastDelay) bytesWrittenSinceLastDelay += toWrite bytesLeft -= toWrite delegate.write(source, toWrite) } }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 29 12:43:16 UTC 2025 - 1.5K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Writer.kt
requestHeaders: List<Header>, ) { 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 Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 23:28:25 UTC 2025 - 11K bytes - Viewed (0) -
okhttp/src/androidMain/kotlin/okhttp3/internal/platform/android/AndroidLog.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Tue Jul 22 20:03:31 UTC 2025 - 4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/MultipartReader.kt
val toIndex = minOf(source.buffer.size, maxByteCount) + 1L val boundaryIndex = source.indexOf( bytes = crlfDashDashBoundary, fromIndex = 0L, toIndex = toIndex, ) return when { boundaryIndex != -1L -> boundaryIndex // We found the boundary. source.buffer.size >= toIndex -> minOf(toIndex, maxByteCount) // No boundary before toIndex.
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 02:11:14 UTC 2025 - 7.3K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/cache2/Relay.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed May 28 17:15:47 UTC 2025 - 11.8K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/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 Sep 05 11:42:10 UTC 2025 - Last Modified: Thu Jul 31 04:18:40 UTC 2025 - 17.5K bytes - Viewed (7) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Hpack.kt
val effectiveHeaderTableSize = minOf(headerTableSizeSetting, SETTINGS_HEADER_TABLE_SIZE_LIMIT) if (maxDynamicTableByteCount == effectiveHeaderTableSize) return // No change. if (effectiveHeaderTableSize < maxDynamicTableByteCount) { smallestHeaderTableSizeSetting = minOf(smallestHeaderTableSizeSetting, effectiveHeaderTableSize) }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon May 05 16:01:00 UTC 2025 - 22.4K bytes - Viewed (0) -
mockwebserver-deprecated/src/main/kotlin/okhttp3/mockwebserver/MockResponse.kt
maxChunkSize: Int, ) = apply { removeHeader("Content-Length") headersBuilder.add(CHUNKED_BODY_HEADER) val bytesOut = Buffer() while (!body.exhausted()) { val chunkSize = minOf(body.size, maxChunkSize.toLong()) bytesOut.writeHexadecimalUnsignedLong(chunkSize) bytesOut.writeUtf8("\r\n") bytesOut.write(body, chunkSize) bytesOut.writeUtf8("\r\n") }
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat May 10 11:15:14 UTC 2025 - 7.1K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/concurrent/TaskRunner.kt
val candidateDelay = maxOf(0L, candidate.nextExecuteNanoTime - now) when { // Compute the delay of the soonest-executable task. candidateDelay > 0L -> { minDelayNanos = minOf(candidateDelay, minDelayNanos) continue@eachQueue } // If we already have more than one task, that's enough work for now. Stop searching. readyTask != null -> {
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Sat Aug 30 11:30:11 UTC 2025 - 10.4K bytes - Viewed (0) -
okhttp/src/commonJvmAndroid/kotlin/okhttp3/internal/http2/Http2Stream.kt
} else if (readBuffer.size > 0L) { // Prepare to read bytes. Start by moving them to the caller's buffer. readBytesDelivered = readBuffer.read(sink, minOf(byteCount, readBuffer.size)) readBytes.update(total = readBytesDelivered) val unacknowledgedBytesRead = readBytes.unacknowledged if (errorExceptionToDeliver == null &&
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jul 07 18:57:05 UTC 2025 - 22.4K bytes - Viewed (0)