static int Main(string[] args) { System.Net.ServicePointManager.DefaultConnectionLimit = 128; App app = new App(); Task.Factory.StartNew(() => { GetIp(); }); auto.WaitOne(); Console.Clear(); //自定义方式 Ice.Properties properties = Ice.Util.createProperties(); properties.load("config.server"); properties.setProperty("Ice.ThreadPool.Server.Size", thread_init_size); properties.setProperty("Ice.ThreadPool.Server.SizeMax", thread_max_size); properties.setProperty("Ice.ThreadPool.Client.Size", thread_init_size); properties.setProperty("Ice.ThreadPool.Client.SizeMax", thread_max_size); Ice.InitializationData data = new Ice.InitializationData(); data.properties = properties; return(app.main(args, data)); }