Commit cc18e7fe authored by Marc Gravell's avatar Marc Gravell

use libuv in kestrel

parent c23a973e
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" /> <PackageReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Transport.Libuv" Version="2.1.0" />
<ProjectReference Include="..\StackExchange.Redis.Server\StackExchange.Redis.Server.csproj" /> <ProjectReference Include="..\StackExchange.Redis.Server\StackExchange.Redis.Server.csproj" />
</ItemGroup> </ItemGroup>
</Project> </Project>
using Microsoft.AspNetCore; using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Connections; using Microsoft.AspNetCore.Connections;
using Microsoft.AspNetCore.Hosting; using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Server.Kestrel.Transport;
using Microsoft.AspNetCore.Server.Kestrel.Transport.Abstractions.Internal;
namespace KestrelRedisServer namespace KestrelRedisServer
{ {
...@@ -13,9 +15,10 @@ public static void Main(string[] args) ...@@ -13,9 +15,10 @@ public static void Main(string[] args)
public static IWebHostBuilder CreateWebHostBuilder(string[] args) => public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args) WebHost.CreateDefaultBuilder(args)
.UseLibuv()
.UseKestrel(options => .UseKestrel(options =>
{ {
options.ApplicationSchedulingMode = SchedulingMode.Inline;
// HTTP 5000 // HTTP 5000
options.ListenLocalhost(5000); options.ListenLocalhost(5000);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment