Esempio n. 1
0
        private static void UdpSenderCreatFromFile_Check()
        {
            if (isUdpWorking)
            {
                return;
            }
            isUdpWorking = true;

            var sender = UdpSender.CreatFromConfig();

            sender.Init();
            bool stop = false;

            Console.WriteLine("Enter a message or stop/s to exit");
            do
            {
                string input = Console.ReadLine();
                stop = input.ToLower() == "stop" | input.ToLower() == "s";
                sender.SendAsync($"{input}");
            } while (!stop);
        }