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)
236
Debug.Assert(requiredSpace == _outgoingBuffer.
ActiveLength
);
398
if (NetEventSource.Log.IsEnabled()) Trace($"{nameof(_outgoingBuffer.
ActiveLength
)}={_outgoingBuffer.
ActiveLength
}");
400
if (_outgoingBuffer.
ActiveLength
> 0)
412
_outgoingBuffer.Discard(_outgoingBuffer.
ActiveLength
);
421
if (_incomingBuffer.
ActiveLength
< FrameHeader.Size)
438
else if (_incomingBuffer.
ActiveLength
== 0)
448
while (_incomingBuffer.
ActiveLength
< FrameHeader.Size);
457
string response = Encoding.ASCII.GetString(_incomingBuffer.ActiveSpan.Slice(0, Math.Min(20, _incomingBuffer.
ActiveLength
)));
467
if (_incomingBuffer.
ActiveLength
< frameHeader.PayloadLength)
469
_incomingBuffer.EnsureAvailableSpace(frameHeader.PayloadLength - _incomingBuffer.
ActiveLength
);
479
while (_incomingBuffer.
ActiveLength
< frameHeader.PayloadLength);
486
throw new HttpIOException(HttpRequestError.ResponseEnded, SR.Format(SR.net_http_invalid_response_premature_eof_bytecount, requiredBytes - _incomingBuffer.
ActiveLength
));
542
if (_incomingBuffer.
ActiveLength
< FrameHeader.Size)
548
if (!zeroByteReadTask.IsCompletedSuccessfully && _incomingBuffer.
ActiveLength
== 0)
568
while (_incomingBuffer.
ActiveLength
< FrameHeader.Size);
1251
int activeBufferLength = _outgoingBuffer.
ActiveLength
;
1290
if (_outgoingBuffer.
ActiveLength
== 0)
1636
headerListSize += headerBuffer.
ActiveLength
;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (3)
810
else if (buffer.
ActiveLength
== 0)
915
if (buffer.
ActiveLength
== 0)
930
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)
963
if (_recvBuffer.
ActiveLength
== 0)
979
int processLength = (int)Math.Min(headersLength, _recvBuffer.
ActiveLength
);
1170
if (_recvBuffer.
ActiveLength
== 0)
1186
long readLength = Math.Min(payloadLength, _recvBuffer.
ActiveLength
);
1213
if (_recvBuffer.
ActiveLength
!= 0)
1217
int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.
ActiveLength
));
1228
if (_responseDataPayloadRemaining == 0 && _recvBuffer.
ActiveLength
== 0)
1285
if (_recvBuffer.
ActiveLength
!= 0)
1289
int copyLen = (int)Math.Min(buffer.Length, Math.Min(_responseDataPayloadRemaining, _recvBuffer.
ActiveLength
));
1300
if (_responseDataPayloadRemaining == 0 && _recvBuffer.
ActiveLength
== 0)
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (27)
248
Debug.Assert(_readBuffer.
ActiveLength
== 0);
306
Debug.Assert(bytesToConsume <= _readBuffer.
ActiveLength
);
538
Debug.Assert(_readBuffer.
ActiveLength
== 0, "Unexpected data in read buffer");
606
Debug.Assert(_readBuffer.
ActiveLength
== 0);
653
if (_readBuffer.
ActiveLength
== 0)
1395
if (_writeBuffer.
ActiveLength
!= 0)
1426
if (_writeBuffer.
ActiveLength
!= 0)
1472
if (_writeBuffer.
ActiveLength
!= 0)
1495
if (_writeBuffer.
ActiveLength
== 0)
1696
int searchOffset = _readBuffer.
ActiveLength
;
1708
Debug.Assert(_readBuffer.
ActiveLength
> searchOffset);
1718
int readLength = _readBuffer.
ActiveLength
;
1786
if (_readBuffer.
ActiveLength
> 0)
1804
if (_readBuffer.
ActiveLength
> 0)
1830
if (_readBuffer.
ActiveLength
== 0)
1869
if (_readBuffer.
ActiveLength
== 0)
1887
Debug.Assert(count <= _readBuffer.
ActiveLength
);
1909
if (_readBuffer.
ActiveLength
> 0)
1925
int remaining = _readBuffer.
ActiveLength
;
1947
int remaining = _readBuffer.
ActiveLength
;
1962
Debug.Assert(_readBuffer.
ActiveLength
== 0, "HttpConnection's buffer should have been empty.");
1979
remaining = (int)Math.Min((ulong)_readBuffer.
ActiveLength
, length);
2017
bool anyDataAvailable = _readBuffer.
ActiveLength
> 0;
2067
Debug.Assert(_writeBuffer.
ActiveLength
== 0, "Everything in write buffer should have been flushed.");
2076
if (_readBuffer.
ActiveLength
> 0)
2083
_readBuffer.Discard(_readBuffer.
ActiveLength
);
2137
Debug.Assert(_readBuffer.
ActiveLength
== 0, "Unexpected data in connection read buffer.");