예제 #1
0
        async void runing()
        {
            try
            {
                if (await login())
                {
                    newnotify(chromosome, userid);
                }
                outer.start();
                var dv = await receive();

                outer.end();
                if (dv == (byte)byteid.newnotify)
                {
                    newnotify(chromosome, userid);
                }
                runing();
            }
            catch (Exception e)
            {
                connect = false;
                tcp?.Close();
                _ = e.Message;
                Console.Beep();
                await Task.Delay(1000);

                runing();
            }
        }
예제 #2
0
        async void runing()
        {
            try
            {
                await login();

                writebyte((byte)byteid.connectpulse);
                outer.start();
                var dv = await receivebyte();

                outer.end();
                if (dv != (byte)byteid.connectpulse)
                {
                    throw new Exception("khjudughhfhvjhcbjfnbjcbfjhbhfbvhbdndf");
                }
                n++;
                await Task.Delay(10);

                runing();
            }
            catch (Exception e)
            {
                _ = e.Message;
                Console.Beep();
                connect = false;
                tcp?.Close();
                runing();
            }
        }