private void Server_ClientMessage(NamedPipeConnection<PipeMessage, PipeMessage> connection, PipeMessage message) { if (message.ShutdownRequest) { Console.WriteLine("Shutdown requested by client " + connection.Id); _cancellationTokenSource.Cancel(); } }
private void Client_ServerMessage(NamedPipeConnection<PipeMessage, PipeMessage> connection, PipeMessage message) { if (message.Ack) { _ack = true; } if (message.ShuttedDown) { _waitToken.Cancel(false); } }