diff --git a/build/dependencies.props b/build/dependencies.props
index eea44544e8..142daeb465 100644
--- a/build/dependencies.props
+++ b/build/dependencies.props
@@ -7,51 +7,52 @@
2.4.337
3.1.0
2.1.0-preview2-15698
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 0.5.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 0.5.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
4.5.0-preview2-26130-01
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
- 2.1.0-preview2-30066
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
+ 2.1.0-preview2-30070
2.0.0
2.1.0-preview2-26130-04
15.3.0
@@ -70,7 +71,7 @@
4.5.0-preview2-26130-01
4.5.0-preview2-26130-01
2.3.1
- 2.3.1
+ 2.4.0-beta.1.build3945
\ No newline at end of file
diff --git a/client-ts/FunctionalTests/EchoEndPoint.cs b/client-ts/FunctionalTests/EchoEndPoint.cs
index 0680acc8ca..27460590eb 100644
--- a/client-ts/FunctionalTests/EchoEndPoint.cs
+++ b/client-ts/FunctionalTests/EchoEndPoint.cs
@@ -3,6 +3,7 @@
using System.IO.Pipelines;
using System.Threading.Tasks;
+using Microsoft.AspNetCore.Protocols;
using Microsoft.AspNetCore.Sockets;
namespace FunctionalTests
diff --git a/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs b/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs
index 01093214a6..577254ae15 100644
--- a/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs
+++ b/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs
@@ -6,6 +6,7 @@ using System.Collections.Generic;
using System.IO;
using System.IO.Pipelines;
using System.Threading.Tasks;
+using Microsoft.AspNetCore.Protocols;
using Microsoft.AspNetCore.Sockets;
using Microsoft.AspNetCore.Sockets.Features;
@@ -23,9 +24,9 @@ namespace SocialWeather
public void OnConnectedAsync(ConnectionContext connection)
{
- connection.Metadata["groups"] = new HashSet();
+ connection.Features.Get().Metadata["groups"] = new HashSet();
var format = connection.GetHttpContext().Request.Query["formatType"].ToString();
- connection.Metadata["format"] = format;
+ connection.Features.Get().Metadata["format"] = format;
if (string.Equals(format, "protobuf", StringComparison.OrdinalIgnoreCase))
{
var transferModeFeature = connection.Features.Get();
@@ -47,7 +48,7 @@ namespace SocialWeather
foreach (var connection in _connectionList)
{
var context = connection.GetHttpContext();
- var formatter = _formatterResolver.GetFormatter((string)connection.Metadata["format"]);
+ var formatter = _formatterResolver.GetFormatter((string)connection.Features.Get().Metadata["format"]);
var ms = new MemoryStream();
await formatter.WriteAsync(data, ms);
@@ -72,7 +73,7 @@ namespace SocialWeather
public void AddGroupAsync(ConnectionContext connection, string groupName)
{
- var groups = (HashSet)connection.Metadata["groups"];
+ var groups = (HashSet)connection.Features.Get().Metadata["groups"];
lock (groups)
{
groups.Add(groupName);
@@ -81,7 +82,7 @@ namespace SocialWeather
public void RemoveGroupAsync(ConnectionContext connection, string groupName)
{
- var groups = (HashSet)connection.Metadata["groups"];
+ var groups = (HashSet)connection.Features.Get().Metadata["groups"];
if (groups != null)
{
lock (groups)
diff --git a/samples/SocialWeather/SocialWeatherEndPoint.cs b/samples/SocialWeather/SocialWeatherEndPoint.cs
index 84dd03d919..38eaf60752 100644
--- a/samples/SocialWeather/SocialWeatherEndPoint.cs
+++ b/samples/SocialWeather/SocialWeatherEndPoint.cs
@@ -3,7 +3,9 @@
using System.IO;
using System.Threading.Tasks;
+using Microsoft.AspNetCore.Protocols;
using Microsoft.AspNetCore.Sockets;
+using Microsoft.AspNetCore.Sockets.Features;
using Microsoft.Extensions.Logging;
namespace SocialWeather
@@ -32,7 +34,7 @@ namespace SocialWeather
public async Task ProcessRequests(ConnectionContext connection)
{
var formatter = _formatterResolver.GetFormatter(
- (string)connection.Metadata["format"]);
+ (string)connection.Features.Get().Metadata["format"]);
while (true)
{
diff --git a/samples/SocketsSample/EndPoints/MessagesEndPoint.cs b/samples/SocketsSample/EndPoints/MessagesEndPoint.cs
index 0fd837f8bf..933e50fd73 100644
--- a/samples/SocketsSample/EndPoints/MessagesEndPoint.cs
+++ b/samples/SocketsSample/EndPoints/MessagesEndPoint.cs
@@ -5,7 +5,9 @@ using System.Collections.Generic;
using System.IO.Pipelines;
using System.Text;
using System.Threading.Tasks;
+using Microsoft.AspNetCore.Protocols;
using Microsoft.AspNetCore.Sockets;
+using Microsoft.AspNetCore.Sockets.Features;
namespace SocketsSample.EndPoints
{
@@ -17,7 +19,7 @@ namespace SocketsSample.EndPoints
{
Connections.Add(connection);
- await Broadcast($"{connection.ConnectionId} connected ({connection.Metadata[ConnectionMetadataNames.Transport]})");
+ await Broadcast($"{connection.ConnectionId} connected ({connection.Features.Get().Metadata[ConnectionMetadataNames.Transport]})");
try
{
@@ -50,7 +52,7 @@ namespace SocketsSample.EndPoints
{
Connections.Remove(connection);
- await Broadcast($"{connection.ConnectionId} disconnected ({connection.Metadata[ConnectionMetadataNames.Transport]})");
+ await Broadcast($"{connection.ConnectionId} disconnected ({connection.Features.Get().Metadata[ConnectionMetadataNames.Transport]})");
}
}
diff --git a/samples/SocketsSample/Program.cs b/samples/SocketsSample/Program.cs
index aa6c67a8fe..3aea9e8472 100644
--- a/samples/SocketsSample/Program.cs
+++ b/samples/SocketsSample/Program.cs
@@ -3,8 +3,10 @@
using System.IO;
using Microsoft.AspNetCore.Hosting;
+using Microsoft.AspNetCore.SignalR;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
+using SocketsSample.Hubs;
namespace SocketsSample
{
@@ -23,7 +25,18 @@ namespace SocketsSample
{
factory.AddConsole();
})
- .UseKestrel()
+ .UseKestrel(options =>
+ {
+ // Default port
+ options.ListenLocalhost(5000);
+
+ // Hub bound to TCP end point
+ options.ListenLocalhost(9001, builder =>
+ {
+ // Run the hub on this port (this won't work properly until streaming parsing is implemented)
+ builder.UseHub();
+ });
+ })
.UseContentRoot(Directory.GetCurrentDirectory())
.UseIISIntegration()
.UseStartup()
diff --git a/src/Microsoft.AspNetCore.SignalR.Core/HubConnectionContext.cs b/src/Microsoft.AspNetCore.SignalR.Core/HubConnectionContext.cs
index 2913578a42..6cfb3bcc58 100644
--- a/src/Microsoft.AspNetCore.SignalR.Core/HubConnectionContext.cs
+++ b/src/Microsoft.AspNetCore.SignalR.Core/HubConnectionContext.cs
@@ -13,6 +13,7 @@ using System.Threading;
using System.Threading.Channels;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http.Features;
+using Microsoft.AspNetCore.Protocols;
using Microsoft.AspNetCore.SignalR.Core;
using Microsoft.AspNetCore.SignalR.Internal;
using Microsoft.AspNetCore.SignalR.Internal.Encoders;
@@ -64,7 +65,7 @@ namespace Microsoft.AspNetCore.SignalR
public virtual IFeatureCollection Features => _connectionContext.Features;
- public virtual IDictionary