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

◆ Cancel()

void System.Net.Http.Http2Connection.Http2Stream.Cancel ( )
inlineprivate

Definition at line 686 of file Http2Connection.cs.

687 {
688 if (System.Net.NetEventSource.Log.IsEnabled())
689 {
690 Trace("", "Cancel");
691 }
693 bool flag = false;
694 bool flag2 = false;
696 {
697 if (_requestCompletionState == StreamCompletionState.InProgress)
698 {
700 }
701 (flag, flag2) = CancelResponseBody();
702 }
703 cancellationTokenSource?.Cancel();
705 {
706 if (flag2)
707 {
708 SendReset();
709 Complete();
710 }
711 }
712 if (flag)
713 {
714 _waitSource.SetResult(result: true);
715 }
716 }
ManualResetValueTaskSourceCore< bool > _waitSource
readonly CancellationTokenSource _requestBodyCancellationSource
void Trace(string message, [CallerMemberName] string memberName=null)
static readonly System.Net.NetEventSource Log

References System.Net.Http.Http2Connection.Http2Stream._requestBodyCancellationSource, System.Net.Http.Http2Connection.Http2Stream._requestCompletionState, System.Net.Http.Http2Connection.Http2Stream._waitSource, System.Net.Http.Http2Connection.Http2Stream.CancelResponseBody(), System.Net.Http.Http2Connection.Http2Stream.Complete(), System.Net.NetEventSource.Log, System.Net.Http.Http2Connection.Http2Stream.SendReset(), System.Threading.Tasks.Sources.ManualResetValueTaskSourceCore< TResult >.SetResult(), System.Net.Http.Http2Connection.Http2Stream.SyncObject, and System.Net.Http.Http2Connection.Http2Stream.Trace().

Referenced by System.Net.Http.Http2Connection.Http2Stream.CloseResponseBody(), System.Net.Http.Http2Connection.Http2Stream.OnReset(), and System.Net.Http.Http2Connection.Http2Stream.ReadResponseHeadersAsync().