static void Main( string[] args ) { Console.WriteLine( "Agent control host started." ); Console.WriteLine(); ThreadPool.SetMinThreads( 1000, 1000 ); ThreadPool.SetMaxThreads( 15000, 15000 ); AgentsControl agents = new AgentsControl(); callbackHost = new CallbackHost { Agents = agents }; cancelSource = new CancellationTokenSource(); ResetClient(); StartTask(); Console.ReadLine(); agents.SetConnectionsCount( 0, true ); client.Close(); Console.WriteLine( "Bye." ); }
static void Main(string[] args) { Console.WriteLine("Agent control host started."); Console.WriteLine(); ThreadPool.SetMinThreads(1000, 1000); ThreadPool.SetMaxThreads(15000, 15000); AgentsControl agents = new AgentsControl(); callbackHost = new CallbackHost { Agents = agents }; cancelSource = new CancellationTokenSource(); ResetClient(); StartTask(); Console.ReadLine(); agents.SetConnectionsCount(0, true); client.Close(); Console.WriteLine("Bye."); }