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)
517
writeTask = _stream.WriteAsync(new ReadOnlyMemory<byte>(
_sendBuffer
, 0, sendBytes));
615
await _stream.WriteAsync(new ReadOnlyMemory<byte>(
_sendBuffer
, 0, sendBytes), cancellationToken).ConfigureAwait(false);
658
Debug.Assert(
_sendBuffer
!= null);
667
headerLength = WriteHeader(opcode,
_sendBuffer
, payloadBuffer, endOfMessage, useMask: false, compressed: _deflater is not null && !disableCompression);
673
maskOffset = WriteHeader(opcode,
_sendBuffer
, payloadBuffer, endOfMessage, useMask: true, compressed: _deflater is not null && !disableCompression);
680
payloadBuffer.CopyTo(new Span<byte>(
_sendBuffer
, headerLength, payloadLength));
689
ApplyMask(new Span<byte>(
_sendBuffer
, headerLength, payloadLength),
_sendBuffer
, maskOffset.Value, 0);
1626
Debug.Assert(
_sendBuffer
== null); // would only fail if had some catastrophic error previously that prevented cleaning up
1635
if (
_sendBuffer
is byte[] toReturn)