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)
229Debug.Assert(requiredSpace == _outgoingBuffer.ActiveLength); 388if (NetEventSource.Log.IsEnabled()) Trace($"{nameof(_outgoingBuffer.ActiveLength)}={_outgoingBuffer.ActiveLength}"); 390if (_outgoingBuffer.ActiveLength > 0) 402_outgoingBuffer.Discard(_outgoingBuffer.ActiveLength); 411if (_incomingBuffer.ActiveLength < FrameHeader.Size) 428else if (_incomingBuffer.ActiveLength == 0) 438while (_incomingBuffer.ActiveLength < FrameHeader.Size); 447string response = Encoding.ASCII.GetString(_incomingBuffer.ActiveSpan.Slice(0, Math.Min(20, _incomingBuffer.ActiveLength))); 457if (_incomingBuffer.ActiveLength < frameHeader.PayloadLength) 459_incomingBuffer.EnsureAvailableSpace(frameHeader.PayloadLength - _incomingBuffer.ActiveLength); 469while (_incomingBuffer.ActiveLength < frameHeader.PayloadLength); 476throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, requiredBytes - _incomingBuffer.ActiveLength)); 532if (_incomingBuffer.ActiveLength < FrameHeader.Size) 538if (!zeroByteReadTask.IsCompletedSuccessfully && _incomingBuffer.ActiveLength == 0) 558while (_incomingBuffer.ActiveLength < FrameHeader.Size); 1233int activeBufferLength = _outgoingBuffer.ActiveLength; 1272if (_outgoingBuffer.ActiveLength == 0) 1581headerListSize += headerBuffer.ActiveLength;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (3)
806else if (buffer.ActiveLength == 0) 911if (buffer.ActiveLength == 0) 926long 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) 973if (_recvBuffer.ActiveLength == 0) 989int processLength = (int)Math.Min(headersLength, _recvBuffer.ActiveLength); 1173if (_recvBuffer.ActiveLength == 0) 1189long readLength = Math.Min(payloadLength, _recvBuffer.ActiveLength); 1216if (_recvBuffer.ActiveLength != 0) 1220int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.ActiveLength)); 1231if (_responseDataPayloadRemaining == 0 && _recvBuffer.ActiveLength == 0) 1288if (_recvBuffer.ActiveLength != 0) 1292int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.ActiveLength)); 1303if (_responseDataPayloadRemaining == 0 && _recvBuffer.ActiveLength == 0)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (27)
247Debug.Assert(_readBuffer.ActiveLength == 0); 305Debug.Assert(bytesToConsume <= _readBuffer.ActiveLength); 535Debug.Assert(_readBuffer.ActiveLength == 0, "Unexpected data in read buffer"); 603Debug.Assert(_readBuffer.ActiveLength == 0); 650if (_readBuffer.ActiveLength == 0) 1392if (_writeBuffer.ActiveLength != 0) 1423if (_writeBuffer.ActiveLength != 0) 1469if (_writeBuffer.ActiveLength != 0) 1492if (_writeBuffer.ActiveLength == 0) 1671int searchOffset = _readBuffer.ActiveLength; 1683Debug.Assert(_readBuffer.ActiveLength > searchOffset); 1693int readLength = _readBuffer.ActiveLength; 1761if (_readBuffer.ActiveLength > 0) 1779if (_readBuffer.ActiveLength > 0) 1805if (_readBuffer.ActiveLength == 0) 1843if (_readBuffer.ActiveLength == 0) 1861Debug.Assert(count <= _readBuffer.ActiveLength); 1883if (_readBuffer.ActiveLength > 0) 1899int remaining = _readBuffer.ActiveLength; 1921int remaining = _readBuffer.ActiveLength; 1936Debug.Assert(_readBuffer.ActiveLength == 0, "HttpConnection's buffer should have been empty."); 1953remaining = (int)Math.Min((ulong)_readBuffer.ActiveLength, length); 1991bool anyDataAvailable = _readBuffer.ActiveLength > 0; 2041Debug.Assert(_writeBuffer.ActiveLength == 0, "Everything in write buffer should have been flushed."); 2050if (_readBuffer.ActiveLength > 0) 2057_readBuffer.Discard(_readBuffer.ActiveLength); 2111Debug.Assert(_readBuffer.ActiveLength == 0, "Unexpected data in connection read buffer.");