Remove WebSocketProtocol dependencies (#6651)

This commit is contained in:
David Fowler 2019-01-13 18:22:11 -08:00 committed by Pavel Krymets
parent 6d28c44408
commit 71ce37ee91
9 changed files with 9 additions and 16 deletions

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
@ -10,7 +10,6 @@
<Reference Include="Microsoft.Extensions.Logging" /> <Reference Include="Microsoft.Extensions.Logging" />
<Reference Include="Microsoft.Extensions.Logging.Testing" /> <Reference Include="Microsoft.Extensions.Logging.Testing" />
<Reference Include="System.Diagnostics.EventLog" /> <Reference Include="System.Diagnostics.EventLog" />
<Reference Include="System.Net.WebSockets.WebSocketProtocol" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
@ -29,7 +29,6 @@
<Reference Include="Microsoft.Extensions.Logging" /> <Reference Include="Microsoft.Extensions.Logging" />
<Reference Include="Microsoft.Extensions.Logging.Testing" /> <Reference Include="Microsoft.Extensions.Logging.Testing" />
<Reference Include="System.Diagnostics.EventLog" /> <Reference Include="System.Diagnostics.EventLog" />
<Reference Include="System.Net.WebSockets.WebSocketProtocol" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework> <TargetFramework>netcoreapp3.0</TargetFramework>
@ -30,7 +30,6 @@
<Reference Include="Microsoft.Extensions.Logging.Testing" /> <Reference Include="Microsoft.Extensions.Logging.Testing" />
<Reference Include="Microsoft.Extensions.Logging" /> <Reference Include="Microsoft.Extensions.Logging" />
<Reference Include="System.Diagnostics.EventLog" /> <Reference Include="System.Diagnostics.EventLog" />
<Reference Include="System.Net.WebSockets.WebSocketProtocol" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\build\testsite.props" /> <Import Project="..\..\..\build\testsite.props" />
@ -18,7 +18,6 @@
<Reference Include="Microsoft.Extensions.Logging.Testing" /> <Reference Include="Microsoft.Extensions.Logging.Testing" />
<Reference Include="Microsoft.Extensions.Logging" /> <Reference Include="Microsoft.Extensions.Logging" />
<Reference Include="System.Diagnostics.EventLog" /> <Reference Include="System.Diagnostics.EventLog" />
<Reference Include="System.Net.WebSockets.WebSocketProtocol" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

View File

@ -30,7 +30,6 @@
<Reference Include="Microsoft.Extensions.Logging" /> <Reference Include="Microsoft.Extensions.Logging" />
<Reference Include="Microsoft.Extensions.Logging.Testing" /> <Reference Include="Microsoft.Extensions.Logging.Testing" />
<Reference Include="System.Diagnostics.EventLog" /> <Reference Include="System.Diagnostics.EventLog" />
<Reference Include="System.Net.WebSockets.WebSocketProtocol" />
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\..\build\testsite.props" /> <Import Project="..\..\..\..\build\testsite.props" />
@ -20,7 +20,6 @@
<Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" /> <Reference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" />
<Reference Include="Microsoft.Extensions.Configuration.Json" /> <Reference Include="Microsoft.Extensions.Configuration.Json" />
<Reference Include="Microsoft.Extensions.Logging.Console" /> <Reference Include="Microsoft.Extensions.Logging.Console" />
<Reference Include="System.Net.WebSockets.WebSocketProtocol" />
<Reference Include="xunit.assert" /> <Reference Include="xunit.assert" />
</ItemGroup> </ItemGroup>

View File

@ -96,7 +96,7 @@ namespace TestSite
Stream opaqueTransport = await upgradeFeature.UpgradeAsync(); Stream opaqueTransport = await upgradeFeature.UpgradeAsync();
// Get the WebSocket object // Get the WebSocket object
var ws = WebSocketProtocol.CreateFromStream(opaqueTransport, isServer: true, subProtocol: null, keepAliveInterval: TimeSpan.FromMinutes(2)); var ws = WebSocket.CreateFromStream(opaqueTransport, isServer: true, subProtocol: null, keepAliveInterval: TimeSpan.FromMinutes(2));
return ws; return ws;
} }

View File

@ -36,7 +36,7 @@ namespace ANCMStressTestApp
app.Map("/ResponseHeaders", ResponseHeaders); app.Map("/ResponseHeaders", ResponseHeaders);
app.Map("/EnvironmentVariables", EnvironmentVariables); app.Map("/EnvironmentVariables", EnvironmentVariables);
app.Map("/RequestInformation", RequestInformation); app.Map("/RequestInformation", RequestInformation);
app.Map("/WebSocket", WebSocket); app.Map("/WebSocket", WebSockets);
app.Run(async context => app.Run(async context =>
{ {
@ -152,7 +152,7 @@ namespace ANCMStressTestApp
}); });
} }
private void WebSocket(IApplicationBuilder app) private void WebSockets(IApplicationBuilder app)
{ {
app.Run(async context => app.Run(async context =>
{ {
@ -170,7 +170,7 @@ namespace ANCMStressTestApp
Stream opaqueTransport = await upgradeFeature.UpgradeAsync(); Stream opaqueTransport = await upgradeFeature.UpgradeAsync();
// Get the WebSocket object // Get the WebSocket object
var ws = WebSocketProtocol.CreateFromStream(opaqueTransport, isServer: true, subProtocol: null, keepAliveInterval: TimeSpan.FromMinutes(2)); var ws = WebSocket.CreateFromStream(opaqueTransport, isServer: true, subProtocol: null, keepAliveInterval: TimeSpan.FromMinutes(2));
var appLifetime = app.ApplicationServices.GetRequiredService<IApplicationLifetime>(); var appLifetime = app.ApplicationServices.GetRequiredService<IApplicationLifetime>();

View File

@ -19,7 +19,6 @@
<Reference Include="Microsoft.AspNetCore.ResponseCompression" /> <Reference Include="Microsoft.AspNetCore.ResponseCompression" />
<Reference Include="Microsoft.AspNetCore.Server.Kestrel" /> <Reference Include="Microsoft.AspNetCore.Server.Kestrel" />
<Reference Include="Microsoft.Extensions.Logging.Console" /> <Reference Include="Microsoft.Extensions.Logging.Console" />
<Reference Include="System.Net.WebSockets.WebSocketProtocol" />
</ItemGroup> </ItemGroup>
</Project> </Project>