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

◆ WaitFor100ContinueAsync()

async ValueTask< bool > System.Net.Http.Http2Connection.Http2Stream.WaitFor100ContinueAsync ( CancellationToken cancellationToken)
inline

Definition at line 616 of file Http2Connection.cs.

617 {
618 if (System.Net.NetEventSource.Log.IsEnabled())
619 {
620 Trace("Waiting to send request body content for 100-Continue.", "WaitFor100ContinueAsync");
621 }
623 using (cancellationToken.UnsafeRegister(delegate(object s)
624 {
625 ((TaskCompletionSource<bool>)s).TrySetResult(result: false);
627 {
629 {
631 if (System.Net.NetEventSource.Log.IsEnabled())
632 {
633 http2Stream.Trace("100-Continue timer expired.", "WaitFor100ContinueAsync");
634 }
635 http2Stream._expect100ContinueWaiter?.TrySetResult(result: true);
637 bool result;
638 try
639 {
640 bool flag = await expect100ContinueWaiter.Task.ConfigureAwait(continueOnCapturedContext: false);
641 CancellationHelper.ThrowIfCancellationRequested(cancellationToken);
642 result = flag;
643 }
644 finally
645 {
646 IAsyncDisposable asyncDisposable = configuredAsyncDisposable as IAsyncDisposable;
647 if (asyncDisposable != null)
648 {
649 await asyncDisposable.DisposeAsync();
650 }
651 }
652 return result;
653 }
654 }
Http2Stream(HttpRequestMessage request, Http2Connection connection)
void Trace(string message, [CallerMemberName] string memberName=null)
readonly TaskCompletionSource< bool > _expect100ContinueWaiter
readonly HttpConnectionPool _pool
static readonly System.Net.NetEventSource Log
static readonly TimeSpan InfiniteTimeSpan
Definition Timeout.cs:5

References System.Net.Http.Http2Connection.Http2Stream.Http2Stream(), System.Net.Http.Http2Connection.Http2Stream._connection, System.Net.Http.HttpConnectionSettings._expect100ContinueTimeout, System.Net.Http.Http2Connection.Http2Stream._expect100ContinueWaiter, System.Net.Http.Http2Connection._pool, System.cancellationToken, System.Threading.Timeout.InfiniteTimeSpan, System.Net.NetEventSource.Log, System.s, System.Net.Http.HttpConnectionPool.Settings, System.Net.Http.CancellationHelper.ThrowIfCancellationRequested(), and System.Net.Http.Http2Connection.Http2Stream.Trace().

Referenced by System.Net.Http.Http2Connection.Http2Stream.SendRequestBodyAsync().