73 references to ActiveLength
System.Net.Http (73)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (8)
105Debug.Assert(byteCount <= ActiveLength, $"Expected {byteCount} <= {ActiveLength}"); 146Buffer.BlockCopy(_bytes, _activeStart, _bytes, 0, ActiveLength); 147_availableStart = ActiveLength; 153int desiredSize = ActiveLength + byteCount; 168if (ActiveLength != 0) 170Buffer.BlockCopy(oldBytes, _activeStart, newBytes, 0, ActiveLength); 173_availableStart = ActiveLength;
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (19)
236Debug.Assert(requiredSpace == _outgoingBuffer.ActiveLength); 398if (NetEventSource.Log.IsEnabled()) Trace($"{nameof(_outgoingBuffer.ActiveLength)}={_outgoingBuffer.ActiveLength}"); 400if (_outgoingBuffer.ActiveLength > 0) 412_outgoingBuffer.Discard(_outgoingBuffer.ActiveLength); 421if (_incomingBuffer.ActiveLength < FrameHeader.Size) 438else if (_incomingBuffer.ActiveLength == 0) 448while (_incomingBuffer.ActiveLength < FrameHeader.Size); 457string response = Encoding.ASCII.GetString(_incomingBuffer.ActiveSpan.Slice(0, Math.Min(20, _incomingBuffer.ActiveLength))); 467if (_incomingBuffer.ActiveLength < frameHeader.PayloadLength) 469_incomingBuffer.EnsureAvailableSpace(frameHeader.PayloadLength - _incomingBuffer.ActiveLength); 479while (_incomingBuffer.ActiveLength < frameHeader.PayloadLength); 486throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, requiredBytes - _incomingBuffer.ActiveLength)); 542if (_incomingBuffer.ActiveLength < FrameHeader.Size) 548if (!zeroByteReadTask.IsCompletedSuccessfully && _incomingBuffer.ActiveLength == 0) 568while (_incomingBuffer.ActiveLength < FrameHeader.Size); 1251int activeBufferLength = _outgoingBuffer.ActiveLength; 1290if (_outgoingBuffer.ActiveLength == 0) 1636headerListSize += headerBuffer.ActiveLength;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (3)
810else if (buffer.ActiveLength == 0) 915if (buffer.ActiveLength == 0) 930long readLength = Math.Min(payloadLength, buffer.ActiveLength);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (16)
502if (_sendBuffer.ActiveLength != 0) 561_sendBuffer.Discard(_sendBuffer.ActiveLength); 580_sendBuffer.Discard(_sendBuffer.ActiveLength); 669Debug.Assert(_sendBuffer.ActiveLength == 0); 746int headersLength = _sendBuffer.ActiveLength - PreHeadersReserveSpace; 914else if (_recvBuffer.ActiveLength == 0) 963if (_recvBuffer.ActiveLength == 0) 979int processLength = (int)Math.Min(headersLength, _recvBuffer.ActiveLength); 1170if (_recvBuffer.ActiveLength == 0) 1186long readLength = Math.Min(payloadLength, _recvBuffer.ActiveLength); 1213if (_recvBuffer.ActiveLength != 0) 1217int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.ActiveLength)); 1228if (_responseDataPayloadRemaining == 0 && _recvBuffer.ActiveLength == 0) 1285if (_recvBuffer.ActiveLength != 0) 1289int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.ActiveLength)); 1300if (_responseDataPayloadRemaining == 0 && _recvBuffer.ActiveLength == 0)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (27)
248Debug.Assert(_readBuffer.ActiveLength == 0); 306Debug.Assert(bytesToConsume <= _readBuffer.ActiveLength); 538Debug.Assert(_readBuffer.ActiveLength == 0, "Unexpected data in read buffer"); 606Debug.Assert(_readBuffer.ActiveLength == 0); 653if (_readBuffer.ActiveLength == 0) 1395if (_writeBuffer.ActiveLength != 0) 1426if (_writeBuffer.ActiveLength != 0) 1472if (_writeBuffer.ActiveLength != 0) 1495if (_writeBuffer.ActiveLength == 0) 1696int searchOffset = _readBuffer.ActiveLength; 1708Debug.Assert(_readBuffer.ActiveLength > searchOffset); 1718int readLength = _readBuffer.ActiveLength; 1786if (_readBuffer.ActiveLength > 0) 1804if (_readBuffer.ActiveLength > 0) 1830if (_readBuffer.ActiveLength == 0) 1869if (_readBuffer.ActiveLength == 0) 1887Debug.Assert(count <= _readBuffer.ActiveLength); 1909if (_readBuffer.ActiveLength > 0) 1925int remaining = _readBuffer.ActiveLength; 1947int remaining = _readBuffer.ActiveLength; 1962Debug.Assert(_readBuffer.ActiveLength == 0, "HttpConnection's buffer should have been empty."); 1979remaining = (int)Math.Min((ulong)_readBuffer.ActiveLength, length); 2017bool anyDataAvailable = _readBuffer.ActiveLength > 0; 2067Debug.Assert(_writeBuffer.ActiveLength == 0, "Everything in write buffer should have been flushed."); 2076if (_readBuffer.ActiveLength > 0) 2083_readBuffer.Discard(_readBuffer.ActiveLength); 2137Debug.Assert(_readBuffer.ActiveLength == 0, "Unexpected data in connection read buffer.");