4 writes to _chunkBytesRemaining
System.Net.Http (4)
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (4)
78
_chunkBytesRemaining
-= (ulong)bytesRead;
194
_chunkBytesRemaining
-= (ulong)bytesRead;
337
_chunkBytesRemaining
= chunkSize;
371
_chunkBytesRemaining
-= (ulong)bytesToConsume;
20 references to _chunkBytesRemaining
System.Net.Http (20)
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (20)
65
_chunkBytesRemaining
>= (ulong)_connection.ReadBufferSize)
73
int bytesRead = _connection.Read(buffer.Slice(0, (int)Math.Min((ulong)buffer.Length,
_chunkBytesRemaining
)));
76
throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount,
_chunkBytesRemaining
));
79
if (
_chunkBytesRemaining
== 0)
181
_chunkBytesRemaining
>= (ulong)_connection.ReadBufferSize)
189
int bytesRead = await _connection.ReadAsync(buffer.Slice(0, (int)Math.Min((ulong)buffer.Length,
_chunkBytesRemaining
))).ConfigureAwait(false);
192
throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount,
_chunkBytesRemaining
));
195
if (
_chunkBytesRemaining
== 0)
323
Debug.Assert(
_chunkBytesRemaining
== 0, $"Expected {nameof(
_chunkBytesRemaining
)} == 0, got {
_chunkBytesRemaining
}");
359
Debug.Assert(
_chunkBytesRemaining
> 0);
367
int bytesToConsume = Math.Min(maxBytesToRead, (int)Math.Min((ulong)connectionBuffer.Length,
_chunkBytesRemaining
));
372
if (
_chunkBytesRemaining
== 0)
380
Debug.Assert(
_chunkBytesRemaining
== 0, $"Expected {nameof(
_chunkBytesRemaining
)} == 0, got {
_chunkBytesRemaining
}");
396
Debug.Assert(
_chunkBytesRemaining
== 0, $"Expected {nameof(
_chunkBytesRemaining
)} == 0, got {
_chunkBytesRemaining
}");