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