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

◆ ProcessOutgoingFramesAsync()

async Task System.Net.Http.Http2Connection.ProcessOutgoingFramesAsync ( )
inlineprivate

Definition at line 2506 of file Http2Connection.cs.

2507 {
2508 _ = 2;
2509 try
2510 {
2511 while (await _writeChannel.Reader.WaitToReadAsync().ConfigureAwait(continueOnCapturedContext: false))
2512 {
2514 while (_writeChannel.Reader.TryRead(out writeEntry))
2515 {
2516 if (_abortException != null)
2517 {
2518 if (writeEntry.TryDisableCancellation())
2519 {
2520 writeEntry.SetException(_abortException);
2521 }
2522 continue;
2523 }
2524 int writeBytes = writeEntry.WriteBytes;
2525 int capacity = _outgoingBuffer.Capacity;
2526 if (capacity >= 32768)
2527 {
2528 int activeLength = _outgoingBuffer.ActiveLength;
2530 {
2532 }
2533 }
2534 if (!writeEntry.TryDisableCancellation())
2535 {
2536 continue;
2537 }
2538 _outgoingBuffer.EnsureAvailableSpace(writeBytes);
2539 try
2540 {
2541 if (System.Net.NetEventSource.Log.IsEnabled())
2542 {
2543 Trace($"{"writeBytes"}={writeBytes}", "ProcessOutgoingFramesAsync");
2544 }
2545 bool flag = writeEntry.InvokeWriteAction(_outgoingBuffer.AvailableMemorySliced(writeBytes));
2546 writeEntry.SetResult();
2549 }
2550 catch (Exception exception)
2551 {
2552 writeEntry.SetException(exception);
2553 }
2554 }
2556 {
2558 }
2559 }
2560 }
2561 catch (Exception value)
2562 {
2563 if (System.Net.NetEventSource.Log.IsEnabled())
2564 {
2565 Trace($"Unexpected exception in {"ProcessOutgoingFramesAsync"}: {value}", "ProcessOutgoingFramesAsync");
2566 }
2567 }
2568 }
readonly Channel< WriteQueueEntry > _writeChannel
System.Net.ArrayBuffer _outgoingBuffer
override void Trace(string message, [CallerMemberName] string memberName=null)
static readonly System.Net.NetEventSource Log

References System.Net.Http.Http2Connection._abortException, System.Net.Http.Http2Connection._lastPendingWriterShouldFlush, System.Net.Http.Http2Connection._outgoingBuffer, System.Net.Http.Http2Connection._writeChannel, System.capacity, System.exception, System.Net.Http.Http2Connection.FlushOutgoingBytesAsync(), System.Net.NetEventSource.Log, System.Net.Http.Http2Connection.ProcessOutgoingFramesAsync(), System.Net.Http.Http2Connection.Trace(), and System.value.

Referenced by System.Net.Http.Http2Connection.ProcessOutgoingFramesAsync(), and System.Net.Http.Http2Connection.SetupAsync().