1 write to _pool
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
75
_pool
= pool;
82 references to _pool
System.Net.Http (82)
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (1)
502
TimeSpan drainTime = _connection.
_pool
.Settings._maxResponseDrainTime;
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (1)
214
TimeSpan drainTime = _connection.
_pool
.Settings._maxResponseDrainTime;
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (27)
166
_keepAlivePingDelay = TimeSpanToMs(
_pool
.Settings._keepAlivePingDelay);
167
_keepAlivePingTimeout = TimeSpanToMs(
_pool
.Settings._keepAlivePingTimeout);
169
_keepAlivePingPolicy =
_pool
.Settings._keepAlivePingPolicy;
171
uint maxHeaderListSize =
_pool
._lastSeenHttp2MaxHeaderListSize;
226
BinaryPrimitives.WriteUInt32BigEndian(_outgoingBuffer.AvailableSpan, (uint)
_pool
.Settings._initialHttp2StreamWindowSize);
289
Debug.Assert(!
_pool
.HasSyncObjLock);
297
_pool
.InvalidateHttp2Connection(this);
309
Debug.Assert(!
_pool
.HasSyncObjLock);
332
Debug.Assert(!
_pool
.HasSyncObjLock);
363
Debug.Assert(!
_pool
.HasSyncObjLock);
780
if ((frameHeader.StreamId != 0 && originLength == 0) || (frameHeader.StreamId == 0 && span.Length >= originLength && span.Slice(0, originLength).SequenceEqual(
_pool
.Http2AltSvcOriginUri)))
787
_pool
.HandleAltSvc(new[] { altSvcHeaderValue }, null);
873
_pool
._lastSeenHttp2MaxConcurrentStreams = settingValue;
912
_pool
._lastSeenHttp2MaxHeaderListSize = _maxHeaderListSize;
1363
Debug.Assert(!
_pool
.HasSyncObjLock);
1482
HeaderEncodingSelector<HttpRequestMessage>? encodingSelector =
_pool
.Settings._requestHeaderEncodingSelector;
1556
WriteIndexedHeader(
_pool
.IsSecure ? H2StaticTable.SchemeHttps : H2StaticTable.SchemeHttp, ref headerBuffer);
1564
WriteBytes(
_pool
._http2EncodedAuthorityHostHeader, ref headerBuffer);
1591
Encoding? protocolEncoding =
_pool
.Settings._requestHeaderEncodingSelector?.Invoke(":protocol", request);
1600
if (
_pool
.Settings._useCookies)
1602
string cookiesFromContainer =
_pool
.Settings._cookieContainer!.GetCookieHeader(request.RequestUri);
1606
Encoding? cookieEncoding =
_pool
.Settings._requestHeaderEncodingSelector?.Invoke(KnownHeaders.Cookie.Name, request);
1944
_pool
.RemoveHttp2ConnectionFromHeartBeat(this);
2079
Debug.Assert(!
_pool
.HasSyncObjLock);
2152
_pool
.OnSessionAuthenticationChallengeSeen();
2266
public sealed override string ToString() => $"{nameof(Http2Connection)}({
_pool
})"; // Description for diagnostic purposes
2273
_pool
?.GetHashCode() ?? 0, // pool ID
System\Net\Http\SocketsHttpHandler\Http2Stream.cs (6)
106
_headerBudgetRemaining = connection.
_pool
.Settings.MaxResponseHeadersByteLength;
353
}, this, _connection.
_pool
.Settings._expect100ContinueTimeout, Timeout.InfiniteTimeSpan).ConfigureAwait(false))
609
throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection.
_pool
.Settings.MaxResponseHeadersByteLength));
704
Encoding? valueEncoding = _connection.
_pool
.Settings._responseHeaderEncodingSelector?.Invoke(descriptor.Name, _request);
1100
if (_connection.
_pool
.Settings._useCookies)
1102
CookieHelper.ProcessReceivedCookies(_response, _connection.
_pool
.Settings._cookieContainer!);
System\Net\Http\SocketsHttpHandler\Http2StreamWindowManager.cs (1)
25
HttpConnectionSettings settings = connection.
_pool
.Settings;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (10)
51
public HttpConnectionPool Pool =>
_pool
;
84
uint maxHeaderListSize =
_pool
._lastSeenHttp3MaxHeaderListSize;
188
bool singleConnection = !
_pool
.Settings.EnableMultipleHttp3Connections;
214
Debug.Assert(!
_pool
.Settings.EnableMultipleHttp3Connections || _availableRequestStreamsCount >= 0);
245
Debug.Assert(
_pool
.Settings.EnableMultipleHttp3Connections, "Calling WaitForAvailableStreamsAsync() is invalid when EnableMultipleHttp3Connections is false.");
385
_pool
.InvalidateHttp3Connection(this, dispose: false);
420
_pool
.InvalidateHttp3Connection(this, dispose: false);
482
_pool
?.GetHashCode() ?? 0, // pool ID
503
await _clientControl.WriteAsync(
_pool
.Settings.Http3SettingsFrame, CancellationToken.None).ConfigureAwait(false);
867
_pool
._lastSeenHttp3MaxHeaderListSize = _maxHeaderListSize;
System\Net\Http\SocketsHttpHandler\HttpConnection.cs (18)
109
_pool
.InvalidateHttp11Connection(this, disposing);
298
public HttpConnectionKind Kind =>
_pool
.Kind;
350
if (
_pool
.HostHeaderLineBytes is byte[] hostHeaderLineBytes)
366
if (
_pool
.Settings._useCookies)
368
cookiesFromContainer =
_pool
.Settings._cookieContainer!.GetCookieHeader(request.RequestUri);
422
HeaderEncodingSelector<HttpRequestMessage>? encodingSelector =
_pool
.Settings._requestHeaderEncodingSelector;
593
allowExpect100ToContinue,
_pool
.Settings._expect100ContinueTimeout, Timeout.InfiniteTimeSpan);
602
_allowedReadLineBytes =
_pool
.Settings.MaxResponseHeadersByteLength;
795
_pool
.InvalidateHttp11Connection(this);
811
_pool
.InvalidateHttp11Connection(this);
840
if (
_pool
.Settings._useCookies)
842
CookieHelper.ProcessReceivedCookies(response,
_pool
.Settings._cookieContainer!);
1281
Encoding? valueEncoding =
_pool
.Settings._responseHeaderEncodingSelector?.Invoke(descriptor.Name, _currentRequest!);
1335
throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length,
_pool
.Settings.MaxResponseHeadersByteLength));
2119
if (!await responseStream.DrainAsync(
_pool
.Settings._maxResponseDrainSize).ConfigureAwait(false) ||
2157
_pool
.RecycleHttp11Connection(this);
2161
public sealed override string ToString() => $"{nameof(HttpConnection)}({
_pool
})"; // Description for diagnostic purposes
2165
_pool
?.GetHashCode() ?? 0, // pool ID
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (15)
96
if (
_pool
.Settings._shouldEvictConnection is not null)
100
_lastEvictionGeneration =
_pool
.EvictionGeneration;
117
Debug.Assert(
_pool
.Settings._metrics is not null);
119
SocketsHttpHandlerMetrics metrics =
_pool
.Settings._metrics!;
128
Debug.Assert(
_pool
.TelemetryServerAddress is not null, "TelemetryServerAddress should not be null when System.Diagnostics.Metrics.Meter.IsSupported is true.");
132
_pool
.IsSecure ? "https" : "http",
133
_pool
.TelemetryServerAddress,
134
_pool
.OriginAuthority.Port,
147
string scheme =
_pool
.IsSecure ? "https" : "http";
148
string host =
_pool
.OriginAuthority.HostValue;
149
int port =
_pool
.OriginAuthority.Port;
246
if (
_pool
.EvictionGeneration != _lastEvictionGeneration)
259
Debug.Assert(
_pool
.Settings._shouldEvictConnection is not null);
273
if (await
_pool
.Settings._shouldEvictConnection(_evictionContext, _connectionDisposalCts.Token).ConfigureAwait(false))
287
_lastEvictionGeneration =
_pool
.EvictionGeneration;
System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs (3)
78
bool drained = await DrainAsync(connection.
_pool
.Settings._maxResponseDrainSize).ConfigureAwait(false);
84
$"Connection drain failed when MaxResponseDrainSize={connection.
_pool
.Settings._maxResponseDrainSize} bytes or MaxResponseDrainTime=={connection.
_pool
.Settings._maxResponseDrainTime} exceeded");