- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for minOf (0.07 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) -
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 Sep 05 11:42:10 UTC 2025 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.4K 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-tls/src/main/kotlin/okhttp3/tls/Certificates.kt
Registered: Fri Sep 05 11:42:10 UTC 2025 - Last Modified: Wed Mar 19 19:25:20 UTC 2025 - 2.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)