Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ProcessGoAwayFrame()

void System.Net.Http.Http2Connection.ProcessGoAwayFrame ( FrameHeader frameHeader)
inlineprivate

Definition at line 2449 of file Http2Connection.cs.

2450 {
2451 if (frameHeader.PayloadLength < 8)
2452 {
2454 }
2455 if (frameHeader.StreamId != 0)
2456 {
2458 }
2459 int num = (int)(BinaryPrimitives.ReadUInt32BigEndian(_incomingBuffer.ActiveSpan) & 0x7FFFFFFF);
2461 if (System.Net.NetEventSource.Log.IsEnabled())
2462 {
2463 Trace(frameHeader.StreamId, $"{"lastStreamId"}={num}, {"errorCode"}={http2ProtocolErrorCode}", "ProcessGoAwayFrame");
2464 }
2465 _incomingBuffer.Discard(frameHeader.PayloadLength);
2466 Exception resetException = new Http2ConnectionException(http2ProtocolErrorCode);
2470 {
2471 Shutdown();
2473 {
2474 int key = httpStream.Key;
2475 if (key > num)
2476 {
2477 list.Add(httpStream.Value);
2478 }
2479 }
2480 }
2481 foreach (Http2Stream item in list)
2482 {
2483 item.OnReset(resetException, null, canRetry: true);
2484 }
2485 }
static uint ReadUInt32BigEndian(ReadOnlySpan< byte > source)
static int ReadInt32BigEndian(ReadOnlySpan< byte > source)
void Add(TKey key, TValue value)
System.Net.ArrayBuffer _incomingBuffer
override void Trace(string message, [CallerMemberName] string memberName=null)
readonly Dictionary< int, Http2Stream > _httpStreams
static readonly System.Net.NetEventSource Log

References System.Net.Http.Http2Connection._httpStreams, System.Net.Http.Http2Connection._incomingBuffer, System.Net.Http.Http2Connection._rttEstimator, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.item, System.key, System.list, System.Net.NetEventSource.Log, System.Net.Http.Http2Connection.RttEstimator.OnGoAwayReceived(), System.Buffers.Binary.BinaryPrimitives.ReadInt32BigEndian(), System.Buffers.Binary.BinaryPrimitives.ReadUInt32BigEndian(), System.Net.Http.Http2Connection.Shutdown(), System.Net.Http.Http2Connection.SyncObject, System.Net.Http.Http2Connection.ThrowProtocolError(), and System.Net.Http.Http2Connection.Trace().

Referenced by System.Net.Http.Http2Connection.ProcessIncomingFramesAsync().