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