24 NetworkChange.NetworkAddressChanged -=
_handler;
29 NetworkChange.NetworkAddressChanged -=
_handler;
38 public readonly
string Host;
186 value.OnNetworkChanged();
364 pool.Value.Dispose();
385 if (
pool.Value.CleanCacheAndDisposeIfUnused())
403 pool.Value.HeartBeat();
bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
bool TryAdd(TKey key, TValue value)
static void SuppressFinalize(object obj)
static byte Min(byte val1, byte val2)
static byte Max(byte val1, byte val2)
static string GetIdentity()
static IWebProxy DefaultProxy
readonly NetworkAddressChangedEventHandler _handler
NetworkChangeCleanup(NetworkAddressChangedEventHandler handler)
ValueTask< HttpResponseMessage > SendAsyncCore(HttpRequestMessage request, Uri proxyUri, bool async, bool doRequestAuth, bool isProxyConnect, CancellationToken cancellationToken)
readonly Timer _cleaningTimer
static string ParseHostNameFromHeader(string hostHeader)
readonly TimeSpan _cleanPoolTimeout
HttpConnectionKey GetConnectionKey(HttpRequestMessage request, Uri proxyUri, bool isProxyConnect)
NetworkChangeCleanup _networkChangeCleanup
async ValueTask< HttpResponseMessage > SendAsyncMultiProxy(HttpRequestMessage request, bool async, bool doRequestAuth, MultiProxy multiProxy, Uri firstProxy, CancellationToken cancellationToken)
readonly ConcurrentDictionary< HttpConnectionKey, HttpConnectionPool > _pools
HttpConnectionPoolManager(HttpConnectionSettings settings)
readonly Timer _heartBeatTimer
ICredentials ProxyCredentials
ValueTask< HttpResponseMessage > SendProxyConnectAsync(HttpRequestMessage request, Uri proxyUri, bool async, CancellationToken cancellationToken)
readonly IWebProxy _proxy
readonly HttpConnectionSettings _settings
HttpConnectionSettings Settings
void StartMonitoringNetworkChanges()
ValueTask< HttpResponseMessage > SendAsync(HttpRequestMessage request, bool async, bool doRequestAuth, CancellationToken cancellationToken)
static string GetIdentityIfDefaultCredentialsUsed(bool defaultCredentialsUsed)
void SetCleaningTimer(TimeSpan timeout)
readonly ICredentials _proxyCredentials
ICredentials _defaultProxyCredentials
TimeSpan _pooledConnectionLifetime
TimeSpan _keepAlivePingTimeout
TimeSpan _keepAlivePingDelay
bool _defaultCredentialsUsedForServer
TimeSpan _pooledConnectionIdleTimeout
int _maxConnectionsPerServer
bool _defaultCredentialsUsedForProxy
static bool IsSupportedSecureScheme(string scheme)
static bool IsSupportedProxyScheme(string scheme)
static bool IsSocksScheme(string scheme)
static bool IsNonSecureWebSocketScheme(string scheme)
static readonly System.Net.NetEventSource Log
static void Error(object thisOrContextObject, FormattableString formattableString, [CallerMemberName] string memberName=null)
static string net_http_invalid_proxy_scheme
static bool IsFlowSuppressed()
static AsyncFlowControl SuppressFlow()
static void RestoreFlow()
static int CompareExchange(ref int location1, int value, int comparand)
static readonly TimeSpan InfiniteTimeSpan
bool Dispose(WaitHandle notifyObject)
bool Change(int dueTime, int period)
Uri? GetProxy(Uri destination)
bool IsBypassed(Uri host)
override int GetHashCode()
readonly string SslHostName
bool Equals(HttpConnectionKey other)
readonly HttpConnectionKind Kind
override bool Equals([NotNullWhen(true)] object obj)
HttpConnectionKey(HttpConnectionKind kind, string host, int port, string sslHostName, Uri proxyUri, string identity)
static TimeSpan FromSeconds(double value)
static readonly TimeSpan Zero