1 write to _pool
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (1)
75_pool = pool;
83 references to _pool
System.Net.Http (83)
System\Net\Http\SocketsHttpHandler\ChunkedEncodingReadStream.cs (1)
502TimeSpan drainTime = _connection._pool.Settings._maxResponseDrainTime;
System\Net\Http\SocketsHttpHandler\ContentLengthReadStream.cs (1)
214TimeSpan drainTime = _connection._pool.Settings._maxResponseDrainTime;
System\Net\Http\SocketsHttpHandler\Http2Connection.cs (28)
163_keepAlivePingDelay = TimeSpanToMs(_pool.Settings._keepAlivePingDelay); 164_keepAlivePingTimeout = TimeSpanToMs(_pool.Settings._keepAlivePingTimeout); 166_keepAlivePingPolicy = _pool.Settings._keepAlivePingPolicy; 168uint maxHeaderListSize = _pool._lastSeenHttp2MaxHeaderListSize; 223BinaryPrimitives.WriteUInt32BigEndian(_outgoingBuffer.AvailableSpan, (uint)_pool.Settings._initialHttp2StreamWindowSize); 286Debug.Assert(!_pool.HasSyncObjLock); 294_pool.InvalidateHttp2Connection(this); 306Debug.Assert(!_pool.HasSyncObjLock); 329Debug.Assert(!_pool.HasSyncObjLock); 360Debug.Assert(!_pool.HasSyncObjLock); 777if ((frameHeader.StreamId != 0 && originLength == 0) || (frameHeader.StreamId == 0 && span.Length >= originLength && span.Slice(0, originLength).SequenceEqual(_pool.Http2AltSvcOriginUri))) 784_pool.HandleAltSvc(new[] { altSvcHeaderValue }, null); 873if (settingValue < _pool.Settings._initialHttp2MaxConcurrentStreams) 875_pool._lastSeenHttp2MaxConcurrentStreams = settingValue; 916_pool._lastSeenHttp2MaxHeaderListSize = _maxHeaderListSize; 1367Debug.Assert(!_pool.HasSyncObjLock); 1486HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _pool.Settings._requestHeaderEncodingSelector; 1560WriteIndexedHeader(_pool.IsSecure ? H2StaticTable.SchemeHttps : H2StaticTable.SchemeHttp, ref headerBuffer); 1568WriteBytes(_pool._http2EncodedAuthorityHostHeader, ref headerBuffer); 1595Encoding? protocolEncoding = _pool.Settings._requestHeaderEncodingSelector?.Invoke(":protocol", request); 1604if (_pool.Settings._useCookies) 1606string cookiesFromContainer = _pool.Settings._cookieContainer!.GetCookieHeader(request.RequestUri); 1610Encoding? cookieEncoding = _pool.Settings._requestHeaderEncodingSelector?.Invoke(KnownHeaders.Cookie.Name, request); 1948_pool.RemoveHttp2ConnectionFromHeartBeat(this); 2083Debug.Assert(!_pool.HasSyncObjLock); 2156_pool.OnSessionAuthenticationChallengeSeen(); 2270public sealed override string ToString() => $"{nameof(Http2Connection)}({_pool})"; // Description for diagnostic purposes 2277_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)) 609throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _connection._pool.Settings.MaxResponseHeadersByteLength)); 704Encoding? valueEncoding = _connection._pool.Settings._responseHeaderEncodingSelector?.Invoke(descriptor.Name, _request); 1100if (_connection._pool.Settings._useCookies) 1102CookieHelper.ProcessReceivedCookies(_response, _connection._pool.Settings._cookieContainer!);
System\Net\Http\SocketsHttpHandler\Http2StreamWindowManager.cs (1)
25HttpConnectionSettings settings = connection._pool.Settings;
System\Net\Http\SocketsHttpHandler\Http3Connection.cs (10)
51public HttpConnectionPool Pool => _pool; 84uint maxHeaderListSize = _pool._lastSeenHttp3MaxHeaderListSize; 188bool singleConnection = !_pool.Settings.EnableMultipleHttp3Connections; 214Debug.Assert(!_pool.Settings.EnableMultipleHttp3Connections || _availableRequestStreamsCount >= 0); 245Debug.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 503await _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); 298public HttpConnectionKind Kind => _pool.Kind; 350if (_pool.HostHeaderLineBytes is byte[] hostHeaderLineBytes) 366if (_pool.Settings._useCookies) 368cookiesFromContainer = _pool.Settings._cookieContainer!.GetCookieHeader(request.RequestUri); 422HeaderEncodingSelector<HttpRequestMessage>? encodingSelector = _pool.Settings._requestHeaderEncodingSelector; 593allowExpect100ToContinue, _pool.Settings._expect100ContinueTimeout, Timeout.InfiniteTimeSpan); 602_allowedReadLineBytes = _pool.Settings.MaxResponseHeadersByteLength; 795_pool.InvalidateHttp11Connection(this); 811_pool.InvalidateHttp11Connection(this); 840if (_pool.Settings._useCookies) 842CookieHelper.ProcessReceivedCookies(response, _pool.Settings._cookieContainer!); 1281Encoding? valueEncoding = _pool.Settings._responseHeaderEncodingSelector?.Invoke(descriptor.Name, _currentRequest!); 1335throw new HttpRequestException(HttpRequestError.ConfigurationLimitExceeded, SR.Format(SR.net_http_response_headers_exceeded_length, _pool.Settings.MaxResponseHeadersByteLength)); 2119if (!await responseStream.DrainAsync(_pool.Settings._maxResponseDrainSize).ConfigureAwait(false) || 2157_pool.RecycleHttp11Connection(this); 2161public sealed override string ToString() => $"{nameof(HttpConnection)}({_pool})"; // Description for diagnostic purposes 2165_pool?.GetHashCode() ?? 0, // pool ID
System\Net\Http\SocketsHttpHandler\HttpConnectionBase.cs (15)
96if (_pool.Settings._shouldEvictConnection is not null) 100_lastEvictionGeneration = _pool.EvictionGeneration; 117Debug.Assert(_pool.Settings._metrics is not null); 119SocketsHttpHandlerMetrics metrics = _pool.Settings._metrics!; 128Debug.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, 147string scheme = _pool.IsSecure ? "https" : "http"; 148string host = _pool.OriginAuthority.HostValue; 149int port = _pool.OriginAuthority.Port; 246if (_pool.EvictionGeneration != _lastEvictionGeneration) 259Debug.Assert(_pool.Settings._shouldEvictConnection is not null); 273if (await _pool.Settings._shouldEvictConnection(_evictionContext, _connectionDisposalCts.Token).ConfigureAwait(false)) 287_lastEvictionGeneration = _pool.EvictionGeneration;
System\Net\Http\SocketsHttpHandler\HttpContentReadStream.cs (3)
78bool 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");