- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 25 for bytesUnread (0.26 sec)
-
internal/http/request-recorder.go
buf bytes.Buffer // total bytes read including header size bytesRead int } // Close is a no operation closer func (r *RequestRecorder) Close() error { // no-op return nil } // Read reads from the internal reader and counts/save the body in the memory func (r *RequestRecorder) Read(p []byte) (n int, err error) { n, err = r.Reader.Read(p) r.bytesRead += n if r.LogBody { r.buf.Write(p[:n]) }
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Wed Apr 12 21:37:19 UTC 2023 - 1.8K bytes - Viewed (0) -
src/internal/trace/testdata/cmd/gotraceeventstats/main.go
size += binary.PutUvarint(buf[:], uint64(len(e.Data))) size += len(e.Data) } return size } type countingReader struct { io.Reader bytesRead int } func (r *countingReader) Read(b []byte) (int, error) { n, err := r.Reader.Read(b) r.bytesRead += n return n, err
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 20:31:29 UTC 2024 - 2.9K bytes - Viewed (0) -
internal/hash/reader.go
n, err := r.src.Read(p) r.bytesRead += int64(n) if r.sha256 != nil { r.sha256.Write(p[:n]) } if r.contentHasher != nil { r.contentHasher.Write(p[:n]) } if err == io.EOF { // Verify content SHA256, if set. if r.expectedMin > 0 { if r.bytesRead < r.expectedMin { return 0, SizeTooSmall{Want: r.expectedMin, Got: r.bytesRead} } } if r.expectedMax > 0 {
Registered: Sun Jun 16 00:44:34 UTC 2024 - Last Modified: Mon Sep 18 17:00:54 UTC 2023 - 10.8K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/cache/CacheInterceptor.kt
} throw e } if (bytesRead == -1L) { if (!cacheRequestClosed) { cacheRequestClosed = true cacheBody.close() // The cache response is complete! } return -1 } sink.copyTo(cacheBody.buffer, sink.size - bytesRead, bytesRead) cacheBody.emitCompleteSegments() return bytesRead
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Fri Mar 22 07:09:21 UTC 2024 - 10.2K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/ws/MessageInflater.kt
val totalBytesToRead = inflater.bytesRead + deflatedBytes.size // We cannot read all, as the source does not close. // Instead, we ensure that all bytes from source have been processed by inflater. do { inflaterSource.readOrInflate(buffer, Long.MAX_VALUE) } while (inflater.bytesRead < totalBytesToRead && !inflater.finished()) } @Throws(IOException::class)
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 1.8K bytes - Viewed (0) -
platforms/software/dependency-management/src/test/groovy/org/gradle/internal/resource/transfer/ProgressLoggingExternalResourceAccessorTest.groovy
action.call(context) } 1 * context.setResult(_) >> { ExternalResourceReadBuildOperationType.Result opResult -> assert opResult.bytesRead == bytesRead } } def expectResourceRead(InputStream inputStream) { 1 * delegate.withContent(location, false, _) >> { uri, revalidate, action -> action.execute(inputStream, metaData)
Registered: Wed Jun 12 18:38:38 UTC 2024 - Last Modified: Fri Mar 08 12:31:19 UTC 2024 - 7.5K bytes - Viewed (0) -
src/cmd/trace/main.go
for { ev, err := r.ReadEvent() if err == io.EOF { validBytes = cr.bytesRead.Load() validEvents = len(t.events) break } if err != nil { t.err = err break } t.events = append(t.events, ev) s.Event(&t.events[len(t.events)-1]) if ev.Kind() == trace.EventSync { validBytes = cr.bytesRead.Load() validEvents = len(t.events) } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 18:48:18 UTC 2024 - 10.4K bytes - Viewed (0) -
okhttp/src/main/kotlin/okhttp3/internal/connection/Exchange.kt
} fun <E : IOException?> bodyComplete( bytesRead: Long, responseDone: Boolean, requestDone: Boolean, e: E, ): E { if (e != null) { trackFailure(e) } if (requestDone) { if (e != null) { eventListener.requestFailed(call, e) } else { eventListener.requestBodyEnd(call, bytesRead) } } if (responseDone) {
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 9.2K bytes - Viewed (0) -
okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt
private class CountingSource(source: Source) : ForwardingSource(source) { var bytesRead = 0L override fun read( sink: Buffer, byteCount: Long, ): Long { val result = delegate.read(sink, byteCount) if (result == -1L) return -1L bytesRead += result return result } }
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Mon Jan 08 01:13:22 UTC 2024 - 10.5K bytes - Viewed (0) -
okhttp/src/test/java/okhttp3/internal/ws/MessageDeflaterInflaterTest.kt
} /** * We had a bug where self-finishing inflater streams would infinite loop! * https://github.com/square/okhttp/issues/8078 */ @Test fun `inflate returns finished before bytesRead reaches input length`() { val inflater = MessageInflater(false) val message = "53621260020000".decodeHex() assertThat(inflater.inflate(message)).isEqualTo("22021002".decodeHex()) }
Registered: Sun Jun 16 04:42:17 UTC 2024 - Last Modified: Sat Jan 06 05:31:00 UTC 2024 - 5K bytes - Viewed (0)