1 instantiation of FrameHeader
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (1)
1934
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);
399
private async ValueTask<
FrameHeader
> ReadFrameAsync(bool initialFrame = false)
404
if (_incomingBuffer.ActiveLength <
FrameHeader
.Size)
411
_incomingBuffer.EnsureAvailableSpace(
FrameHeader
.Size);
427
ThrowPrematureEOF(
FrameHeader
.Size);
431
while (_incomingBuffer.ActiveLength <
FrameHeader
.Size);
435
FrameHeader
frameHeader =
FrameHeader
.ReadFrom(_incomingBuffer.ActiveSpan);
436
if (frameHeader.PayloadLength >
FrameHeader
.MaxPayloadLength)
444
_incomingBuffer.Discard(
FrameHeader
.Size);
447
_incomingBuffer.Discard(
FrameHeader
.Size);
479
FrameHeader
frameHeader;
525
if (_incomingBuffer.ActiveLength <
FrameHeader
.Size)
551
while (_incomingBuffer.ActiveLength <
FrameHeader
.Size);
641
private async ValueTask ProcessHeadersFrame(
FrameHeader
frameHeader)
726
if (frameData.Length <
FrameHeader
.PriorityInfoLength)
732
frameData = frameData.Slice(
FrameHeader
.PriorityInfoLength);
744
private void ProcessAltSvcFrame(
FrameHeader
frameHeader)
774
private void ProcessDataFrame(
FrameHeader
frameHeader)
803
private void ProcessSettingsFrame(
FrameHeader
frameHeader, bool initialFrame = false)
959
private void ProcessPriorityFrame(
FrameHeader
frameHeader)
963
if (frameHeader.StreamId == 0 || frameHeader.PayloadLength !=
FrameHeader
.PriorityInfoLength)
973
private void ProcessPingFrame(
FrameHeader
frameHeader)
982
if (frameHeader.PayloadLength !=
FrameHeader
.PingLength)
990
Debug.Assert(sizeof(long) ==
FrameHeader
.PingLength);
991
ReadOnlySpan<byte> pingContent = _incomingBuffer.ActiveSpan.Slice(0,
FrameHeader
.PingLength);
1007
private void ProcessWindowUpdateFrame(
FrameHeader
frameHeader)
1011
if (frameHeader.PayloadLength !=
FrameHeader
.WindowUpdateLength)
1044
private void ProcessRstStreamFrame(
FrameHeader
frameHeader)
1048
if (frameHeader.PayloadLength !=
FrameHeader
.RstStreamLength)
1075
private void ProcessGoAwayFrame(
FrameHeader
frameHeader)
1110
private (int lastStreamId, Http2ProtocolErrorCode errorCode) ReadGoAwayFrame(
FrameHeader
frameHeader)
1114
if (frameHeader.PayloadLength <
FrameHeader
.GoAwayMinLength)
1284
PerformWriteAsync(
FrameHeader
.Size, this, static (thisRef, writeBuffer) =>
1288
FrameHeader
.WriteTo(writeBuffer.Span, 0, FrameType.Settings, FrameFlags.Ack, streamId: 0);
1296
PerformWriteAsync(
FrameHeader
.Size +
FrameHeader
.PingLength, (thisRef: this, pingContent, isAck), static (state, writeBuffer) =>
1300
Debug.Assert(sizeof(long) ==
FrameHeader
.PingLength);
1303
FrameHeader
.WriteTo(span,
FrameHeader
.PingLength, FrameType.Ping, state.isAck ? FrameFlags.Ack : FrameFlags.None, streamId: 0);
1304
BinaryPrimitives.WriteInt64BigEndian(span.Slice(
FrameHeader
.Size), state.pingContent);
1310
PerformWriteAsync(
FrameHeader
.Size +
FrameHeader
.RstStreamLength, (thisRef: this, streamId, errorCode), static (s, writeBuffer) =>
1315
FrameHeader
.WriteTo(span,
FrameHeader
.RstStreamLength, FrameType.RstStream, FrameFlags.None, s.streamId);
1316
BinaryPrimitives.WriteInt32BigEndian(span.Slice(
FrameHeader
.Size), (int)s.errorCode);
1644
int frameCount = ((headerBytes.Length - 1) /
FrameHeader
.MaxPayloadLength) + 1;
1645
int totalSize = headerBytes.Length + (frameCount *
FrameHeader
.Size);
1665
(current, remaining) = SplitBuffer(s.headerBytes,
FrameHeader
.MaxPayloadLength);
1668
FrameHeader
.WriteTo(span, current.Length, FrameType.Headers, flags, s.http2Stream.StreamId);
1669
span = span.Slice(
FrameHeader
.Size);
1677
(current, remaining) = SplitBuffer(remaining,
FrameHeader
.MaxPayloadLength);
1680
FrameHeader
.WriteTo(span, current.Length, FrameType.Continuation, flags, s.http2Stream.StreamId);
1681
span = span.Slice(
FrameHeader
.Size);
1714
int frameSize = Math.Min(remaining.Length,
FrameHeader
.MaxPayloadLength);
1734
await PerformWriteAsync(
FrameHeader
.Size + current.Length, (thisRef: this, streamId, current, flush), static (s, writeBuffer) =>
1739
FrameHeader
.WriteTo(writeBuffer.Span, s.current.Length, FrameType.Data, FrameFlags.None, s.streamId);
1740
s.current.CopyTo(writeBuffer.Slice(
FrameHeader
.Size));
1755
PerformWriteAsync(
FrameHeader
.Size, (thisRef: this, streamId), static (s, writeBuffer) =>
1759
FrameHeader
.WriteTo(writeBuffer.Span, 0, FrameType.Data, FrameFlags.EndStream, s.streamId);
1768
return PerformWriteAsync(
FrameHeader
.Size +
FrameHeader
.WindowUpdateLength, (thisRef: this, streamId, amount), static (s, writeBuffer) =>
1773
FrameHeader
.WriteTo(span,
FrameHeader
.WindowUpdateLength, FrameType.WindowUpdate, FrameFlags.None, s.streamId);
1774
BinaryPrimitives.WriteInt32BigEndian(span.Slice(
FrameHeader
.Size), s.amount);
1925
public static
FrameHeader
ReadFrom(ReadOnlySpan<byte> buffer)