73 references to ActiveLength
System.Net.Http (73)
src\runtime\src\libraries\Common\src\System\Net\ArrayBuffer.cs (8)
105
Debug.Assert(byteCount <=
ActiveLength
, $"Expected {byteCount} <= {
ActiveLength
}");
146
Buffer.BlockCopy(_bytes, _activeStart, _bytes, 0,
ActiveLength
);
147
_availableStart =
ActiveLength
;
153
int desiredSize =
ActiveLength
+ byteCount;
168
if (
ActiveLength
!= 0)
170
Buffer.BlockCopy(oldBytes, _activeStart, newBytes, 0,
ActiveLength
);
173
_availableStart =
ActiveLength
;
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (19)
229
Debug.Assert(requiredSpace == _outgoingBuffer.
ActiveLength
);
388
if (NetEventSource.Log.IsEnabled()) Trace($"{nameof(_outgoingBuffer.
ActiveLength
)}={_outgoingBuffer.
ActiveLength
}");
390
if (_outgoingBuffer.
ActiveLength
> 0)
402
_outgoingBuffer.Discard(_outgoingBuffer.
ActiveLength
);
411
if (_incomingBuffer.
ActiveLength
< FrameHeader.Size)
428
else if (_incomingBuffer.
ActiveLength
== 0)
438
while (_incomingBuffer.
ActiveLength
< FrameHeader.Size);
447
string response = Encoding.ASCII.GetString(_incomingBuffer.ActiveSpan.Slice(0, Math.Min(20, _incomingBuffer.
ActiveLength
)));
457
if (_incomingBuffer.
ActiveLength
< frameHeader.PayloadLength)
459
_incomingBuffer.EnsureAvailableSpace(frameHeader.PayloadLength - _incomingBuffer.
ActiveLength
);
469
while (_incomingBuffer.
ActiveLength
< frameHeader.PayloadLength);
476
throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, requiredBytes - _incomingBuffer.
ActiveLength
));
532
if (_incomingBuffer.
ActiveLength
< FrameHeader.Size)
538
if (!zeroByteReadTask.IsCompletedSuccessfully && _incomingBuffer.
ActiveLength
== 0)
558
while (_incomingBuffer.
ActiveLength
< FrameHeader.Size);
1233
int activeBufferLength = _outgoingBuffer.
ActiveLength
;
1272
if (_outgoingBuffer.
ActiveLength
== 0)
1581
headerListSize += headerBuffer.
ActiveLength
;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (3)
806
else if (buffer.
ActiveLength
== 0)
911
if (buffer.
ActiveLength
== 0)
926
long readLength = Math.Min(payloadLength, buffer.
ActiveLength
);
System\Net\Http\SocketsHttpHandler\Http3RequestStream.cs (16)
502
if (_sendBuffer.
ActiveLength
!= 0)
561
_sendBuffer.Discard(_sendBuffer.
ActiveLength
);
580
_sendBuffer.Discard(_sendBuffer.
ActiveLength
);
669
Debug.Assert(_sendBuffer.
ActiveLength
== 0);
746
int headersLength = _sendBuffer.
ActiveLength
- PreHeadersReserveSpace;
914
else if (_recvBuffer.
ActiveLength
== 0)
973
if (_recvBuffer.
ActiveLength
== 0)
989
int processLength = (int)Math.Min(headersLength, _recvBuffer.
ActiveLength
);
1173
if (_recvBuffer.
ActiveLength
== 0)
1189
long readLength = Math.Min(payloadLength, _recvBuffer.
ActiveLength
);
1216
if (_recvBuffer.
ActiveLength
!= 0)
1220
int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.
ActiveLength
));
1231
if (_responseDataPayloadRemaining == 0 && _recvBuffer.
ActiveLength
== 0)
1288
if (_recvBuffer.
ActiveLength
!= 0)
1292
int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.
ActiveLength
));
1303
if (_responseDataPayloadRemaining == 0 && _recvBuffer.
ActiveLength
== 0)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (27)
247
Debug.Assert(_readBuffer.
ActiveLength
== 0);
305
Debug.Assert(bytesToConsume <= _readBuffer.
ActiveLength
);
535
Debug.Assert(_readBuffer.
ActiveLength
== 0, "Unexpected data in read buffer");
603
Debug.Assert(_readBuffer.
ActiveLength
== 0);
650
if (_readBuffer.
ActiveLength
== 0)
1392
if (_writeBuffer.
ActiveLength
!= 0)
1423
if (_writeBuffer.
ActiveLength
!= 0)
1469
if (_writeBuffer.
ActiveLength
!= 0)
1492
if (_writeBuffer.
ActiveLength
== 0)
1671
int searchOffset = _readBuffer.
ActiveLength
;
1683
Debug.Assert(_readBuffer.
ActiveLength
> searchOffset);
1693
int readLength = _readBuffer.
ActiveLength
;
1761
if (_readBuffer.
ActiveLength
> 0)
1779
if (_readBuffer.
ActiveLength
> 0)
1805
if (_readBuffer.
ActiveLength
== 0)
1843
if (_readBuffer.
ActiveLength
== 0)
1861
Debug.Assert(count <= _readBuffer.
ActiveLength
);
1883
if (_readBuffer.
ActiveLength
> 0)
1899
int remaining = _readBuffer.
ActiveLength
;
1921
int remaining = _readBuffer.
ActiveLength
;
1936
Debug.Assert(_readBuffer.
ActiveLength
== 0, "HttpConnection's buffer should have been empty.");
1953
remaining = (int)Math.Min((ulong)_readBuffer.
ActiveLength
, length);
1991
bool anyDataAvailable = _readBuffer.
ActiveLength
> 0;
2041
Debug.Assert(_writeBuffer.
ActiveLength
== 0, "Everything in write buffer should have been flushed.");
2050
if (_readBuffer.
ActiveLength
> 0)
2057
_readBuffer.Discard(_readBuffer.
ActiveLength
);
2111
Debug.Assert(_readBuffer.
ActiveLength
== 0, "Unexpected data in connection read buffer.");