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