From 5b8c17ca8e261f11238e92b045d96a475f50f02d Mon Sep 17 00:00:00 2001 From: Derrick Timmermans Date: Tue, 21 Sep 2021 21:31:14 +0200 Subject: [PATCH] Properly name the client --- .../IO/TestSceneGameplayEventBroadcaster.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/osu.Game.Rulesets.Sentakki.Tests/IO/TestSceneGameplayEventBroadcaster.cs b/osu.Game.Rulesets.Sentakki.Tests/IO/TestSceneGameplayEventBroadcaster.cs index e372e50cb..544511644 100644 --- a/osu.Game.Rulesets.Sentakki.Tests/IO/TestSceneGameplayEventBroadcaster.cs +++ b/osu.Game.Rulesets.Sentakki.Tests/IO/TestSceneGameplayEventBroadcaster.cs @@ -43,20 +43,20 @@ protected override void Dispose(bool isDisposing) private class TestBroadcastClient : IDisposable { - private readonly NamedPipeClientStream pipeServer; + private readonly NamedPipeClientStream pipeClient; private readonly SpriteText text; private bool running = true; - public bool IsClientConnected => pipeServer.IsConnected; + public bool IsClientConnected => pipeClient.IsConnected; private readonly Thread readThread; public TestBroadcastClient(SpriteText outputText) { text = outputText; - pipeServer = new NamedPipeClientStream(".", "senPipe", + pipeClient = new NamedPipeClientStream(".", "senPipe", PipeDirection.In, PipeOptions.Asynchronous, TokenImpersonationLevel.Impersonation); @@ -71,11 +71,11 @@ private void clientLoop() { while (running) { - if (!pipeServer.IsConnected) + if (!pipeClient.IsConnected) { try { - pipeServer.ConnectAsync().Wait(cancellationToken); + pipeClient.ConnectAsync().Wait(cancellationToken); } catch (OperationCanceledException) { @@ -83,7 +83,7 @@ private void clientLoop() } } - TransmissionData packet = new TransmissionData((byte)pipeServer.ReadByte()); + TransmissionData packet = new TransmissionData((byte)pipeClient.ReadByte()); // Server has shut down if (packet == TransmissionData.Kill) @@ -98,7 +98,7 @@ public void Dispose() { running = false; cancellationTokenSource.Cancel(); - pipeServer.Dispose(); + pipeClient.Dispose(); } } }