1 write to _receiveBuffer
System.Net.WebSockets (1)
System\Net\WebSockets\ManagedWebSocket.cs (1)
164
_receiveBuffer
= new byte[ReceiveBufferMinLength];
15 references to _receiveBuffer
System.Net.WebSockets (15)
System\Net\WebSockets\ManagedWebSocket.cs (15)
840
long payloadLength =
_receiveBuffer
.Span[_receiveBufferOffset + 1] & 0x7F;
931
_receiveBuffer
.Span.Slice(_receiveBufferOffset, receiveBufferBytesToCopy).CopyTo(
1104
ApplyMask(
_receiveBuffer
.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength), header.Mask, 0);
1107
closeStatus = (WebSocketCloseStatus)BinaryPrimitives.ReadUInt16BigEndian(
_receiveBuffer
.Span.Slice(_receiveBufferOffset));
1117
closeStatusDescription = s_textEncoding.GetString(
_receiveBuffer
.Span.Slice(_receiveBufferOffset + 2, (int)header.PayloadLength - 2));
1146
ValueTask<int> finalReadTask = _stream.ReadAsync(
_receiveBuffer
, cancellationToken);
1190
ApplyMask(
_receiveBuffer
.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength), header.Mask, 0);
1202
_receiveBuffer
.Slice(_receiveBufferOffset, (int)header.PayloadLength),
1209
long pongPayload = BinaryPrimitives.ReadInt64BigEndian(
_receiveBuffer
.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength));
1302
Span<byte> receiveBufferSpan =
_receiveBuffer
.Span;
1583
Debug.Assert(minimumRequiredBytes <=
_receiveBuffer
.Length, $"Requested number of bytes {minimumRequiredBytes} must not exceed {
_receiveBuffer
.Length}");
1591
_receiveBuffer
.Span.Slice(_receiveBufferOffset, _receiveBufferCount).CopyTo(
_receiveBuffer
.Span);
1600
_receiveBuffer
.Slice(_receiveBufferCount), bytesToRead, throwOnEndOfStream: false, cancellationToken).ConfigureAwait(false);