Skip to content

Commit 44e0dad

Browse files
committed
Quick.Protocol.Pipeline fit for net6.0.
1 parent 7d3f2e1 commit 44e0dad

File tree

4 files changed

+0
-11
lines changed

4 files changed

+0
-11
lines changed

Quick.Protocol.Pipeline/QpPipelineClient.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,7 @@ public QpPipelineClient(QpPipelineClientOptions options) : base(options)
2222
protected override async Task<Stream> InnerConnectAsync()
2323
{
2424
pipeClientStream = new NamedPipeClientStream(options.ServerName, options.PipeName, PipeDirection.InOut, PipeOptions.Asynchronous);
25-
#if NETSTANDARD2_0
2625
await pipeClientStream.ConnectAsync(options.ConnectionTimeout);
27-
#else
28-
await Task.Run(() => pipeClientStream.Connect(options.ConnectionTimeout));
29-
#endif
3026
pipeClientStream.ReadMode = PipeTransmissionMode.Byte;
3127
return pipeClientStream;
3228
}

Quick.Protocol.Pipeline/QpPipelineServer.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,7 @@ protected override Task InnerAcceptAsync(CancellationToken token)
3030
{
3131
var serverStream = new NamedPipeServerStream(options.PipeName, PipeDirection.InOut, NamedPipeServerStream.MaxAllowedServerInstances, PipeTransmissionMode.Byte, PipeOptions.Asynchronous);
3232
Task waitForConnectionTask = null;
33-
#if NETSTANDARD2_0
3433
waitForConnectionTask = serverStream.WaitForConnectionAsync(token);
35-
#else
36-
waitForConnectionTask = Task.Run(() => serverStream.WaitForConnection());
37-
#endif
3834
return waitForConnectionTask.ContinueWith(task =>
3935
{
4036
if (task.IsCanceled)

Quick.Protocol.Tcp/QpTcpClient.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,7 @@ public override void Disconnect()
4242
if (tcpClient != null)
4343
{
4444
tcpClient.Close();
45-
#if NETSTANDARD2_0
4645
tcpClient.Dispose();
47-
#endif
4846
tcpClient = null;
4947
}
5048

Test/ConsoleTest/Program.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ static void Main(string[] args)
1616
var psi = new ProcessStartInfo("dotnet");
1717
psi.ArgumentList.Add($"{nameof(ConsoleTest)}.dll");
1818
psi.ArgumentList.Add("client");
19-
//psi.WorkingDirectory = typeof(Program);
2019
psi.CreateNoWindow = true;
2120
psi.UseShellExecute = false;
2221
psi.RedirectStandardOutput = true;

0 commit comments

Comments
 (0)