/// <summary> /// Remoting server run /// </summary> public static void Run() { Console.WriteLine("Remoting Server is Ready ..."); string s; while ((s = Console.ReadLine()) != "") { n.BroadCast(s); } Console.WriteLine("Server shutdown ..."); }
/// <summary> /// 运行远程调用服务器 /// </summary> public static void Run() { Console.WriteLine("Remoting Server is Ready ..."); string s; //如果输入的值不是空白 while ((s = Console.ReadLine()) != "") { if (s == "kill") { PrintPool.PrinterPoolClear(); Run(); } n.BroadCast(s); } Console.WriteLine("Server shutdown ..."); }