diff --git a/Directory.Build.props b/Directory.Build.props
index b51ed60133..a391978b7d 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -11,6 +11,11 @@
true
true
true
+ latest
+
+
+
+
diff --git a/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/MessageParserBenchmark.cs b/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/MessageParserBenchmark.cs
index a9b99c63e1..0661272907 100644
--- a/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/MessageParserBenchmark.cs
+++ b/benchmarks/Microsoft.AspNetCore.SignalR.Microbenchmarks/MessageParserBenchmark.cs
@@ -9,8 +9,8 @@ namespace Microsoft.AspNetCore.SignalR.Microbenchmarks
public class MessageParserBenchmark
{
private static readonly Random Random = new Random();
- private ReadOnlyBuffer _binaryInput;
- private ReadOnlyBuffer _textInput;
+ private ReadOnlyMemory _binaryInput;
+ private ReadOnlyMemory _textInput;
[Params(32, 64)]
public int ChunkSize { get; set; }
diff --git a/build/dependencies.props b/build/dependencies.props
index 8608bcaf2e..ddbe310bd4 100644
--- a/build/dependencies.props
+++ b/build/dependencies.props
@@ -50,21 +50,23 @@
2.1.0-preview1-27475
2.1.0-preview1-27475
2.0.0
+ 2.6.0-beta2-62211-02
15.3.0
4.7.49
0.9.0-beta2
10.0.1
1.2.4
- 0.1.0-e170811-6
- 0.1.0-e170811-6
- 0.1.0-e170811-6
- 0.1.0-e170811-6
- 4.4.0-preview3-25519-03
- 4.4.0
+ 0.1.0-alpha-002
+ 0.1.0-alpha-002
+ 0.1.0-alpha-002
+ 0.1.0-alpha-002
+ 4.5.0-preview1-25902-08
+ 4.5.0-preview1-25902-08
3.1.1
4.3.0
- 4.4.0
- 0.1.0-e170811-6
+ 4.5.0-preview1-25902-08
+ 4.5.0-preview1-25902-08
+ 4.4.0
2.3.0
2.3.0
diff --git a/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/EchoEndPoint.cs b/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/EchoEndPoint.cs
index e08b972bd1..433532b432 100644
--- a/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/EchoEndPoint.cs
+++ b/client-ts/Microsoft.AspNetCore.SignalR.Test.Server/EchoEndPoint.cs
@@ -1,8 +1,9 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Threading.Tasks;
+using Microsoft.AspNetCore.SignalR.Internal;
using Microsoft.AspNetCore.Sockets;
namespace Microsoft.AspNetCore.SignalR.Test.Server
@@ -11,7 +12,7 @@ namespace Microsoft.AspNetCore.SignalR.Test.Server
{
public async override Task OnConnectedAsync(ConnectionContext connection)
{
- await connection.Transport.Out.WriteAsync(await connection.Transport.In.ReadAsync());
+ await connection.Transport.Writer.WriteAsync(await connection.Transport.Reader.ReadAsync());
}
}
}
diff --git a/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs b/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs
index 87a6fbb9c3..f0af31544a 100644
--- a/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs
+++ b/samples/SocialWeather/PersistentConnectionLifeTimeManager.cs
@@ -40,7 +40,7 @@ namespace SocialWeather
var ms = new MemoryStream();
await formatter.WriteAsync(data, ms);
- connection.Transport.Out.TryWrite(ms.ToArray());
+ connection.Transport.Writer.TryWrite(ms.ToArray());
}
}
diff --git a/samples/SocialWeather/SocialWeatherEndPoint.cs b/samples/SocialWeather/SocialWeatherEndPoint.cs
index e412cfafeb..17889ec1aa 100644
--- a/samples/SocialWeather/SocialWeatherEndPoint.cs
+++ b/samples/SocialWeather/SocialWeatherEndPoint.cs
@@ -1,4 +1,4 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
@@ -34,9 +34,9 @@ namespace SocialWeather
var formatter = _formatterResolver.GetFormatter(
(string)connection.Metadata["formatType"]);
- while (await connection.Transport.In.WaitToReadAsync())
+ while (await connection.Transport.Reader.WaitToReadAsync())
{
- if (connection.Transport.In.TryRead(out var buffer))
+ if (connection.Transport.Reader.TryRead(out var buffer))
{
var stream = new MemoryStream();
await stream.WriteAsync(buffer, 0, buffer.Length);
diff --git a/samples/SocketsSample/EndPoints/MessagesEndPoint.cs b/samples/SocketsSample/EndPoints/MessagesEndPoint.cs
index 5559e56518..a17cb4624a 100644
--- a/samples/SocketsSample/EndPoints/MessagesEndPoint.cs
+++ b/samples/SocketsSample/EndPoints/MessagesEndPoint.cs
@@ -1,4 +1,4 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Collections.Generic;
@@ -20,9 +20,9 @@ namespace SocketsSample.EndPoints
try
{
- while (await connection.Transport.In.WaitToReadAsync())
+ while (await connection.Transport.Reader.WaitToReadAsync())
{
- if (connection.Transport.In.TryRead(out var buffer))
+ if (connection.Transport.Reader.TryRead(out var buffer))
{
// We can avoid the copy here but we'll deal with that later
var text = Encoding.UTF8.GetString(buffer);
@@ -50,7 +50,7 @@ namespace SocketsSample.EndPoints
foreach (var c in Connections)
{
- tasks.Add(c.Transport.Out.WriteAsync(payload));
+ tasks.Add(c.Transport.Writer.WriteAsync(payload));
}
return Task.WhenAll(tasks);
diff --git a/samples/SocketsSample/Hubs/Streaming.cs b/samples/SocketsSample/Hubs/Streaming.cs
index 63fa8b71e1..cee2c42cdf 100644
--- a/samples/SocketsSample/Hubs/Streaming.cs
+++ b/samples/SocketsSample/Hubs/Streaming.cs
@@ -1,7 +1,7 @@
using System;
using System.Reactive.Linq;
using System.Threading.Tasks;
-using System.Threading.Tasks.Channels;
+using System.Threading.Channels;
using Microsoft.AspNetCore.SignalR;
namespace SocketsSample.Hubs
@@ -15,7 +15,7 @@ namespace SocketsSample.Hubs
.Take(count);
}
- public ReadableChannel ChannelCounter(int count, int delay)
+ public ChannelReader ChannelCounter(int count, int delay)
{
var channel = Channel.CreateUnbounded();
@@ -23,14 +23,14 @@ namespace SocketsSample.Hubs
{
for (var i = 0; i < count; i++)
{
- await channel.Out.WriteAsync(i);
+ await channel.Writer.WriteAsync(i);
await Task.Delay(delay);
}
- channel.Out.TryComplete();
+ channel.Writer.TryComplete();
});
- return channel.In;
+ return channel.Reader;
}
}
}
diff --git a/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnection.cs b/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnection.cs
index 5294bcd93d..9caa61a92b 100644
--- a/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnection.cs
+++ b/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnection.cs
@@ -8,7 +8,7 @@ using System.Diagnostics;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
-using System.Threading.Tasks.Channels;
+using System.Threading.Channels;
using Microsoft.AspNetCore.SignalR.Client.Internal;
using Microsoft.AspNetCore.SignalR.Internal;
using Microsoft.AspNetCore.SignalR.Internal.Encoders;
@@ -145,12 +145,12 @@ namespace Microsoft.AspNetCore.SignalR.Client
return new Subscription(invocationHandler, invocationList);
}
- public async Task> StreamAsync(string methodName, Type returnType, object[] args, CancellationToken cancellationToken = default)
+ public async Task> StreamAsync(string methodName, Type returnType, object[] args, CancellationToken cancellationToken = default)
{
return await StreamAsyncCore(methodName, returnType, args, cancellationToken).ForceAsync();
}
- private async Task> StreamAsyncCore(string methodName, Type returnType, object[] args, CancellationToken cancellationToken)
+ private async Task> StreamAsyncCore(string methodName, Type returnType, object[] args, CancellationToken cancellationToken)
{
if (!_startCalled)
{
diff --git a/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnectionExtensions.StreamAsync.cs b/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnectionExtensions.StreamAsync.cs
index b0821d97e9..81eec09974 100644
--- a/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnectionExtensions.StreamAsync.cs
+++ b/src/Microsoft.AspNetCore.SignalR.Client.Core/HubConnectionExtensions.StreamAsync.cs
@@ -1,71 +1,71 @@
-// Copyright (c) .NET Foundation. All rights reserved.
+// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Threading;
using System.Threading.Tasks;
-using System.Threading.Tasks.Channels;
+using System.Threading.Channels;
namespace Microsoft.AspNetCore.SignalR.Client
{
public static partial class HubConnectionExtensions
{
- public static Task> StreamAsync(this HubConnection hubConnection, string methodName, CancellationToken cancellationToken = default)
+ public static Task> StreamAsync(this HubConnection hubConnection, string methodName, CancellationToken cancellationToken = default)
{
return hubConnection.StreamAsync(methodName, Array.Empty