4 writes to PayloadLength
System.Net.WebSockets (4)
System\Net\WebSockets\ManagedWebSocket.cs (4)
964
header.
PayloadLength
-= totalBytesReceived;
1310
header.
PayloadLength
= receiveBufferSpan[_receiveBufferOffset + 1] & 0x7F;
1318
header.
PayloadLength
= BinaryPrimitives.ReadUInt16BigEndian(receiveBufferSpan.Slice(_receiveBufferOffset));
1324
header.
PayloadLength
= BinaryPrimitives.ReadInt64BigEndian(receiveBufferSpan.Slice(_receiveBufferOffset));
31 references to PayloadLength
System.Net.WebSockets (31)
System\Net\WebSockets\ManagedWebSocket.cs (31)
860
NetEventSource.Trace(this, $"Next frame opcode={header.Opcode}, fin={header.Fin}, compressed={header.Compressed}, payloadLength={header.
PayloadLength
}");
863
if (header.
PayloadLength
== 0 && header.Compressed)
915
if (header.
PayloadLength
> 0)
920
_inflater.Prepare(header.
PayloadLength
, payloadBuffer.Length);
924
int limit = (int)Math.Min(header.Compressed ? _inflater!.Span.Length : payloadBuffer.Length, header.
PayloadLength
);
968
_inflater!.AddBytes(totalBytesReceived, endOfMessage: header.Fin && header.
PayloadLength
== 0);
976
header.Processed = _inflater!.Inflate(payloadBuffer.Span, out totalBytesReceived) && header.
PayloadLength
== 0;
981
header.Processed = header.
PayloadLength
== 0;
1090
if (header.
PayloadLength
== 1)
1095
else if (header.
PayloadLength
>= 2)
1097
if (_receiveBufferCount < header.
PayloadLength
)
1099
await EnsureBufferContainsAsync((int)header.
PayloadLength
, cancellationToken).ConfigureAwait(false);
1104
ApplyMask(_receiveBuffer.Span.Slice(_receiveBufferOffset, (int)header.
PayloadLength
), header.Mask, 0);
1113
if (header.
PayloadLength
> 2)
1117
closeStatusDescription = s_textEncoding.GetString(_receiveBuffer.Span.Slice(_receiveBufferOffset + 2, (int)header.
PayloadLength
- 2));
1124
ConsumeFromBuffer((int)header.
PayloadLength
);
1178
if (header.
PayloadLength
> 0 && _receiveBufferCount < header.
PayloadLength
)
1180
await EnsureBufferContainsAsync((int)header.
PayloadLength
, cancellationToken).ConfigureAwait(false);
1186
&& header.
PayloadLength
== KeepAlivePingState.PingPayloadSize;
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
));
1221
if (header.
PayloadLength
> 0)
1223
ConsumeFromBuffer((int)header.
PayloadLength
);
1315
if (header.
PayloadLength
== 126)
1321
else if (header.
PayloadLength
== 127)
1334
if (header.
PayloadLength
< 0)
1396
if (header.
PayloadLength
> MaxControlPayloadLength || !header.Fin)
1411
header.Processed = header.
PayloadLength
== 0 && !header.Compressed;
1889
internal bool EndOfMessage => Fin && Processed &&
PayloadLength
== 0;