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