/**************************************************************************************/ static void Main(string[] args) { /* log.Debug("Run Log:" + DateTime.Now.ToString("HH:mm:ss.fff") );//測試結果:log4net 寫入時間與真實當下執行的時間誤差約10~30ms Console.WriteLine(ConfigLoader.GetSettings(ConType.AutoLoad)); //Console.ReadKey(); ClientRequestManager manager = new ClientRequestManager(); IClientRequestHandler client = manager.GetInstance(); Console.ReadKey(); */ //AsyncMultiSocketServer s1 = new AsyncMultiSocketServer(8115, "AutoLoad"); AsyncMultiSocketServer s1 = new AsyncMultiSocketServer(8116, "PAMQuota"); Console.WriteLine("Main Thread Id:{0} background:{1}", Thread.CurrentThread.ManagedThreadId, Thread.CurrentThread.IsBackground.ToString()); s1.Start(); // Console.WriteLine("服務開始"); Console.ReadKey(); s1.Stop(); Console.ReadKey(); }
/**************************************************************************************/ static void Main(string[] args) { /* * log.Debug("Run Log:" + DateTime.Now.ToString("HH:mm:ss.fff") );//測試結果:log4net 寫入時間與真實當下執行的時間誤差約10~30ms * Console.WriteLine(ConfigLoader.GetSettings(ConType.AutoLoad)); * //Console.ReadKey(); * ClientRequestManager manager = new ClientRequestManager(); * IClientRequestHandler client = manager.GetInstance(); * Console.ReadKey(); */ //AsyncMultiSocketServer s1 = new AsyncMultiSocketServer(8115, "AutoLoad"); AsyncMultiSocketServer s1 = new AsyncMultiSocketServer(8116, "PAMQuota"); Console.WriteLine("Main Thread Id:{0} background:{1}", Thread.CurrentThread.ManagedThreadId, Thread.CurrentThread.IsBackground.ToString()); s1.Start(); // Console.WriteLine("服務開始"); Console.ReadKey(); s1.Stop(); Console.ReadKey(); }