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)
840long payloadLength = _receiveBuffer.Span[_receiveBufferOffset + 1] & 0x7F; 931_receiveBuffer.Span.Slice(_receiveBufferOffset, receiveBufferBytesToCopy).CopyTo( 1104ApplyMask(_receiveBuffer.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength), header.Mask, 0); 1107closeStatus = (WebSocketCloseStatus)BinaryPrimitives.ReadUInt16BigEndian(_receiveBuffer.Span.Slice(_receiveBufferOffset)); 1117closeStatusDescription = s_textEncoding.GetString(_receiveBuffer.Span.Slice(_receiveBufferOffset + 2, (int)header.PayloadLength - 2)); 1146ValueTask<int> finalReadTask = _stream.ReadAsync(_receiveBuffer, cancellationToken); 1190ApplyMask(_receiveBuffer.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength), header.Mask, 0); 1202_receiveBuffer.Slice(_receiveBufferOffset, (int)header.PayloadLength), 1209long pongPayload = BinaryPrimitives.ReadInt64BigEndian(_receiveBuffer.Span.Slice(_receiveBufferOffset, (int)header.PayloadLength)); 1302Span<byte> receiveBufferSpan = _receiveBuffer.Span; 1583Debug.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);