Beispiel #1
0
        private async Task StartupClient(ControlClient client)
        {
            await Task.Yield();

            await client.Connect();

            var token = new CancellationTokenSource(TimeSpan.FromMinutes(1));

            while (true)
            {
                if (token.IsCancellationRequested)
                {
                    throw new Exception("Could not lock tuner.");
                }

                try
                {
                    await client.Lock();

                    break;
                }
                catch
                {
                    // This space intentionally left blank.
                }
            }
        }
Beispiel #2
0
 public void TestConnect()
 {
     c.Connect("145.10.233.20", 3);
     Assert.AreEqual("145.10.233.20", c.IP);
     Assert.AreEqual(3, c.Port);
 }