1 instantiation of FrameHeader
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
1925
return new
FrameHeader
(payloadLength, type, flags, streamId);
76 references to FrameHeader
System.Net.Http (76)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (76)
86
private const int InitialConnectionBufferSize =
FrameHeader
.Size;
197
FrameHeader
.Size +
FrameHeader
.SettingLength +
198
FrameHeader
.Size +
FrameHeader
.WindowUpdateLength);
205
FrameHeader
.WriteTo(_outgoingBuffer.AvailableSpan, 2 *
FrameHeader
.SettingLength, FrameType.Settings, FrameFlags.None, streamId: 0);
206
_outgoingBuffer.Commit(
FrameHeader
.Size);
221
FrameHeader
.WriteTo(_outgoingBuffer.AvailableSpan,
FrameHeader
.WindowUpdateLength, FrameType.WindowUpdate, FrameFlags.None, streamId: 0);
222
_outgoingBuffer.Commit(
FrameHeader
.Size);
390
private async ValueTask<
FrameHeader
> ReadFrameAsync(bool initialFrame = false)
395
if (_incomingBuffer.ActiveLength <
FrameHeader
.Size)
402
_incomingBuffer.EnsureAvailableSpace(
FrameHeader
.Size);
418
ThrowPrematureEOF(
FrameHeader
.Size);
422
while (_incomingBuffer.ActiveLength <
FrameHeader
.Size);
426
FrameHeader
frameHeader =
FrameHeader
.ReadFrom(_incomingBuffer.ActiveSpan);
427
if (frameHeader.PayloadLength >
FrameHeader
.MaxPayloadLength)
435
_incomingBuffer.Discard(
FrameHeader
.Size);
438
_incomingBuffer.Discard(
FrameHeader
.Size);
470
FrameHeader
frameHeader;
516
if (_incomingBuffer.ActiveLength <
FrameHeader
.Size)
542
while (_incomingBuffer.ActiveLength <
FrameHeader
.Size);
632
private async ValueTask ProcessHeadersFrame(
FrameHeader
frameHeader)
717
if (frameData.Length <
FrameHeader
.PriorityInfoLength)
723
frameData = frameData.Slice(
FrameHeader
.PriorityInfoLength);
735
private void ProcessAltSvcFrame(
FrameHeader
frameHeader)
765
private void ProcessDataFrame(
FrameHeader
frameHeader)
794
private void ProcessSettingsFrame(
FrameHeader
frameHeader, bool initialFrame = false)
950
private void ProcessPriorityFrame(
FrameHeader
frameHeader)
954
if (frameHeader.StreamId == 0 || frameHeader.PayloadLength !=
FrameHeader
.PriorityInfoLength)
964
private void ProcessPingFrame(
FrameHeader
frameHeader)
973
if (frameHeader.PayloadLength !=
FrameHeader
.PingLength)
981
Debug.Assert(sizeof(long) ==
FrameHeader
.PingLength);
982
ReadOnlySpan<byte> pingContent = _incomingBuffer.ActiveSpan.Slice(0,
FrameHeader
.PingLength);
998
private void ProcessWindowUpdateFrame(
FrameHeader
frameHeader)
1002
if (frameHeader.PayloadLength !=
FrameHeader
.WindowUpdateLength)
1035
private void ProcessRstStreamFrame(
FrameHeader
frameHeader)
1039
if (frameHeader.PayloadLength !=
FrameHeader
.RstStreamLength)
1066
private void ProcessGoAwayFrame(
FrameHeader
frameHeader)
1101
private (int lastStreamId, Http2ProtocolErrorCode errorCode) ReadGoAwayFrame(
FrameHeader
frameHeader)
1105
if (frameHeader.PayloadLength <
FrameHeader
.GoAwayMinLength)
1275
PerformWriteAsync(
FrameHeader
.Size, this, static (thisRef, writeBuffer) =>
1279
FrameHeader
.WriteTo(writeBuffer.Span, 0, FrameType.Settings, FrameFlags.Ack, streamId: 0);
1287
PerformWriteAsync(
FrameHeader
.Size +
FrameHeader
.PingLength, (thisRef: this, pingContent, isAck), static (state, writeBuffer) =>
1291
Debug.Assert(sizeof(long) ==
FrameHeader
.PingLength);
1294
FrameHeader
.WriteTo(span,
FrameHeader
.PingLength, FrameType.Ping, state.isAck ? FrameFlags.Ack : FrameFlags.None, streamId: 0);
1295
BinaryPrimitives.WriteInt64BigEndian(span.Slice(
FrameHeader
.Size), state.pingContent);
1301
PerformWriteAsync(
FrameHeader
.Size +
FrameHeader
.RstStreamLength, (thisRef: this, streamId, errorCode), static (s, writeBuffer) =>
1306
FrameHeader
.WriteTo(span,
FrameHeader
.RstStreamLength, FrameType.RstStream, FrameFlags.None, s.streamId);
1307
BinaryPrimitives.WriteInt32BigEndian(span.Slice(
FrameHeader
.Size), (int)s.errorCode);
1635
int frameCount = ((headerBytes.Length - 1) /
FrameHeader
.MaxPayloadLength) + 1;
1636
int totalSize = headerBytes.Length + (frameCount *
FrameHeader
.Size);
1656
(current, remaining) = SplitBuffer(s.headerBytes,
FrameHeader
.MaxPayloadLength);
1659
FrameHeader
.WriteTo(span, current.Length, FrameType.Headers, flags, s.http2Stream.StreamId);
1660
span = span.Slice(
FrameHeader
.Size);
1668
(current, remaining) = SplitBuffer(remaining,
FrameHeader
.MaxPayloadLength);
1671
FrameHeader
.WriteTo(span, current.Length, FrameType.Continuation, flags, s.http2Stream.StreamId);
1672
span = span.Slice(
FrameHeader
.Size);
1705
int frameSize = Math.Min(remaining.Length,
FrameHeader
.MaxPayloadLength);
1725
await PerformWriteAsync(
FrameHeader
.Size + current.Length, (thisRef: this, streamId, current, flush), static (s, writeBuffer) =>
1730
FrameHeader
.WriteTo(writeBuffer.Span, s.current.Length, FrameType.Data, FrameFlags.None, s.streamId);
1731
s.current.CopyTo(writeBuffer.Slice(
FrameHeader
.Size));
1746
PerformWriteAsync(
FrameHeader
.Size, (thisRef: this, streamId), static (s, writeBuffer) =>
1750
FrameHeader
.WriteTo(writeBuffer.Span, 0, FrameType.Data, FrameFlags.EndStream, s.streamId);
1759
return PerformWriteAsync(
FrameHeader
.Size +
FrameHeader
.WindowUpdateLength, (thisRef: this, streamId, amount), static (s, writeBuffer) =>
1764
FrameHeader
.WriteTo(span,
FrameHeader
.WindowUpdateLength, FrameType.WindowUpdate, FrameFlags.None, s.streamId);
1765
BinaryPrimitives.WriteInt32BigEndian(span.Slice(
FrameHeader
.Size), s.amount);
1916
public static
FrameHeader
ReadFrom(ReadOnlySpan<byte> buffer)