73 references to ActiveLength
System.Net.Http (73)
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)
228Debug.Assert(requiredSpace == _outgoingBuffer.ActiveLength); 385if (NetEventSource.Log.IsEnabled()) Trace($"{nameof(_outgoingBuffer.ActiveLength)}={_outgoingBuffer.ActiveLength}"); 387if (_outgoingBuffer.ActiveLength > 0) 399_outgoingBuffer.Discard(_outgoingBuffer.ActiveLength); 408if (_incomingBuffer.ActiveLength < FrameHeader.Size) 425else if (_incomingBuffer.ActiveLength == 0) 435while (_incomingBuffer.ActiveLength < FrameHeader.Size); 444string response = Encoding.ASCII.GetString(_incomingBuffer.ActiveSpan.Slice(0, Math.Min(20, _incomingBuffer.ActiveLength))); 454if (_incomingBuffer.ActiveLength < frameHeader.PayloadLength) 456_incomingBuffer.EnsureAvailableSpace(frameHeader.PayloadLength - _incomingBuffer.ActiveLength); 466while (_incomingBuffer.ActiveLength < frameHeader.PayloadLength); 473throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, requiredBytes - _incomingBuffer.ActiveLength)); 529if (_incomingBuffer.ActiveLength < FrameHeader.Size) 535if (!zeroByteReadTask.IsCompletedSuccessfully && _incomingBuffer.ActiveLength == 0) 555while (_incomingBuffer.ActiveLength < FrameHeader.Size); 1230int activeBufferLength = _outgoingBuffer.ActiveLength; 1269if (_outgoingBuffer.ActiveLength == 0) 1578headerListSize += headerBuffer.ActiveLength;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (3)
814else if (buffer.ActiveLength == 0) 919if (buffer.ActiveLength == 0) 934long readLength = Math.Min(payloadLength, buffer.ActiveLength);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (16)
474if (_sendBuffer.ActiveLength != 0) 527_sendBuffer.Discard(_sendBuffer.ActiveLength); 546_sendBuffer.Discard(_sendBuffer.ActiveLength); 625Debug.Assert(_sendBuffer.ActiveLength == 0); 702int headersLength = _sendBuffer.ActiveLength - PreHeadersReserveSpace; 870else if (_recvBuffer.ActiveLength == 0) 929if (_recvBuffer.ActiveLength == 0) 945int processLength = (int)Math.Min(headersLength, _recvBuffer.ActiveLength); 1129if (_recvBuffer.ActiveLength == 0) 1145long readLength = Math.Min(payloadLength, _recvBuffer.ActiveLength); 1172if (_recvBuffer.ActiveLength != 0) 1176int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.ActiveLength)); 1187if (_responseDataPayloadRemaining == 0 && _recvBuffer.ActiveLength == 0) 1244if (_recvBuffer.ActiveLength != 0) 1248int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.ActiveLength)); 1259if (_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.");