1 write to _incomingBuffer
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
138
_incomingBuffer
= new ArrayBuffer(initialSize: 0, usePool: true);
47 references to _incomingBuffer
System.Net.Http (47)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (47)
395
if (
_incomingBuffer
.ActiveLength < FrameHeader.Size)
402
_incomingBuffer
.EnsureAvailableSpace(FrameHeader.Size);
404
int bytesRead = await _stream.ReadAsync(
_incomingBuffer
.AvailableMemory).ConfigureAwait(false);
405
_incomingBuffer
.Commit(bytesRead);
412
else if (
_incomingBuffer
.ActiveLength == 0)
422
while (
_incomingBuffer
.ActiveLength < FrameHeader.Size);
426
FrameHeader frameHeader = FrameHeader.ReadFrom(
_incomingBuffer
.ActiveSpan);
431
string response = Encoding.ASCII.GetString(
_incomingBuffer
.ActiveSpan.Slice(0, Math.Min(20,
_incomingBuffer
.ActiveLength)));
435
_incomingBuffer
.Discard(FrameHeader.Size);
438
_incomingBuffer
.Discard(FrameHeader.Size);
441
if (
_incomingBuffer
.ActiveLength < frameHeader.PayloadLength)
443
_incomingBuffer
.EnsureAvailableSpace(frameHeader.PayloadLength -
_incomingBuffer
.ActiveLength);
449
int bytesRead = await _stream.ReadAsync(
_incomingBuffer
.AvailableMemory).ConfigureAwait(false);
450
_incomingBuffer
.Commit(bytesRead);
453
while (
_incomingBuffer
.ActiveLength < frameHeader.PayloadLength);
460
throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, requiredBytes -
_incomingBuffer
.ActiveLength));
516
if (
_incomingBuffer
.ActiveLength < FrameHeader.Size)
522
if (!zeroByteReadTask.IsCompletedSuccessfully &&
_incomingBuffer
.ActiveLength == 0)
525
_incomingBuffer
.ClearAndReturnBuffer();
531
_incomingBuffer
.EnsureAvailableSpace(InitialConnectionBufferSize);
533
int bytesRead = await _stream.ReadAsync(
_incomingBuffer
.AvailableMemory).ConfigureAwait(false);
535
_incomingBuffer
.Commit(bytesRead);
542
while (
_incomingBuffer
.ActiveLength < FrameHeader.Size);
606
_incomingBuffer
.Dispose();
657
GetFrameData(
_incomingBuffer
.ActiveSpan.Slice(0, frameHeader.PayloadLength), frameHeader.PaddedFlag, frameHeader.PriorityFlag),
660
_incomingBuffer
.Discard(frameHeader.PayloadLength);
673
_incomingBuffer
.ActiveSpan.Slice(0, frameHeader.PayloadLength),
676
_incomingBuffer
.Discard(frameHeader.PayloadLength);
741
ReadOnlySpan<byte> span =
_incomingBuffer
.ActiveSpan.Slice(0, frameHeader.PayloadLength);
762
_incomingBuffer
.Discard(frameHeader.PayloadLength);
774
ReadOnlySpan<byte> frameData = GetFrameData(
_incomingBuffer
.ActiveSpan.Slice(0, frameHeader.PayloadLength), hasPad: frameHeader.PaddedFlag, hasPriority: false);
791
_incomingBuffer
.Discard(frameHeader.PayloadLength);
828
ReadOnlySpan<byte> settings =
_incomingBuffer
.ActiveSpan.Slice(0, frameHeader.PayloadLength);
908
_incomingBuffer
.Discard(frameHeader.PayloadLength);
961
_incomingBuffer
.Discard(frameHeader.PayloadLength);
982
ReadOnlySpan<byte> pingContent =
_incomingBuffer
.ActiveSpan.Slice(0, FrameHeader.PingLength);
995
_incomingBuffer
.Discard(frameHeader.PayloadLength);
1007
int amount = BinaryPrimitives.ReadInt32BigEndian(
_incomingBuffer
.ActiveSpan) & 0x7FFFFFFF;
1016
_incomingBuffer
.Discard(frameHeader.PayloadLength);
1053
_incomingBuffer
.Discard(frameHeader.PayloadLength);
1057
var protocolError = (Http2ProtocolErrorCode)BinaryPrimitives.ReadInt32BigEndian(
_incomingBuffer
.ActiveSpan);
1060
_incomingBuffer
.Discard(frameHeader.PayloadLength);
1115
int lastStreamId = (int)(BinaryPrimitives.ReadUInt32BigEndian(
_incomingBuffer
.ActiveSpan) & 0x7FFFFFFF);
1116
Http2ProtocolErrorCode errorCode = (Http2ProtocolErrorCode)BinaryPrimitives.ReadInt32BigEndian(
_incomingBuffer
.ActiveSpan.Slice(sizeof(int)));
1119
_incomingBuffer
.Discard(frameHeader.PayloadLength);