예제 #1
0
        static void Main(string[] args)
        {
            bool result  = false;
            bool isSpare = false;

            try
            {
                LPG.RedefinedConsole();

                result = Client.Init();
                if (ERROR(result))
                {
                    goto Exit0;
                }

                LP.Logger.IMP("program start...");

                //test case
                //result = Test_Tcp(clientMessageHandler);
                //if (ERROR(result)) { goto Exit0; }

                while (!Client.IsClosed)
                {
                    isSpare = Client.MainLoop();
                    if (isSpare)
                    {
                        Thread.Sleep(1);
                    }
                }

                //Client.Close();
            }
            catch (Exception e)
            {
                LPMiniDump.GenerateNormalDump(e);
            }

            LP.Logger.IMP("program exit...");

Exit0:

            result = Client.UnInit();
            PTF_ERROR(result);

            Console.WriteLine("\nenter any key to quit");

            return;
        }