1 write to _internalBuffer
Microsoft.AspNetCore.Http.Connections.Tests (1)
TestWebSocketConnectionFeature.cs (1)
148
_internalBuffer
= message;
12 references to _internalBuffer
Microsoft.AspNetCore.Http.Connections.Tests (12)
TestWebSocketConnectionFeature.cs (12)
134
if (
_internalBuffer
.Buffer == null ||
_internalBuffer
.Buffer.Length == 0)
152
var length =
_internalBuffer
.Buffer.Length;
153
if (buffer.Count - buffer.Offset <
_internalBuffer
.Buffer.Length)
155
length = Math.Min(buffer.Count - buffer.Offset,
_internalBuffer
.Buffer.Length);
156
Buffer.BlockCopy(
_internalBuffer
.Buffer, 0, buffer.Array, buffer.Offset, length);
160
Buffer.BlockCopy(
_internalBuffer
.Buffer, 0, buffer.Array, buffer.Offset, length);
163
var endOfMessage =
_internalBuffer
.EndOfMessage;
167
_internalBuffer
.Buffer =
_internalBuffer
.Buffer.AsMemory().Slice(length).ToArray();
168
endOfMessage =
_internalBuffer
.Buffer.Length == 0 && endOfMessage;
171
return new WebSocketReceiveResult(length,
_internalBuffer
.MessageType, endOfMessage);