Exemple #1
0
        private static void Main(string[] args)
        {
            var url = "http://*****:*****@ CMD] Awaiting your command.");

                var menu = Console.ReadLine();
                while (menu != "exit")
                {
                    var packet = new Packet(new Tuple <int, int, int>(0, 0, 0), menu);
                    connection.SendToAllAsync(packet).Wait();

                    menu = Console.ReadLine();
                }
            }
            else
            {
            }

            Console.WriteLine("Exiting");
            Thread.Sleep(500);
        }
Exemple #2
0
 /// <summary>
 /// Stellt eine Verbindung zu API her.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private async void HubConnectButton_Click(object sender, RoutedEventArgs e)
 {
     _hubClient.SetServerAddress(HubApiServerTextBox.Text);
     _hubClient.SetClientCredentials(HubClientIdTextBox.Text, HubClientSecretTextBox.Text);
     await _hubClient.ConnectAsync();
 }