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)
404
if (
_incomingBuffer
.ActiveLength < FrameHeader.Size)
411
_incomingBuffer
.EnsureAvailableSpace(FrameHeader.Size);
413
int bytesRead = await _stream.ReadAsync(
_incomingBuffer
.AvailableMemory).ConfigureAwait(false);
414
_incomingBuffer
.Commit(bytesRead);
421
else if (
_incomingBuffer
.ActiveLength == 0)
431
while (
_incomingBuffer
.ActiveLength < FrameHeader.Size);
435
FrameHeader frameHeader = FrameHeader.ReadFrom(
_incomingBuffer
.ActiveSpan);
440
string response = Encoding.ASCII.GetString(
_incomingBuffer
.ActiveSpan.Slice(0, Math.Min(20,
_incomingBuffer
.ActiveLength)));
444
_incomingBuffer
.Discard(FrameHeader.Size);
447
_incomingBuffer
.Discard(FrameHeader.Size);
450
if (
_incomingBuffer
.ActiveLength < frameHeader.PayloadLength)
452
_incomingBuffer
.EnsureAvailableSpace(frameHeader.PayloadLength -
_incomingBuffer
.ActiveLength);
458
int bytesRead = await _stream.ReadAsync(
_incomingBuffer
.AvailableMemory).ConfigureAwait(false);
459
_incomingBuffer
.Commit(bytesRead);
462
while (
_incomingBuffer
.ActiveLength < frameHeader.PayloadLength);
469
throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, requiredBytes -
_incomingBuffer
.ActiveLength));
525
if (
_incomingBuffer
.ActiveLength < FrameHeader.Size)
531
if (!zeroByteReadTask.IsCompletedSuccessfully &&
_incomingBuffer
.ActiveLength == 0)
534
_incomingBuffer
.ClearAndReturnBuffer();
540
_incomingBuffer
.EnsureAvailableSpace(InitialConnectionBufferSize);
542
int bytesRead = await _stream.ReadAsync(
_incomingBuffer
.AvailableMemory).ConfigureAwait(false);
544
_incomingBuffer
.Commit(bytesRead);
551
while (
_incomingBuffer
.ActiveLength < FrameHeader.Size);
615
_incomingBuffer
.Dispose();
666
GetFrameData(
_incomingBuffer
.ActiveSpan.Slice(0, frameHeader.PayloadLength), frameHeader.PaddedFlag, frameHeader.PriorityFlag),
669
_incomingBuffer
.Discard(frameHeader.PayloadLength);
682
_incomingBuffer
.ActiveSpan.Slice(0, frameHeader.PayloadLength),
685
_incomingBuffer
.Discard(frameHeader.PayloadLength);
750
ReadOnlySpan<byte> span =
_incomingBuffer
.ActiveSpan.Slice(0, frameHeader.PayloadLength);
771
_incomingBuffer
.Discard(frameHeader.PayloadLength);
783
ReadOnlySpan<byte> frameData = GetFrameData(
_incomingBuffer
.ActiveSpan.Slice(0, frameHeader.PayloadLength), hasPad: frameHeader.PaddedFlag, hasPriority: false);
800
_incomingBuffer
.Discard(frameHeader.PayloadLength);
837
ReadOnlySpan<byte> settings =
_incomingBuffer
.ActiveSpan.Slice(0, frameHeader.PayloadLength);
917
_incomingBuffer
.Discard(frameHeader.PayloadLength);
970
_incomingBuffer
.Discard(frameHeader.PayloadLength);
991
ReadOnlySpan<byte> pingContent =
_incomingBuffer
.ActiveSpan.Slice(0, FrameHeader.PingLength);
1004
_incomingBuffer
.Discard(frameHeader.PayloadLength);
1016
int amount = BinaryPrimitives.ReadInt32BigEndian(
_incomingBuffer
.ActiveSpan) & 0x7FFFFFFF;
1025
_incomingBuffer
.Discard(frameHeader.PayloadLength);
1062
_incomingBuffer
.Discard(frameHeader.PayloadLength);
1066
var protocolError = (Http2ProtocolErrorCode)BinaryPrimitives.ReadInt32BigEndian(
_incomingBuffer
.ActiveSpan);
1069
_incomingBuffer
.Discard(frameHeader.PayloadLength);
1124
int lastStreamId = (int)(BinaryPrimitives.ReadUInt32BigEndian(
_incomingBuffer
.ActiveSpan) & 0x7FFFFFFF);
1125
Http2ProtocolErrorCode errorCode = (Http2ProtocolErrorCode)BinaryPrimitives.ReadInt32BigEndian(
_incomingBuffer
.ActiveSpan.Slice(sizeof(int)));
1128
_incomingBuffer
.Discard(frameHeader.PayloadLength);