From f5a1bb1a38309f2a0f093ffffaa2537f681bb9aa Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Tue, 13 Mar 2018 23:31:30 -0700 Subject: [PATCH 1/2] Default to the managed socket transport --- src/Kestrel/Kestrel.csproj | 3 --- src/Kestrel/WebHostBuilderKestrelExtensions.cs | 4 ++-- test/Kestrel.Tests/Kestrel.Tests.csproj | 1 + test/Kestrel.Tests/WebHostBuilderKestrelExtensionsTests.cs | 4 ++-- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Kestrel/Kestrel.csproj b/src/Kestrel/Kestrel.csproj index 55f910ddc..f09786308 100644 --- a/src/Kestrel/Kestrel.csproj +++ b/src/Kestrel/Kestrel.csproj @@ -17,9 +17,6 @@ - - - diff --git a/src/Kestrel/WebHostBuilderKestrelExtensions.cs b/src/Kestrel/WebHostBuilderKestrelExtensions.cs index 70b1a34d7..6552da10f 100644 --- a/src/Kestrel/WebHostBuilderKestrelExtensions.cs +++ b/src/Kestrel/WebHostBuilderKestrelExtensions.cs @@ -6,7 +6,7 @@ using Microsoft.AspNetCore.Server.Kestrel.Core; using Microsoft.AspNetCore.Server.Kestrel.Core.Internal; using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal; -using Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv; +using Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets; using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.Options; @@ -29,7 +29,7 @@ public static IWebHostBuilder UseKestrel(this IWebHostBuilder hostBuilder) return hostBuilder.ConfigureServices(services => { // Don't override an already-configured transport - services.TryAddSingleton(); + services.TryAddSingleton(); services.AddTransient, KestrelServerOptionsSetup>(); services.AddSingleton(); diff --git a/test/Kestrel.Tests/Kestrel.Tests.csproj b/test/Kestrel.Tests/Kestrel.Tests.csproj index c26558bb0..d383f3960 100644 --- a/test/Kestrel.Tests/Kestrel.Tests.csproj +++ b/test/Kestrel.Tests/Kestrel.Tests.csproj @@ -13,6 +13,7 @@ + diff --git a/test/Kestrel.Tests/WebHostBuilderKestrelExtensionsTests.cs b/test/Kestrel.Tests/WebHostBuilderKestrelExtensionsTests.cs index 3c10c1c0f..bc0eff8af 100644 --- a/test/Kestrel.Tests/WebHostBuilderKestrelExtensionsTests.cs +++ b/test/Kestrel.Tests/WebHostBuilderKestrelExtensionsTests.cs @@ -51,13 +51,13 @@ public void ApplicationServicesNotNullDuringUseKestrelWithOptions() } [Fact] - public void LibuvIsTheDefaultTransport() + public void SocketTransportIsTheDefault() { var hostBuilder = new WebHostBuilder() .UseKestrel() .Configure(app => { }); - Assert.IsType(hostBuilder.Build().Services.GetService()); + Assert.IsType(hostBuilder.Build().Services.GetService()); } [Fact] From d870bca8811bf55573e6b51f2c66cf0be8cc9946 Mon Sep 17 00:00:00 2001 From: Stephen Halter Date: Tue, 13 Mar 2018 23:39:13 -0700 Subject: [PATCH 2/2] Add libuv project reference to sample apps --- samples/SampleApp/SampleApp.csproj | 1 + samples/SystemdTestApp/SystemdTestApp.csproj | 1 + 2 files changed, 2 insertions(+) diff --git a/samples/SampleApp/SampleApp.csproj b/samples/SampleApp/SampleApp.csproj index 112987f61..036867ebc 100644 --- a/samples/SampleApp/SampleApp.csproj +++ b/samples/SampleApp/SampleApp.csproj @@ -9,6 +9,7 @@ + diff --git a/samples/SystemdTestApp/SystemdTestApp.csproj b/samples/SystemdTestApp/SystemdTestApp.csproj index 08a554785..28c159a38 100644 --- a/samples/SystemdTestApp/SystemdTestApp.csproj +++ b/samples/SystemdTestApp/SystemdTestApp.csproj @@ -8,6 +8,7 @@ +