Exemple #1
0
        private static void LoadTest()
        {
            MainServer.LoadConfig();
            int threadCount = 0;

            while (true)
            {
                for (int i = 0; i < 250; i++)
                {
                    new Thread(() =>
                    {
                        while (true)
                        {
                            ApiServer server = ApiServer.CreateDummy();
                            server.Account   = new Account
                            {
                                IsOnline = true
                            };
                            GetAccountInfoRequest request = new GetAccountInfoRequest(ApiRequestId.GetAccountInfo, "asdf");
                            request.Process(server);
                            Thread.Sleep(1000);
                        }
                    }).Start();
                    threadCount++;
                    Console.WriteLine("Simulating " + threadCount.ToString() + " users ...");
                }
                Thread.Sleep(30000);
            }
        }
Exemple #2
0
 /// <summary>
 /// Main entry point
 /// </summary>
 private static void Main()
 {
     MainServer.LoadConfig();
 }