Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c45e6b3

Browse files
authored
Make ConnectHelper.ConnectAsync return ValueTask<Stream> (#24244)
Minor optimization via playing a bit better perf-wise with changes being made in coreclr.
1 parent 2f981c6 commit c45e6b3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/System.Net.Http/src/System/Net/Http/Managed/ConnectHelper.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@
22
// The .NET Foundation licenses this file to you under the MIT license.
33
// See the LICENSE file in the project root for more information.
44

5+
using System.IO;
56
using System.Net.Sockets;
67
using System.Threading.Tasks;
78

89
namespace System.Net.Http
910
{
1011
internal static class ConnectHelper
1112
{
12-
public static async ValueTask<NetworkStream> ConnectAsync(string host, int port)
13+
public static async ValueTask<Stream> ConnectAsync(string host, int port)
1314
{
1415
var socket = new Socket(SocketType.Stream, ProtocolType.Tcp) { NoDelay = true };
1516
try

0 commit comments

Comments
 (0)