14 instantiations of SocketsHttpHandler
Aspire.Dashboard (1)
ServiceClient\DashboardClient.cs (1)
119var httpHandler = new SocketsHttpHandler
Aspire.Dashboard.Tests (5)
Integration\IntegrationTestHelpers.cs (2)
119var handler = new SocketsHttpHandler 180var handler = new SocketsHttpHandler
Integration\TelemetryApiTests.cs (3)
101using var handler = new SocketsHttpHandler { AllowAutoRedirect = false }; 173using var handler = new SocketsHttpHandler { AllowAutoRedirect = false }; 342using var handler = new SocketsHttpHandler { AllowAutoRedirect = false };
Aspire.Hosting.Tests (1)
DistributedApplicationTests.cs (1)
1525using var client2 = new HttpClient(new SocketsHttpHandler
Aspire.Seq (1)
SeqHealthCheck.cs (1)
14readonly HttpClient _client = new(new SocketsHttpHandler { ActivityHeadersPropagator = null }) { BaseAddress = new Uri(seqUri) };
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
131using SocketsHttpHandler handler = new SocketsHttpHandler();
Microsoft.Extensions.Http (2)
DefaultHttpMessageHandlerBuilder.cs (1)
68SocketsHttpHandler handler = new();
DependencyInjection\HttpClientBuilderExtensions.cs (1)
296handler = new SocketsHttpHandler();
Microsoft.NET.Build.Containers (1)
Registry\DefaultRegistryAPI.cs (1)
60var socketsHttpHandler = new SocketsHttpHandler()
System.Net.Http (1)
System\Net\Http\HttpClientHandler.cs (1)
75_underlyingHandler = new HttpHandlerType();
System.Net.Requests (1)
System\Net\HttpWebRequest.cs (1)
1691var handler = new SocketsHttpHandler();
69 references to SocketsHttpHandler
Aspire.Dashboard (2)
ServiceClient\DashboardClient.cs (2)
82Action<SocketsHttpHandler>? configureHttpHandler = null) 119var httpHandler = new SocketsHttpHandler
Aspire.Dashboard.Tests (5)
Integration\IntegrationTestHelpers.cs (2)
119var handler = new SocketsHttpHandler 180var handler = new SocketsHttpHandler
Integration\TelemetryApiTests.cs (3)
101using var handler = new SocketsHttpHandler { AllowAutoRedirect = false }; 173using var handler = new SocketsHttpHandler { AllowAutoRedirect = false }; 342using var handler = new SocketsHttpHandler { AllowAutoRedirect = false };
Microsoft.DotNet.Arcade.Sdk (1)
src\DownloadFile.cs (1)
131using SocketsHttpHandler handler = new SocketsHttpHandler();
Microsoft.Extensions.Http (44)
DefaultHttpMessageHandlerBuilder.cs (2)
66if (SocketsHttpHandler.IsSupported) 68SocketsHttpHandler handler = new();
DependencyInjection\HttpClientBuilderExtensions.cs (11)
271/// Adds or updates <see cref="SocketsHttpHandler"/> as a primary handler for a named <see cref="HttpClient"/>. If provided, 272/// also adds a delegate that will be used to configure the primary <see cref="SocketsHttpHandler"/>. 275/// <param name="configureHandler">Optional delegate that is used to configure the primary <see cref="SocketsHttpHandler"/>.</param> 279/// If a primary handler was already set to be <see cref="SocketsHttpHandler"/> by previously calling, for example, 282/// delegate will be applied to the existing instance. Otherwise, a new instance of <see cref="SocketsHttpHandler"/> will be created. 286public static IHttpClientBuilder UseSocketsHttpHandler(this IHttpClientBuilder builder, Action<SocketsHttpHandler, IServiceProvider>? configureHandler = null) 294if (b.PrimaryHandler is not SocketsHttpHandler handler) 307/// Adds or updates <see cref="SocketsHttpHandler"/> as a primary handler for a named <see cref="HttpClient"/> 311/// <param name="configureBuilder">Delegate that is used to set up the configuration of the primary <see cref="SocketsHttpHandler"/> 316/// If a primary handler was already set to be <see cref="SocketsHttpHandler"/> by previously calling, for example, 320/// <see cref="SocketsHttpHandler"/> will be created.
DependencyInjection\ISocketsHttpHandlerBuilder.cs (1)
8/// Configures <see cref="System.Net.Http.SocketsHttpHandler"/> for a named
DependencyInjection\SocketsHttpHandlerBuilderExtensions.cs (29)
15/// Extension methods to configure <see cref="SocketsHttpHandler"/> for a named 21/// Adds a delegate that will be used to configure the primary <see cref="SocketsHttpHandler"/> for a 25/// <param name="configure">A delegate that is used to modify a <see cref="SocketsHttpHandler"/>.</param> 28public static ISocketsHttpHandlerBuilder Configure(this ISocketsHttpHandlerBuilder builder, Action<SocketsHttpHandler, IServiceProvider> configure) 34if (b.PrimaryHandler is not SocketsHttpHandler socketsHttpHandler) 36string message = SR.Format(SR.SocketsHttpHandlerBuilder_PrimaryHandlerIsInvalid, nameof(b.PrimaryHandler), typeof(SocketsHttpHandler).FullName, Environment.NewLine, b.PrimaryHandler?.ToString() ?? "(null)"); 47/// Uses <see cref="IConfiguration"/> to configure the primary <see cref="SocketsHttpHandler"/> for a 51/// <param name="configuration">Configuration containing properties of <see cref="SocketsHttpHandler"/>.</param> 55/// Only simple (of type `bool`, `int`, <see cref="Enum"/> or <see cref="TimeSpan"/>) properties of <see cref="SocketsHttpHandler"/> will be parsed. 69private static void FillFromConfig(SocketsHttpHandler handler, in SocketsHttpHandlerConfiguration config) 195PooledConnectionIdleTimeout = ParseTimeSpan(config[nameof(SocketsHttpHandler.PooledConnectionIdleTimeout)]), 196PooledConnectionLifetime = ParseTimeSpan(config[nameof(SocketsHttpHandler.PooledConnectionLifetime)]), 197PreAuthenticate = ParseBool(config[nameof(SocketsHttpHandler.PreAuthenticate)]), 198ResponseDrainTimeout = ParseTimeSpan(config[nameof(SocketsHttpHandler.ResponseDrainTimeout)]), 199UseCookies = ParseBool(config[nameof(SocketsHttpHandler.UseCookies)]), 200UseProxy = ParseBool(config[nameof(SocketsHttpHandler.UseProxy)]), 201EnableMultipleHttp2Connections = ParseBool(config[nameof(SocketsHttpHandler.EnableMultipleHttp2Connections)]), 202MaxResponseHeadersLength = ParseInt(config[nameof(SocketsHttpHandler.MaxResponseHeadersLength)]), 203MaxResponseDrainSize = ParseInt(config[nameof(SocketsHttpHandler.MaxResponseDrainSize)]), 204MaxConnectionsPerServer = ParseInt(config[nameof(SocketsHttpHandler.MaxConnectionsPerServer)]), 205MaxAutomaticRedirections = ParseInt(config[nameof(SocketsHttpHandler.MaxAutomaticRedirections)]), 206InitialHttp2StreamWindowSize = ParseInt(config[nameof(SocketsHttpHandler.InitialHttp2StreamWindowSize)]), 207AllowAutoRedirect = ParseBool(config[nameof(SocketsHttpHandler.AllowAutoRedirect)]), 208AutomaticDecompression = ParseEnum<DecompressionMethods>(config[nameof(SocketsHttpHandler.AutomaticDecompression)]), 209ConnectTimeout = ParseTimeSpan(config[nameof(SocketsHttpHandler.ConnectTimeout)]), 210Expect100ContinueTimeout = ParseTimeSpan(config[nameof(SocketsHttpHandler.Expect100ContinueTimeout)]), 211KeepAlivePingDelay = ParseTimeSpan(config[nameof(SocketsHttpHandler.KeepAlivePingDelay)]), 212KeepAlivePingTimeout = ParseTimeSpan(config[nameof(SocketsHttpHandler.KeepAlivePingTimeout)]), 213KeepAlivePingPolicy = ParseEnum<HttpKeepAlivePingPolicy>(config[nameof(SocketsHttpHandler.KeepAlivePingPolicy)])
MetricsFactoryHttpMessageHandlerFilter.cs (1)
36else if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi() && builder.PrimaryHandler is SocketsHttpHandler socketsHttpHandler)
Microsoft.Extensions.ServiceDiscovery (1)
ServiceDiscoveryHttpClientBuilderExtensions.cs (1)
83if (builder.PrimaryHandler is SocketsHttpHandler socketsHttpHandler)
Microsoft.NET.Build.Containers (1)
Registry\DefaultRegistryAPI.cs (1)
60var socketsHttpHandler = new SocketsHttpHandler()
System.Net.Http (13)
System\Net\Http\HttpClientHandler.cs (6)
22using HttpHandlerType = System.Net.Http.SocketsHttpHandler; 29private readonly HttpHandlerType _underlyingHandler; 68private HttpHandlerType Handler => _underlyingHandler; 91public virtual bool SupportsAutomaticDecompression => HttpHandlerType.SupportsAutomaticDecompression; 92public virtual bool SupportsProxy => HttpHandlerType.SupportsProxy; 93public virtual bool SupportsRedirectConfiguration => HttpHandlerType.SupportsRedirectConfiguration;
System\Net\Http\HttpProtocolException.cs (1)
13/// When calling <see cref="HttpClient"/> or <see cref="SocketsHttpHandler"/> methods, <see cref="HttpProtocolException"/> will be the inner exception of
System\Net\Http\SocketsHttpHandler\ConnectionPool\HttpConnectionPool.cs (2)
674Trace($"{nameof(SocketsHttpHandler.ConnectCallback)} completing asynchronously for a synchronous request."); 753Trace($"{nameof(SocketsHttpHandler.PlaintextStreamFilter)} completing asynchronously for a synchronous request.");
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (4)
276/// Defines the initial HTTP2 stream receive window size for all connections opened by the this <see cref="SocketsHttpHandler"/>. 304/// <see cref="SocketsHttpHandler.KeepAlivePingTimeout"/> to close broken connections. 480/// Gets or sets the <see cref="IMeterFactory"/> to create a custom <see cref="Meter"/> for the <see cref="SocketsHttpHandler"/> instance. 483/// When <see cref="MeterFactory"/> is set to a non-<see langword="null"/> value, all metrics emitted by the <see cref="SocketsHttpHandler"/> instance
System.Net.Requests (2)
System\Net\HttpWebRequest.cs (2)
1691var handler = new SocketsHttpHandler(); 1712static extern object GetSettings(SocketsHttpHandler handler);