Exemplo n.º 1
0
        public static void Both()
        {
            Thread serverThread = new Thread(() =>
            {
                RunServer.StartServer(1337);
            });

            serverThread.IsBackground = false;
            serverThread.Start();


            RunClients.StartClients("127.0.0.1", 1337, 1000);
        }
Exemplo n.º 2
0
        public static void Client(string[] args)
        {
            if (args.Length != 4)
            {
                Console.WriteLine("Usage: LoadTest client <host> <port> <clients>");
                return;
            }
            string ip      = args[1];
            int    port    = int.Parse(args[2]);
            int    clients = int.Parse(args[3]);

            RunClients.StartClients(ip, port, clients);
        }
Exemplo n.º 3
0
        public static void Both()
        {
            Thread serverThread = new Thread(() =>
            {
                RunServer.StartServer(1337);
            });

            serverThread.IsBackground = false;
            serverThread.Start();

            // test 500 clients, which means 500+500 = 1000 connections total.
            // this should be enough for any server or MMO.
            RunClients.StartClients("127.0.0.1", 1337, 500);
        }