diff --git a/Microsoft.AspNetCore.Sockets.sln b/Microsoft.AspNetCore.Sockets.sln index b481659f14..567e661b5b 100644 --- a/Microsoft.AspNetCore.Sockets.sln +++ b/Microsoft.AspNetCore.Sockets.sln @@ -8,6 +8,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{83B2C3EB-A3D8-4E6F-9A3C-A380B005EF31}" ProjectSection(SolutionItems) = preProject global.json = global.json + NuGet.config = NuGet.config EndProjectSection EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{C4BC9889-B49F-41B6-806B-F84941B2549B}" diff --git a/NuGet.config b/NuGet.config index 3ce9e7f223..2db375e2c0 100644 --- a/NuGet.config +++ b/NuGet.config @@ -3,5 +3,6 @@ + \ No newline at end of file diff --git a/samples/SocketsSample/project.json b/samples/SocketsSample/project.json index c260e8c160..400842963e 100644 --- a/samples/SocketsSample/project.json +++ b/samples/SocketsSample/project.json @@ -7,11 +7,11 @@ "version": "1.0.0", "type": "platform" }, - "Microsoft.AspNetCore.Diagnostics": "1.0.0", - "Microsoft.AspNetCore.StaticFiles": "1.0.0", - "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0", - "Microsoft.AspNetCore.Server.Kestrel": "1.0.0", - "Microsoft.Extensions.Logging.Console": "1.0.0" + "Microsoft.AspNetCore.Diagnostics": "1.1.0-*", + "Microsoft.AspNetCore.StaticFiles": "1.1.0-*", + "Microsoft.AspNetCore.Server.IISIntegration": "1.1.0-*", + "Microsoft.AspNetCore.Server.Kestrel": "1.1.0-*", + "Microsoft.Extensions.Logging.Console": "1.1.0-*" }, "tools": { diff --git a/samples/SocketsSample/wwwroot/ws.html b/samples/SocketsSample/wwwroot/ws.html new file mode 100644 index 0000000000..894ff130ae --- /dev/null +++ b/samples/SocketsSample/wwwroot/ws.html @@ -0,0 +1,41 @@ + + + + + + + + +

WebSockets

+ + + + + + \ No newline at end of file diff --git a/src/Microsoft.AspNetCore.Sockets/HttpDispatcherAppBuilderExtensions.cs b/src/Microsoft.AspNetCore.Sockets/HttpDispatcherAppBuilderExtensions.cs index 0534695f72..f8165beec1 100644 --- a/src/Microsoft.AspNetCore.Sockets/HttpDispatcherAppBuilderExtensions.cs +++ b/src/Microsoft.AspNetCore.Sockets/HttpDispatcherAppBuilderExtensions.cs @@ -9,6 +9,9 @@ namespace Microsoft.AspNetCore.Builder { var dispatcher = new HttpConnectionDispatcher(app); callback(dispatcher); + + // TODO: Use new low allocating websocket API + app.UseWebSockets(); app.UseRouter(dispatcher.GetRouter()); return app; } diff --git a/src/Microsoft.AspNetCore.Sockets/project.json b/src/Microsoft.AspNetCore.Sockets/project.json index 4fe87a4eaa..971f8b6547 100644 --- a/src/Microsoft.AspNetCore.Sockets/project.json +++ b/src/Microsoft.AspNetCore.Sockets/project.json @@ -2,7 +2,8 @@ "version": "0.1.0-*", "dependencies": { "Channels": "0.2.0-beta-*", - "Microsoft.AspNetCore.Routing": "1.0.0" + "Microsoft.AspNetCore.Routing": "1.1.0-*", + "Microsoft.AspNetCore.WebSockets": "0.2.0-*" }, "frameworks": { "netstandard1.3": {