static void Main(string[] args) { CClient Client = new CClient(); Client.m_Core.Connect("127.0.0.1", 20000, 0); Console.WriteLine("/Cmd: h(Help) q(Quit) c(reconnect) exit(ProgramExit)"); Console.WriteLine("그룹테스트: /make(생성/합류) /destroy(파괴) /leave(탈퇴) /msg(그룹채팅) \n"); Console.Write("> "); var ret = ReadLineAsync(); bool run_program = true; while (run_program) { if (ret.IsCompleted) { switch (ret.Result) { case "/q": Client.m_Core.Leave(); break; case "/exit": run_program = false; break; case "/c": Client.m_Core.ReConnect(); break; case "/make": // 그룹생성/가입 case "/destroy": // 그룹해체 case "/leave": // 그룹탈퇴 case "/msg": // 그룹메세지 Client.proxy.GroupTestCommand(ZNet.RemoteID.Remote_Server, ZNet.CPackOption.Basic, ret.Result); break; default: Client.proxy.Chat(ZNet.RemoteID.Remote_Server, ZNet.CPackOption.Basic, ret.Result); break; } if (run_program) { ret = ReadLineAsync(); } } Client.m_Core.NetLoop(); System.Threading.Thread.Sleep(1); } Client.m_Core.Destroy(); System.Threading.Thread.Sleep(1000 * 2); }
static void Main(string[] args) { CClient Client = new CClient(); Client.m_Core.Connect("127.0.0.1", 20000, 0); Console.WriteLine("/Cmd: h(Help) q(Quit) c(reconnect) exit(ProgramExit)"); Console.WriteLine("그룹테스트: /make(생성/합류) /destroy(파괴) /leave(탈퇴) /msg(그룹채팅) \n"); Console.Write("> "); var ret = ReadLineAsync(); bool run_program = true; while (run_program) { if (ret.IsCompleted) { switch (ret.Result) { case "/q": Client.m_Core.Leave(); break; case "/exit": run_program = false; break; case "/c": Client.m_Core.ReConnect(); break; case "/make": // 그룹생성/가입 case "/destroy": // 그룹해체 case "/leave": // 그룹탈퇴 case "/msg": // 그룹메세지 Client.proxy.GroupTestCommand(ZNet.RemoteID.Remote_Server, ZNet.CPackOption.Basic, ret.Result); break; default: Client.proxy.Chat(ZNet.RemoteID.Remote_Server, ZNet.CPackOption.Basic, ret.Result); break; } if (run_program) ret = ReadLineAsync(); } Client.m_Core.NetLoop(); System.Threading.Thread.Sleep(1); } Client.m_Core.Destroy(); System.Threading.Thread.Sleep(1000 * 2); }