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

◆ DrainResponseAsync()

async ValueTask System.Net.Http.HttpConnection.DrainResponseAsync ( HttpResponseMessage response,
CancellationToken cancellationToken )
inline

Definition at line 2574 of file HttpConnection.cs.

2575 {
2576 if (_connectionClose)
2577 {
2578 throw new HttpRequestException(System.SR.net_http_authconnectionfailure);
2579 }
2580 Stream stream = response.Content.ReadAsStream(cancellationToken);
2581 if (stream is HttpContentReadStream { NeedsDrain: not false } httpContentReadStream && (!(await httpContentReadStream.DrainAsync(_pool.Settings._maxResponseDrainSize).ConfigureAwait(continueOnCapturedContext: false)) || _connectionClose))
2582 {
2583 throw new HttpRequestException(System.SR.net_http_authconnectionfailure);
2584 }
2585 response.Dispose();
2586 }
readonly HttpConnectionPool _pool
static string net_http_authconnectionfailure
Definition SR.cs:158
Definition SR.cs:7

References System.Net.Http.HttpConnection._connectionClose, System.Net.Http.HttpConnectionSettings._maxResponseDrainSize, System.Net.Http.HttpConnection._pool, System.cancellationToken, System.SR.net_http_authconnectionfailure, System.Net.Http.HttpConnectionPool.Settings, and System.stream.

Referenced by System.Net.Http.AuthenticationHelper.SendWithNtAuthAsync().