2 writes to _sendBuffer
System.Net.WebSockets (2)
System\Net\WebSockets\ManagedWebSocket.cs (2)
1627_sendBuffer = ArrayPool<byte>.Shared.Rent(minLength); 1637_sendBuffer = null;
10 references to _sendBuffer
System.Net.WebSockets (10)
System\Net\WebSockets\ManagedWebSocket.cs (10)
517writeTask = _stream.WriteAsync(new ReadOnlyMemory<byte>(_sendBuffer, 0, sendBytes)); 615await _stream.WriteAsync(new ReadOnlyMemory<byte>(_sendBuffer, 0, sendBytes), cancellationToken).ConfigureAwait(false); 658Debug.Assert(_sendBuffer != null); 667headerLength = WriteHeader(opcode, _sendBuffer, payloadBuffer, endOfMessage, useMask: false, compressed: _deflater is not null && !disableCompression); 673maskOffset = WriteHeader(opcode, _sendBuffer, payloadBuffer, endOfMessage, useMask: true, compressed: _deflater is not null && !disableCompression); 680payloadBuffer.CopyTo(new Span<byte>(_sendBuffer, headerLength, payloadLength)); 689ApplyMask(new Span<byte>(_sendBuffer, headerLength, payloadLength), _sendBuffer, maskOffset.Value, 0); 1626Debug.Assert(_sendBuffer == null); // would only fail if had some catastrophic error previously that prevented cleaning up 1635if (_sendBuffer is byte[] toReturn)