예제 #1
0
        static void Main(string[] args)
        {
            string ip   = "127.0.0.1";
            ushort port = 20011;

            API = new GateServer();
            try
            {
                API.Init(ip, port);
                API.ReConnect();
            }
            catch (Exception e)
            {
                Console.WriteLine("init failed:{0}", e.ToString());
                API.Exit();
                return;
            }

            Thread workThread = new Thread(ThreadMethod);

            workThread.Start();
            Console.WriteLine("client is ready...");
            while (true)
            {
                string cmd = Console.ReadLine().ToLower().Trim();
                switch (cmd)
                {
                case "send":
                    API.Request_Test();
                    break;

                default:
                    break;
                }
            }
            //Console.ReadLine();
        }
예제 #2
0
 public void ReConnect()
 {
     _api.ReConnect();
 }