3 writes to _receiveBufferCount
System.Net.WebSockets (3)
System\Net\WebSockets\ManagedWebSocket.cs (3)
1286
_receiveBufferCount
= 0;
1576
_receiveBufferCount
-= count;
1601
_receiveBufferCount
+= numRead;
17 references to _receiveBufferCount
System.Net.WebSockets (17)
System\Net\WebSockets\ManagedWebSocket.cs (17)
815
if (
_receiveBufferCount
< (_isServer ? MaxMessageHeaderLength : (MaxMessageHeaderLength - MaskLength)))
818
if (
_receiveBufferCount
< 2)
926
if (
_receiveBufferCount
> 0)
928
int receiveBufferBytesToCopy = Math.Min(limit,
_receiveBufferCount
);
1097
if (
_receiveBufferCount
< header.PayloadLength)
1178
if (header.PayloadLength > 0 &&
_receiveBufferCount
< header.PayloadLength)
1299
Debug.Assert(
_receiveBufferCount
>= 2, "Expected to at least have the first two bytes of the header.");
1317
Debug.Assert(
_receiveBufferCount
>= 2, "Expected to have two bytes for the payload length.");
1323
Debug.Assert(
_receiveBufferCount
>= 8, "Expected to have eight bytes for the payload length.");
1575
Debug.Assert(count <=
_receiveBufferCount
, $"Trying to consume {count}, which is more than exists {
_receiveBufferCount
}");
1586
if (
_receiveBufferCount
< minimumRequiredBytes)
1589
if (
_receiveBufferCount
> 0)
1591
_receiveBuffer.Span.Slice(_receiveBufferOffset,
_receiveBufferCount
).CopyTo(_receiveBuffer.Span);
1596
if (
_receiveBufferCount
< minimumRequiredBytes)
1598
int bytesToRead = minimumRequiredBytes -
_receiveBufferCount
;
1600
_receiveBuffer.Slice(
_receiveBufferCount
), bytesToRead, throwOnEndOfStream: false, cancellationToken).ConfigureAwait(false);