Lines Matching refs:byteCount
74 internal fun take(byteCount: Long): Long { in take()
75 require(byteCount > 0) in take()
80 val byteCountOrWaitNanos = byteCountOrWaitNanos(now, byteCount) in take()
93 internal fun byteCountOrWaitNanos(now: Long, byteCount: Long): Long { in byteCountOrWaitNanos()
94 if (bytesPerSecond == 0L) return byteCount // No limits. in byteCountOrWaitNanos()
100 if (immediateBytes >= byteCount) { in byteCountOrWaitNanos()
101 allocatedUntil = now + idleInNanos + byteCount.bytesToNanos() in byteCountOrWaitNanos()
102 return byteCount in byteCountOrWaitNanos()
112 val minByteCount = minOf(waitByteCount, byteCount) in byteCountOrWaitNanos()
137 override fun read(sink: Buffer, byteCount: Long): Long { in source()
139 val toRead = take(byteCount) in source()
153 override fun write(source: Buffer, byteCount: Long) { in sink()
155 var remaining = byteCount in sink()